elismasilva commited on
Commit
f61d8da
·
verified ·
1 Parent(s): 45543b5

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +3 -6
  2. space.py +1 -1
  3. src/README.md +3 -6
  4. src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js +0 -0
  5. src/backend/gradio_dropdownplus/templates/component/_basePickBy-LaQQ5Y1-.js +151 -0
  6. src/backend/gradio_dropdownplus/templates/component/_baseUniq-DFIPcCrY.js +614 -0
  7. src/backend/gradio_dropdownplus/templates/component/arc-Bt6Yqp6j.js +83 -0
  8. src/backend/gradio_dropdownplus/templates/component/architectureDiagram-KFL7JDKH-wk_kwIXK.js +0 -0
  9. src/backend/gradio_dropdownplus/templates/component/blockDiagram-ZYB65J3Q-DNWCWPbh.js +0 -0
  10. src/backend/gradio_dropdownplus/templates/component/c4Diagram-AAMF2YG6-BeY_xb6D.js +1581 -0
  11. src/backend/gradio_dropdownplus/templates/component/channel-Ab7oN4Gk.js +5 -0
  12. src/backend/gradio_dropdownplus/templates/component/chunk-ANTBXLJU-BwgTSljF.js +9 -0
  13. src/backend/gradio_dropdownplus/templates/component/chunk-FHKO5MBM-CzrxxPWK.js +15 -0
  14. src/backend/gradio_dropdownplus/templates/component/chunk-GLLZNHP4-DAmLcc0i.js +19 -0
  15. src/backend/gradio_dropdownplus/templates/component/chunk-JBRWN2VN-19qyBxpW.js +1376 -0
  16. src/backend/gradio_dropdownplus/templates/component/chunk-LXBSTHXV-CNtjhS2l.js +1382 -0
  17. src/backend/gradio_dropdownplus/templates/component/chunk-NRVI72HA-CQ3LV39f.js +20 -0
  18. src/backend/gradio_dropdownplus/templates/component/chunk-OMD6QJNC-DamKp1kC.js +64 -0
  19. src/backend/gradio_dropdownplus/templates/component/chunk-WVR4S24B-Br22bM8P.js +8 -0
  20. src/backend/gradio_dropdownplus/templates/component/classDiagram-3BZAVTQC-D45Rg7HK.js +16 -0
  21. src/backend/gradio_dropdownplus/templates/component/classDiagram-v2-QTMF73CY-D45Rg7HK.js +16 -0
  22. src/backend/gradio_dropdownplus/templates/component/clone-CHsVXWow.js +8 -0
  23. src/backend/gradio_dropdownplus/templates/component/dagre-2BBEFEWP-C6CYCTFq.js +447 -0
  24. src/backend/gradio_dropdownplus/templates/component/diagram-4IRLE6MV-_4f03rOr.js +534 -0
  25. src/backend/gradio_dropdownplus/templates/component/diagram-GUPCWM2R-C_OtVk8U.js +143 -0
  26. src/backend/gradio_dropdownplus/templates/component/diagram-RP2FKANI-BH5Joxj1.js +221 -0
  27. src/backend/gradio_dropdownplus/templates/component/erDiagram-HZWUO2LU-DULMf-mN.js +842 -0
  28. src/backend/gradio_dropdownplus/templates/component/flowDiagram-THRYKUMA-C17Ahd-H.js +1627 -0
  29. src/backend/gradio_dropdownplus/templates/component/ganttDiagram-WV7ZQ7D5-P_-JzS6t.js +2499 -0
  30. src/backend/gradio_dropdownplus/templates/component/gitGraphDiagram-OJR772UL-gcjdT_Xe.js +712 -0
  31. src/backend/gradio_dropdownplus/templates/component/graph-Ngrd9eu7.js +247 -0
  32. src/backend/gradio_dropdownplus/templates/component/index.js +1 -1
  33. src/backend/gradio_dropdownplus/templates/component/infoDiagram-DDUCL6P7-k9fI9cyo.js +24 -0
  34. src/backend/gradio_dropdownplus/templates/component/journeyDiagram-FFXJYRFH-Couz-SYf.js +836 -0
  35. src/backend/gradio_dropdownplus/templates/component/kanban-definition-KOZQBZVT-CAZruoIJ.js +720 -0
  36. src/backend/gradio_dropdownplus/templates/component/layout-C7Nz_rwh.js +1324 -0
  37. src/backend/gradio_dropdownplus/templates/component/linear-LzsmWjnq.js +259 -0
  38. src/backend/gradio_dropdownplus/templates/component/mermaid.core-DH6TRyjK.js +0 -0
  39. src/backend/gradio_dropdownplus/templates/component/mindmap-definition-LNHGMQRG-DQCoUb6O.js +0 -0
  40. src/backend/gradio_dropdownplus/templates/component/pieDiagram-DBDJKBY4-C_SumqCS.js +161 -0
  41. src/backend/gradio_dropdownplus/templates/component/quadrantDiagram-YPSRARAO-C6uWz8Aq.js +1024 -0
  42. src/backend/gradio_dropdownplus/templates/component/requirementDiagram-EGVEC5DT-KqYC7Myr.js +852 -0
  43. src/backend/gradio_dropdownplus/templates/component/sankeyDiagram-HRAUVNP4-BatwK8JX.js +810 -0
  44. src/backend/gradio_dropdownplus/templates/component/sequenceDiagram-4MX5Z3NR-B4PDpSYW.js +0 -0
  45. src/backend/gradio_dropdownplus/templates/component/stateDiagram-UUKSUZ4H-Ca5vxZdh.js +263 -0
  46. src/backend/gradio_dropdownplus/templates/component/stateDiagram-v2-EYPG3UTE-CVroge-A.js +16 -0
  47. src/backend/gradio_dropdownplus/templates/component/style.css +0 -0
  48. src/backend/gradio_dropdownplus/templates/component/timeline-definition-3HZDQTIS-CzrghR2L.js +801 -0
  49. src/backend/gradio_dropdownplus/templates/component/treemap-75Q7IDZK-o7HSbXc7.js +0 -0
  50. src/backend/gradio_dropdownplus/templates/component/xychartDiagram-FDP5SA34-BjiN55_k.js +1340 -0
README.md CHANGED
@@ -9,13 +9,10 @@ pinned: false
9
  app_file: space.py
10
  ---
11
 
12
-
13
  # `gradio_dropdownplus`
14
- <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.2%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_dropdownplus"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_dropdownplus'>Component GitHub Code</a></span></p>
15
-
16
-
17
- Advanced Dropdown Component for Gradio UI with tooltip help support.
18
 
 
19
 
20
  ## Installation
21
 
@@ -174,7 +171,7 @@ str
174
  ```
175
 
176
  </td>
177
- <td align="left"><code>value = <gradio_dropdownplus.dropdownplus.DefaultValue object at 0x00000170A604EDD0></code></td>
178
  <td align="left">the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.</td>
179
  </tr>
180
 
 
9
  app_file: space.py
10
  ---
11
 
 
12
  # `gradio_dropdownplus`
13
+ <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.3%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_dropdownplus"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_dropdownplus'>Component GitHub Code</a></span></p>
 
 
 
14
 
15
+ Advanced Dropdown Component for Gradio UI
16
 
17
  ## Installation
18
 
 
171
  ```
172
 
173
  </td>
174
+ <td align="left"><code>value = <gradio_dropdownplus.dropdownplus.DefaultValue object at 0x000001B3784FEDD0></code></td>
175
  <td align="left">the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.</td>
176
  </tr>
177
 
space.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  from app import demo as app
4
  import os
5
 
6
- _docs = {'DropdownPlus': {'description': 'Creates a dropdown of choices from which a single entry or multiple entries can be selected (as an input component) or displayed (as an output component).\n', 'members': {'__init__': {'choices': {'type': 'Sequence[\n str | int | float | tuple[str, str | int | float]\n ]\n | None', 'default': 'None', 'description': 'a list of string or numeric options to choose from. An option can also be a tuple of the form (name, value), where name is the displayed name of the dropdown choice and value is the value to be passed to the function, or returned by the function.'}, 'value': {'type': 'str\n | int\n | float\n | Sequence[str | int | float]\n | Callable\n | DefaultValue\n | None', 'default': 'value = <gradio_dropdownplus.dropdownplus.DefaultValue object at 0x00000170A604EDD0>', 'description': 'the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.'}, 'type': {'type': 'Literal["value", "index"]', 'default': '"value"', 'description': 'type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.'}, 'multiselect': {'type': 'bool | None', 'default': 'None', 'description': 'if True, multiple choices can be selected.'}, 'allow_custom_value': {'type': 'bool', 'default': 'False', 'description': 'if True, allows user to enter a custom value that is not in the list of choices.'}, 'max_choices': {'type': 'int | None', 'default': 'None', 'description': 'maximum number of choices that can be selected. If None, no limit is enforced.'}, 'filterable': {'type': 'bool', 'default': 'True', 'description': 'if True, user will be able to type into the dropdown and filter the choices by typing. Can only be set to False if `allow_custom_value` is False.'}, 'label': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'the label for this component, displayed above the component if `show_label` is `True` and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component corresponds to.'}, 'info': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'additional component description, appears below the label in smaller font. Supports markdown / HTML syntax.'}, 'help': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'A string of help text to display in a tooltip next to the label.'}, 'every': {'type': 'Timer | float | None', 'default': 'None', 'description': 'continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.'}, 'inputs': {'type': 'Component | Sequence[Component] | set[Component] | None', 'default': 'None', 'description': 'components that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.'}, 'show_label': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will display label.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'if True, will place the component in a container - providing some extra padding around the border.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'if True, choices in this dropdown will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'if False, component will be hidden.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'an optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'an optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'render': {'type': 'bool', 'default': 'True', 'description': 'if False, component will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.'}, 'key': {'type': 'int | str | tuple[int | str, ...] | None', 'default': 'None', 'description': None}, 'preserved_by_key': {'type': 'list[str] | str | None', 'default': '"value"', 'description': None}}, 'postprocess': {'value': {'type': 'str | int | float | list[str | int | float] | None', 'description': 'Expects a `str | int | float` corresponding to the value of the dropdown entry to be selected. Or, if `multiselect` is True, expects a `list` of values corresponding to the selected dropdown entries.'}}, 'preprocess': {'return': {'type': 'str\n | int\n | float\n | list[str | int | float]\n | list[int | None]\n | None', 'description': 'Passes the value of the selected dropdown choice as a `str | int | float` or its index as an `int` into the function, depending on `type`. Or, if `multiselect` is True, passes the values of the selected dropdown choices as a list of corresponding values/indices instead.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the DropdownPlus changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the DropdownPlus.'}, 'select': {'type': None, 'default': None, 'description': 'Event listener for when the user selects or deselects the DropdownPlus. Uses event data gradio.SelectData to carry `value` referring to the label of the DropdownPlus, and `selected` to refer to state of the DropdownPlus. See EventData documentation on how to use this event data'}, 'focus': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is focused.'}, 'blur': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is unfocused/blurred.'}, 'key_up': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses a key while the DropdownPlus is focused.'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'DropdownPlus': []}}}
7
 
8
  abs_path = os.path.join(os.path.dirname(__file__), "css.css")
9
 
 
3
  from app import demo as app
4
  import os
5
 
6
+ _docs = {'DropdownPlus': {'description': 'Creates a dropdown of choices from which a single entry or multiple entries can be selected (as an input component) or displayed (as an output component).\n', 'members': {'__init__': {'choices': {'type': 'Sequence[\n str | int | float | tuple[str, str | int | float]\n ]\n | None', 'default': 'None', 'description': 'a list of string or numeric options to choose from. An option can also be a tuple of the form (name, value), where name is the displayed name of the dropdown choice and value is the value to be passed to the function, or returned by the function.'}, 'value': {'type': 'str\n | int\n | float\n | Sequence[str | int | float]\n | Callable\n | DefaultValue\n | None', 'default': 'value = <gradio_dropdownplus.dropdownplus.DefaultValue object at 0x000001B3784FEDD0>', 'description': 'the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.'}, 'type': {'type': 'Literal["value", "index"]', 'default': '"value"', 'description': 'type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.'}, 'multiselect': {'type': 'bool | None', 'default': 'None', 'description': 'if True, multiple choices can be selected.'}, 'allow_custom_value': {'type': 'bool', 'default': 'False', 'description': 'if True, allows user to enter a custom value that is not in the list of choices.'}, 'max_choices': {'type': 'int | None', 'default': 'None', 'description': 'maximum number of choices that can be selected. If None, no limit is enforced.'}, 'filterable': {'type': 'bool', 'default': 'True', 'description': 'if True, user will be able to type into the dropdown and filter the choices by typing. Can only be set to False if `allow_custom_value` is False.'}, 'label': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'the label for this component, displayed above the component if `show_label` is `True` and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component corresponds to.'}, 'info': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'additional component description, appears below the label in smaller font. Supports markdown / HTML syntax.'}, 'help': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'A string of help text to display in a tooltip next to the label.'}, 'every': {'type': 'Timer | float | None', 'default': 'None', 'description': 'continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.'}, 'inputs': {'type': 'Component | Sequence[Component] | set[Component] | None', 'default': 'None', 'description': 'components that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.'}, 'show_label': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will display label.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'if True, will place the component in a container - providing some extra padding around the border.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'if True, choices in this dropdown will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'if False, component will be hidden.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'an optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'an optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'render': {'type': 'bool', 'default': 'True', 'description': 'if False, component will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.'}, 'key': {'type': 'int | str | tuple[int | str, ...] | None', 'default': 'None', 'description': None}, 'preserved_by_key': {'type': 'list[str] | str | None', 'default': '"value"', 'description': None}}, 'postprocess': {'value': {'type': 'str | int | float | list[str | int | float] | None', 'description': 'Expects a `str | int | float` corresponding to the value of the dropdown entry to be selected. Or, if `multiselect` is True, expects a `list` of values corresponding to the selected dropdown entries.'}}, 'preprocess': {'return': {'type': 'str\n | int\n | float\n | list[str | int | float]\n | list[int | None]\n | None', 'description': 'Passes the value of the selected dropdown choice as a `str | int | float` or its index as an `int` into the function, depending on `type`. Or, if `multiselect` is True, passes the values of the selected dropdown choices as a list of corresponding values/indices instead.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the DropdownPlus changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the DropdownPlus.'}, 'select': {'type': None, 'default': None, 'description': 'Event listener for when the user selects or deselects the DropdownPlus. Uses event data gradio.SelectData to carry `value` referring to the label of the DropdownPlus, and `selected` to refer to state of the DropdownPlus. See EventData documentation on how to use this event data'}, 'focus': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is focused.'}, 'blur': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is unfocused/blurred.'}, 'key_up': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses a key while the DropdownPlus is focused.'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'DropdownPlus': []}}}
7
 
8
  abs_path = os.path.join(os.path.dirname(__file__), "css.css")
9
 
src/README.md CHANGED
@@ -9,13 +9,10 @@ pinned: false
9
  app_file: space.py
10
  ---
11
 
12
-
13
  # `gradio_dropdownplus`
14
- <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.2%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_dropdownplus"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_dropdownplus'>Component GitHub Code</a></span></p>
15
-
16
-
17
- Advanced Dropdown Component for Gradio UI with tooltip help support.
18
 
 
19
 
20
  ## Installation
21
 
@@ -174,7 +171,7 @@ str
174
  ```
175
 
176
  </td>
177
- <td align="left"><code>value = <gradio_dropdownplus.dropdownplus.DefaultValue object at 0x00000170A604EDD0></code></td>
178
  <td align="left">the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.</td>
179
  </tr>
180
 
 
9
  app_file: space.py
10
  ---
11
 
 
12
  # `gradio_dropdownplus`
13
+ <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.3%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_dropdownplus"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_dropdownplus'>Component GitHub Code</a></span></p>
 
 
 
14
 
15
+ Advanced Dropdown Component for Gradio UI
16
 
17
  ## Installation
18
 
 
171
  ```
172
 
173
  </td>
174
+ <td align="left"><code>value = <gradio_dropdownplus.dropdownplus.DefaultValue object at 0x000001B3784FEDD0></code></td>
175
  <td align="left">the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.</td>
176
  </tr>
177
 
src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/_basePickBy-LaQQ5Y1-.js ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { e as x, c as O, g as m, k as P, h as p, j as w, l as A, m as c, n as I, t as N, o as E } from "./_baseUniq-DFIPcCrY.js";
2
+ import { aP as g, aA as F, aQ as M, aR as T, aS as _, aT as l, aU as $, aV as B, aW as S, aX as y } from "./mermaid.core-DH6TRyjK.js";
3
+ var R = /\s/;
4
+ function G(n) {
5
+ for (var r = n.length; r-- && R.test(n.charAt(r)); )
6
+ ;
7
+ return r;
8
+ }
9
+ var H = /^\s+/;
10
+ function L(n) {
11
+ return n && n.slice(0, G(n) + 1).replace(H, "");
12
+ }
13
+ var o = NaN, W = /^[-+]0x[0-9a-f]+$/i, X = /^0b[01]+$/i, q = /^0o[0-7]+$/i, z = parseInt;
14
+ function C(n) {
15
+ if (typeof n == "number")
16
+ return n;
17
+ if (x(n))
18
+ return o;
19
+ if (g(n)) {
20
+ var r = typeof n.valueOf == "function" ? n.valueOf() : n;
21
+ n = g(r) ? r + "" : r;
22
+ }
23
+ if (typeof n != "string")
24
+ return n === 0 ? n : +n;
25
+ n = L(n);
26
+ var t = X.test(n);
27
+ return t || q.test(n) ? z(n.slice(2), t ? 2 : 8) : W.test(n) ? o : +n;
28
+ }
29
+ var v = 1 / 0, K = 17976931348623157e292;
30
+ function Q(n) {
31
+ if (!n)
32
+ return n === 0 ? n : 0;
33
+ if (n = C(n), n === v || n === -v) {
34
+ var r = n < 0 ? -1 : 1;
35
+ return r * K;
36
+ }
37
+ return n === n ? n : 0;
38
+ }
39
+ function U(n) {
40
+ var r = Q(n), t = r % 1;
41
+ return r === r ? t ? r - t : r : 0;
42
+ }
43
+ function fn(n) {
44
+ var r = n == null ? 0 : n.length;
45
+ return r ? O(n) : [];
46
+ }
47
+ var b = Object.prototype, Y = b.hasOwnProperty, dn = F(function(n, r) {
48
+ n = Object(n);
49
+ var t = -1, i = r.length, a = i > 2 ? r[2] : void 0;
50
+ for (a && M(r[0], r[1], a) && (i = 1); ++t < i; )
51
+ for (var f = r[t], e = T(f), s = -1, d = e.length; ++s < d; ) {
52
+ var u = e[s], h = n[u];
53
+ (h === void 0 || _(h, b[u]) && !Y.call(n, u)) && (n[u] = f[u]);
54
+ }
55
+ return n;
56
+ });
57
+ function un(n) {
58
+ var r = n == null ? 0 : n.length;
59
+ return r ? n[r - 1] : void 0;
60
+ }
61
+ function D(n) {
62
+ return function(r, t, i) {
63
+ var a = Object(r);
64
+ if (!l(r)) {
65
+ var f = m(t);
66
+ r = P(r), t = function(s) {
67
+ return f(a[s], s, a);
68
+ };
69
+ }
70
+ var e = n(r, t, i);
71
+ return e > -1 ? a[f ? r[e] : e] : void 0;
72
+ };
73
+ }
74
+ var J = Math.max;
75
+ function Z(n, r, t) {
76
+ var i = n == null ? 0 : n.length;
77
+ if (!i)
78
+ return -1;
79
+ var a = t == null ? 0 : U(t);
80
+ return a < 0 && (a = J(i + a, 0)), p(n, m(r), a);
81
+ }
82
+ var hn = D(Z);
83
+ function V(n, r) {
84
+ var t = -1, i = l(n) ? Array(n.length) : [];
85
+ return w(n, function(a, f, e) {
86
+ i[++t] = r(a, f, e);
87
+ }), i;
88
+ }
89
+ function gn(n, r) {
90
+ var t = $(n) ? A : V;
91
+ return t(n, m(r));
92
+ }
93
+ var j = Object.prototype, k = j.hasOwnProperty;
94
+ function nn(n, r) {
95
+ return n != null && k.call(n, r);
96
+ }
97
+ function mn(n, r) {
98
+ return n != null && c(n, r, nn);
99
+ }
100
+ function rn(n, r) {
101
+ return n < r;
102
+ }
103
+ function tn(n, r, t) {
104
+ for (var i = -1, a = n.length; ++i < a; ) {
105
+ var f = n[i], e = r(f);
106
+ if (e != null && (s === void 0 ? e === e && !x(e) : t(e, s)))
107
+ var s = e, d = f;
108
+ }
109
+ return d;
110
+ }
111
+ function on(n) {
112
+ return n && n.length ? tn(n, B, rn) : void 0;
113
+ }
114
+ function an(n, r, t, i) {
115
+ if (!g(n))
116
+ return n;
117
+ r = I(r, n);
118
+ for (var a = -1, f = r.length, e = f - 1, s = n; s != null && ++a < f; ) {
119
+ var d = N(r[a]), u = t;
120
+ if (d === "__proto__" || d === "constructor" || d === "prototype")
121
+ return n;
122
+ if (a != e) {
123
+ var h = s[d];
124
+ u = void 0, u === void 0 && (u = g(h) ? h : S(r[a + 1]) ? [] : {});
125
+ }
126
+ y(s, d, u), s = s[d];
127
+ }
128
+ return n;
129
+ }
130
+ function vn(n, r, t) {
131
+ for (var i = -1, a = r.length, f = {}; ++i < a; ) {
132
+ var e = r[i], s = E(n, e);
133
+ t(s, e) && an(f, I(e, n), s);
134
+ }
135
+ return f;
136
+ }
137
+ export {
138
+ rn as a,
139
+ tn as b,
140
+ V as c,
141
+ vn as d,
142
+ on as e,
143
+ fn as f,
144
+ hn as g,
145
+ mn as h,
146
+ dn as i,
147
+ U as j,
148
+ un as l,
149
+ gn as m,
150
+ Q as t
151
+ };
src/backend/gradio_dropdownplus/templates/component/_baseUniq-DFIPcCrY.js ADDED
@@ -0,0 +1,614 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { bc as S, bd as Rn, aU as T, be as w, bf as xn, bg as mn, aT as sn, bh as Mn, bi as un, bj as x, aR as U, bk as Cn, bl as on, bm as Fn, bn as E, ba as gn, bo as R, aP as ln, bp as Dn, bq as D, br as Gn, bs as Un, bt as _, aX as Bn, bu as Nn, aS as Kn, bv as X, bw as jn, bx as Hn, aW as qn, aV as cn, b8 as Yn, by as M } from "./mermaid.core-DH6TRyjK.js";
2
+ var Zn = "[object Symbol]";
3
+ function B(n) {
4
+ return typeof n == "symbol" || S(n) && Rn(n) == Zn;
5
+ }
6
+ function bn(n, r) {
7
+ for (var e = -1, t = n == null ? 0 : n.length, f = Array(t); ++e < t; )
8
+ f[e] = r(n[e], e, n);
9
+ return f;
10
+ }
11
+ var J = w ? w.prototype : void 0, Q = J ? J.toString : void 0;
12
+ function dn(n) {
13
+ if (typeof n == "string")
14
+ return n;
15
+ if (T(n))
16
+ return bn(n, dn) + "";
17
+ if (B(n))
18
+ return Q ? Q.call(n) : "";
19
+ var r = n + "";
20
+ return r == "0" && 1 / n == -1 / 0 ? "-0" : r;
21
+ }
22
+ function Xn() {
23
+ }
24
+ function pn(n, r) {
25
+ for (var e = -1, t = n == null ? 0 : n.length; ++e < t && r(n[e], e, n) !== !1; )
26
+ ;
27
+ return n;
28
+ }
29
+ function Jn(n, r, e, t) {
30
+ for (var f = n.length, i = e + -1; ++i < f; )
31
+ if (r(n[i], i, n))
32
+ return i;
33
+ return -1;
34
+ }
35
+ function Qn(n) {
36
+ return n !== n;
37
+ }
38
+ function Wn(n, r, e) {
39
+ for (var t = e - 1, f = n.length; ++t < f; )
40
+ if (n[t] === r)
41
+ return t;
42
+ return -1;
43
+ }
44
+ function zn(n, r, e) {
45
+ return r === r ? Wn(n, r, e) : Jn(n, Qn, e);
46
+ }
47
+ function Vn(n, r) {
48
+ var e = n == null ? 0 : n.length;
49
+ return !!e && zn(n, r, 0) > -1;
50
+ }
51
+ function $(n) {
52
+ return sn(n) ? xn(n) : mn(n);
53
+ }
54
+ var kn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, nr = /^\w*$/;
55
+ function N(n, r) {
56
+ if (T(n))
57
+ return !1;
58
+ var e = typeof n;
59
+ return e == "number" || e == "symbol" || e == "boolean" || n == null || B(n) ? !0 : nr.test(n) || !kn.test(n) || r != null && n in Object(r);
60
+ }
61
+ var rr = 500;
62
+ function er(n) {
63
+ var r = Mn(n, function(t) {
64
+ return e.size === rr && e.clear(), t;
65
+ }), e = r.cache;
66
+ return r;
67
+ }
68
+ var tr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ir = /\\(\\)?/g, fr = er(function(n) {
69
+ var r = [];
70
+ return n.charCodeAt(0) === 46 && r.push(""), n.replace(tr, function(e, t, f, i) {
71
+ r.push(f ? i.replace(ir, "$1") : t || e);
72
+ }), r;
73
+ });
74
+ function ar(n) {
75
+ return n == null ? "" : dn(n);
76
+ }
77
+ function An(n, r) {
78
+ return T(n) ? n : N(n, r) ? [n] : fr(ar(n));
79
+ }
80
+ function m(n) {
81
+ if (typeof n == "string" || B(n))
82
+ return n;
83
+ var r = n + "";
84
+ return r == "0" && 1 / n == -1 / 0 ? "-0" : r;
85
+ }
86
+ function yn(n, r) {
87
+ r = An(r, n);
88
+ for (var e = 0, t = r.length; n != null && e < t; )
89
+ n = n[m(r[e++])];
90
+ return e && e == t ? n : void 0;
91
+ }
92
+ function sr(n, r, e) {
93
+ var t = n == null ? void 0 : yn(n, r);
94
+ return t === void 0 ? e : t;
95
+ }
96
+ function K(n, r) {
97
+ for (var e = -1, t = r.length, f = n.length; ++e < t; )
98
+ n[f + e] = r[e];
99
+ return n;
100
+ }
101
+ var W = w ? w.isConcatSpreadable : void 0;
102
+ function ur(n) {
103
+ return T(n) || un(n) || !!(W && n && n[W]);
104
+ }
105
+ function Ot(n, r, e, t, f) {
106
+ var i = -1, a = n.length;
107
+ for (e || (e = ur), f || (f = []); ++i < a; ) {
108
+ var s = n[i];
109
+ e(s) ? K(f, s) : t || (f[f.length] = s);
110
+ }
111
+ return f;
112
+ }
113
+ function or(n, r, e, t) {
114
+ var f = -1, i = n == null ? 0 : n.length;
115
+ for (t && i && (e = n[++f]); ++f < i; )
116
+ e = r(e, n[f], f, n);
117
+ return e;
118
+ }
119
+ function gr(n, r) {
120
+ return n && x(r, $(r), n);
121
+ }
122
+ function lr(n, r) {
123
+ return n && x(r, U(r), n);
124
+ }
125
+ function Tn(n, r) {
126
+ for (var e = -1, t = n == null ? 0 : n.length, f = 0, i = []; ++e < t; ) {
127
+ var a = n[e];
128
+ r(a, e, n) && (i[f++] = a);
129
+ }
130
+ return i;
131
+ }
132
+ function hn() {
133
+ return [];
134
+ }
135
+ var cr = Object.prototype, br = cr.propertyIsEnumerable, z = Object.getOwnPropertySymbols, j = z ? function(n) {
136
+ return n == null ? [] : (n = Object(n), Tn(z(n), function(r) {
137
+ return br.call(n, r);
138
+ }));
139
+ } : hn;
140
+ function dr(n, r) {
141
+ return x(n, j(n), r);
142
+ }
143
+ var pr = Object.getOwnPropertySymbols, wn = pr ? function(n) {
144
+ for (var r = []; n; )
145
+ K(r, j(n)), n = Cn(n);
146
+ return r;
147
+ } : hn;
148
+ function Ar(n, r) {
149
+ return x(n, wn(n), r);
150
+ }
151
+ function On(n, r, e) {
152
+ var t = r(n);
153
+ return T(n) ? t : K(t, e(n));
154
+ }
155
+ function G(n) {
156
+ return On(n, $, j);
157
+ }
158
+ function yr(n) {
159
+ return On(n, U, wn);
160
+ }
161
+ var Tr = Object.prototype, hr = Tr.hasOwnProperty;
162
+ function wr(n) {
163
+ var r = n.length, e = new n.constructor(r);
164
+ return r && typeof n[0] == "string" && hr.call(n, "index") && (e.index = n.index, e.input = n.input), e;
165
+ }
166
+ function Or(n, r) {
167
+ var e = r ? on(n.buffer) : n.buffer;
168
+ return new n.constructor(e, n.byteOffset, n.byteLength);
169
+ }
170
+ var $r = /\w*$/;
171
+ function _r(n) {
172
+ var r = new n.constructor(n.source, $r.exec(n));
173
+ return r.lastIndex = n.lastIndex, r;
174
+ }
175
+ var V = w ? w.prototype : void 0, k = V ? V.valueOf : void 0;
176
+ function Sr(n) {
177
+ return k ? Object(k.call(n)) : {};
178
+ }
179
+ var Er = "[object Boolean]", Pr = "[object Date]", Ir = "[object Map]", vr = "[object Number]", Lr = "[object RegExp]", Rr = "[object Set]", xr = "[object String]", mr = "[object Symbol]", Mr = "[object ArrayBuffer]", Cr = "[object DataView]", Fr = "[object Float32Array]", Dr = "[object Float64Array]", Gr = "[object Int8Array]", Ur = "[object Int16Array]", Br = "[object Int32Array]", Nr = "[object Uint8Array]", Kr = "[object Uint8ClampedArray]", jr = "[object Uint16Array]", Hr = "[object Uint32Array]";
180
+ function qr(n, r, e) {
181
+ var t = n.constructor;
182
+ switch (r) {
183
+ case Mr:
184
+ return on(n);
185
+ case Er:
186
+ case Pr:
187
+ return new t(+n);
188
+ case Cr:
189
+ return Or(n, e);
190
+ case Fr:
191
+ case Dr:
192
+ case Gr:
193
+ case Ur:
194
+ case Br:
195
+ case Nr:
196
+ case Kr:
197
+ case jr:
198
+ case Hr:
199
+ return Fn(n, e);
200
+ case Ir:
201
+ return new t();
202
+ case vr:
203
+ case xr:
204
+ return new t(n);
205
+ case Lr:
206
+ return _r(n);
207
+ case Rr:
208
+ return new t();
209
+ case mr:
210
+ return Sr(n);
211
+ }
212
+ }
213
+ var Yr = "[object Map]";
214
+ function Zr(n) {
215
+ return S(n) && E(n) == Yr;
216
+ }
217
+ var nn = R && R.isMap, Xr = nn ? gn(nn) : Zr, Jr = "[object Set]";
218
+ function Qr(n) {
219
+ return S(n) && E(n) == Jr;
220
+ }
221
+ var rn = R && R.isSet, Wr = rn ? gn(rn) : Qr, zr = 1, Vr = 2, kr = 4, $n = "[object Arguments]", ne = "[object Array]", re = "[object Boolean]", ee = "[object Date]", te = "[object Error]", _n = "[object Function]", ie = "[object GeneratorFunction]", fe = "[object Map]", ae = "[object Number]", Sn = "[object Object]", se = "[object RegExp]", ue = "[object Set]", oe = "[object String]", ge = "[object Symbol]", le = "[object WeakMap]", ce = "[object ArrayBuffer]", be = "[object DataView]", de = "[object Float32Array]", pe = "[object Float64Array]", Ae = "[object Int8Array]", ye = "[object Int16Array]", Te = "[object Int32Array]", he = "[object Uint8Array]", we = "[object Uint8ClampedArray]", Oe = "[object Uint16Array]", $e = "[object Uint32Array]", g = {};
222
+ g[$n] = g[ne] = g[ce] = g[be] = g[re] = g[ee] = g[de] = g[pe] = g[Ae] = g[ye] = g[Te] = g[fe] = g[ae] = g[Sn] = g[se] = g[ue] = g[oe] = g[ge] = g[he] = g[we] = g[Oe] = g[$e] = !0;
223
+ g[te] = g[_n] = g[le] = !1;
224
+ function C(n, r, e, t, f, i) {
225
+ var a, s = r & zr, u = r & Vr, b = r & kr;
226
+ if (a !== void 0)
227
+ return a;
228
+ if (!ln(n))
229
+ return n;
230
+ var l = T(n);
231
+ if (l) {
232
+ if (a = wr(n), !s)
233
+ return Dn(n, a);
234
+ } else {
235
+ var o = E(n), c = o == _n || o == ie;
236
+ if (D(n))
237
+ return Gn(n, s);
238
+ if (o == Sn || o == $n || c && !f) {
239
+ if (a = u || c ? {} : Un(n), !s)
240
+ return u ? Ar(n, lr(a, n)) : dr(n, gr(a, n));
241
+ } else {
242
+ if (!g[o])
243
+ return f ? n : {};
244
+ a = qr(n, o, s);
245
+ }
246
+ }
247
+ i || (i = new _());
248
+ var h = i.get(n);
249
+ if (h)
250
+ return h;
251
+ i.set(n, a), Wr(n) ? n.forEach(function(d) {
252
+ a.add(C(d, r, e, d, n, i));
253
+ }) : Xr(n) && n.forEach(function(d, p) {
254
+ a.set(p, C(d, r, e, p, n, i));
255
+ });
256
+ var A = b ? u ? yr : G : u ? U : $, y = l ? void 0 : A(n);
257
+ return pn(y || n, function(d, p) {
258
+ y && (p = d, d = n[p]), Bn(a, p, C(d, r, e, p, n, i));
259
+ }), a;
260
+ }
261
+ var _e = "__lodash_hash_undefined__";
262
+ function Se(n) {
263
+ return this.__data__.set(n, _e), this;
264
+ }
265
+ function Ee(n) {
266
+ return this.__data__.has(n);
267
+ }
268
+ function P(n) {
269
+ var r = -1, e = n == null ? 0 : n.length;
270
+ for (this.__data__ = new Nn(); ++r < e; )
271
+ this.add(n[r]);
272
+ }
273
+ P.prototype.add = P.prototype.push = Se;
274
+ P.prototype.has = Ee;
275
+ function Pe(n, r) {
276
+ for (var e = -1, t = n == null ? 0 : n.length; ++e < t; )
277
+ if (r(n[e], e, n))
278
+ return !0;
279
+ return !1;
280
+ }
281
+ function En(n, r) {
282
+ return n.has(r);
283
+ }
284
+ var Ie = 1, ve = 2;
285
+ function Pn(n, r, e, t, f, i) {
286
+ var a = e & Ie, s = n.length, u = r.length;
287
+ if (s != u && !(a && u > s))
288
+ return !1;
289
+ var b = i.get(n), l = i.get(r);
290
+ if (b && l)
291
+ return b == r && l == n;
292
+ var o = -1, c = !0, h = e & ve ? new P() : void 0;
293
+ for (i.set(n, r), i.set(r, n); ++o < s; ) {
294
+ var A = n[o], y = r[o];
295
+ if (t)
296
+ var d = a ? t(y, A, o, r, n, i) : t(A, y, o, n, r, i);
297
+ if (d !== void 0) {
298
+ if (d)
299
+ continue;
300
+ c = !1;
301
+ break;
302
+ }
303
+ if (h) {
304
+ if (!Pe(r, function(p, O) {
305
+ if (!En(h, O) && (A === p || f(A, p, e, t, i)))
306
+ return h.push(O);
307
+ })) {
308
+ c = !1;
309
+ break;
310
+ }
311
+ } else if (!(A === y || f(A, y, e, t, i))) {
312
+ c = !1;
313
+ break;
314
+ }
315
+ }
316
+ return i.delete(n), i.delete(r), c;
317
+ }
318
+ function Le(n) {
319
+ var r = -1, e = Array(n.size);
320
+ return n.forEach(function(t, f) {
321
+ e[++r] = [f, t];
322
+ }), e;
323
+ }
324
+ function H(n) {
325
+ var r = -1, e = Array(n.size);
326
+ return n.forEach(function(t) {
327
+ e[++r] = t;
328
+ }), e;
329
+ }
330
+ var Re = 1, xe = 2, me = "[object Boolean]", Me = "[object Date]", Ce = "[object Error]", Fe = "[object Map]", De = "[object Number]", Ge = "[object RegExp]", Ue = "[object Set]", Be = "[object String]", Ne = "[object Symbol]", Ke = "[object ArrayBuffer]", je = "[object DataView]", en = w ? w.prototype : void 0, F = en ? en.valueOf : void 0;
331
+ function He(n, r, e, t, f, i, a) {
332
+ switch (e) {
333
+ case je:
334
+ if (n.byteLength != r.byteLength || n.byteOffset != r.byteOffset)
335
+ return !1;
336
+ n = n.buffer, r = r.buffer;
337
+ case Ke:
338
+ return !(n.byteLength != r.byteLength || !i(new X(n), new X(r)));
339
+ case me:
340
+ case Me:
341
+ case De:
342
+ return Kn(+n, +r);
343
+ case Ce:
344
+ return n.name == r.name && n.message == r.message;
345
+ case Ge:
346
+ case Be:
347
+ return n == r + "";
348
+ case Fe:
349
+ var s = Le;
350
+ case Ue:
351
+ var u = t & Re;
352
+ if (s || (s = H), n.size != r.size && !u)
353
+ return !1;
354
+ var b = a.get(n);
355
+ if (b)
356
+ return b == r;
357
+ t |= xe, a.set(n, r);
358
+ var l = Pn(s(n), s(r), t, f, i, a);
359
+ return a.delete(n), l;
360
+ case Ne:
361
+ if (F)
362
+ return F.call(n) == F.call(r);
363
+ }
364
+ return !1;
365
+ }
366
+ var qe = 1, Ye = Object.prototype, Ze = Ye.hasOwnProperty;
367
+ function Xe(n, r, e, t, f, i) {
368
+ var a = e & qe, s = G(n), u = s.length, b = G(r), l = b.length;
369
+ if (u != l && !a)
370
+ return !1;
371
+ for (var o = u; o--; ) {
372
+ var c = s[o];
373
+ if (!(a ? c in r : Ze.call(r, c)))
374
+ return !1;
375
+ }
376
+ var h = i.get(n), A = i.get(r);
377
+ if (h && A)
378
+ return h == r && A == n;
379
+ var y = !0;
380
+ i.set(n, r), i.set(r, n);
381
+ for (var d = a; ++o < u; ) {
382
+ c = s[o];
383
+ var p = n[c], O = r[c];
384
+ if (t)
385
+ var Z = a ? t(O, p, c, r, n, i) : t(p, O, c, n, r, i);
386
+ if (!(Z === void 0 ? p === O || f(p, O, e, t, i) : Z)) {
387
+ y = !1;
388
+ break;
389
+ }
390
+ d || (d = c == "constructor");
391
+ }
392
+ if (y && !d) {
393
+ var I = n.constructor, v = r.constructor;
394
+ I != v && "constructor" in n && "constructor" in r && !(typeof I == "function" && I instanceof I && typeof v == "function" && v instanceof v) && (y = !1);
395
+ }
396
+ return i.delete(n), i.delete(r), y;
397
+ }
398
+ var Je = 1, tn = "[object Arguments]", fn = "[object Array]", L = "[object Object]", Qe = Object.prototype, an = Qe.hasOwnProperty;
399
+ function We(n, r, e, t, f, i) {
400
+ var a = T(n), s = T(r), u = a ? fn : E(n), b = s ? fn : E(r);
401
+ u = u == tn ? L : u, b = b == tn ? L : b;
402
+ var l = u == L, o = b == L, c = u == b;
403
+ if (c && D(n)) {
404
+ if (!D(r))
405
+ return !1;
406
+ a = !0, l = !1;
407
+ }
408
+ if (c && !l)
409
+ return i || (i = new _()), a || jn(n) ? Pn(n, r, e, t, f, i) : He(n, r, u, e, t, f, i);
410
+ if (!(e & Je)) {
411
+ var h = l && an.call(n, "__wrapped__"), A = o && an.call(r, "__wrapped__");
412
+ if (h || A) {
413
+ var y = h ? n.value() : n, d = A ? r.value() : r;
414
+ return i || (i = new _()), f(y, d, e, t, i);
415
+ }
416
+ }
417
+ return c ? (i || (i = new _()), Xe(n, r, e, t, f, i)) : !1;
418
+ }
419
+ function q(n, r, e, t, f) {
420
+ return n === r ? !0 : n == null || r == null || !S(n) && !S(r) ? n !== n && r !== r : We(n, r, e, t, q, f);
421
+ }
422
+ var ze = 1, Ve = 2;
423
+ function ke(n, r, e, t) {
424
+ var f = e.length, i = f;
425
+ if (n == null)
426
+ return !i;
427
+ for (n = Object(n); f--; ) {
428
+ var a = e[f];
429
+ if (a[2] ? a[1] !== n[a[0]] : !(a[0] in n))
430
+ return !1;
431
+ }
432
+ for (; ++f < i; ) {
433
+ a = e[f];
434
+ var s = a[0], u = n[s], b = a[1];
435
+ if (a[2]) {
436
+ if (u === void 0 && !(s in n))
437
+ return !1;
438
+ } else {
439
+ var l = new _(), o;
440
+ if (!(o === void 0 ? q(b, u, ze | Ve, t, l) : o))
441
+ return !1;
442
+ }
443
+ }
444
+ return !0;
445
+ }
446
+ function In(n) {
447
+ return n === n && !ln(n);
448
+ }
449
+ function nt(n) {
450
+ for (var r = $(n), e = r.length; e--; ) {
451
+ var t = r[e], f = n[t];
452
+ r[e] = [t, f, In(f)];
453
+ }
454
+ return r;
455
+ }
456
+ function vn(n, r) {
457
+ return function(e) {
458
+ return e == null ? !1 : e[n] === r && (r !== void 0 || n in Object(e));
459
+ };
460
+ }
461
+ function rt(n) {
462
+ var r = nt(n);
463
+ return r.length == 1 && r[0][2] ? vn(r[0][0], r[0][1]) : function(e) {
464
+ return e === n || ke(e, n, r);
465
+ };
466
+ }
467
+ function et(n, r) {
468
+ return n != null && r in Object(n);
469
+ }
470
+ function tt(n, r, e) {
471
+ r = An(r, n);
472
+ for (var t = -1, f = r.length, i = !1; ++t < f; ) {
473
+ var a = m(r[t]);
474
+ if (!(i = n != null && e(n, a)))
475
+ break;
476
+ n = n[a];
477
+ }
478
+ return i || ++t != f ? i : (f = n == null ? 0 : n.length, !!f && Hn(f) && qn(a, f) && (T(n) || un(n)));
479
+ }
480
+ function it(n, r) {
481
+ return n != null && tt(n, r, et);
482
+ }
483
+ var ft = 1, at = 2;
484
+ function st(n, r) {
485
+ return N(n) && In(r) ? vn(m(n), r) : function(e) {
486
+ var t = sr(e, n);
487
+ return t === void 0 && t === r ? it(e, n) : q(r, t, ft | at);
488
+ };
489
+ }
490
+ function ut(n) {
491
+ return function(r) {
492
+ return r == null ? void 0 : r[n];
493
+ };
494
+ }
495
+ function ot(n) {
496
+ return function(r) {
497
+ return yn(r, n);
498
+ };
499
+ }
500
+ function gt(n) {
501
+ return N(n) ? ut(m(n)) : ot(n);
502
+ }
503
+ function Ln(n) {
504
+ return typeof n == "function" ? n : n == null ? cn : typeof n == "object" ? T(n) ? st(n[0], n[1]) : rt(n) : gt(n);
505
+ }
506
+ function lt(n, r) {
507
+ return n && Yn(n, r, $);
508
+ }
509
+ function ct(n, r) {
510
+ return function(e, t) {
511
+ if (e == null)
512
+ return e;
513
+ if (!sn(e))
514
+ return n(e, t);
515
+ for (var f = e.length, i = -1, a = Object(e); ++i < f && t(a[i], i, a) !== !1; )
516
+ ;
517
+ return e;
518
+ };
519
+ }
520
+ var Y = ct(lt);
521
+ function bt(n) {
522
+ return typeof n == "function" ? n : cn;
523
+ }
524
+ function $t(n, r) {
525
+ var e = T(n) ? pn : Y;
526
+ return e(n, bt(r));
527
+ }
528
+ function dt(n, r) {
529
+ var e = [];
530
+ return Y(n, function(t, f, i) {
531
+ r(t, f, i) && e.push(t);
532
+ }), e;
533
+ }
534
+ function _t(n, r) {
535
+ var e = T(n) ? Tn : dt;
536
+ return e(n, Ln(r));
537
+ }
538
+ function pt(n, r) {
539
+ return bn(r, function(e) {
540
+ return n[e];
541
+ });
542
+ }
543
+ function St(n) {
544
+ return n == null ? [] : pt(n, $(n));
545
+ }
546
+ function Et(n) {
547
+ return n === void 0;
548
+ }
549
+ function At(n, r, e, t, f) {
550
+ return f(n, function(i, a, s) {
551
+ e = t ? (t = !1, i) : r(e, i, a, s);
552
+ }), e;
553
+ }
554
+ function Pt(n, r, e) {
555
+ var t = T(n) ? or : At, f = arguments.length < 3;
556
+ return t(n, Ln(r), e, f, Y);
557
+ }
558
+ var yt = 1 / 0, Tt = M && 1 / H(new M([, -0]))[1] == yt ? function(n) {
559
+ return new M(n);
560
+ } : Xn, ht = 200;
561
+ function It(n, r, e) {
562
+ var t = -1, f = Vn, i = n.length, a = !0, s = [], u = s;
563
+ if (i >= ht) {
564
+ var b = r ? null : Tt(n);
565
+ if (b)
566
+ return H(b);
567
+ a = !1, f = En, u = new P();
568
+ } else
569
+ u = r ? [] : s;
570
+ n:
571
+ for (; ++t < i; ) {
572
+ var l = n[t], o = r ? r(l) : l;
573
+ if (l = l !== 0 ? l : 0, a && o === o) {
574
+ for (var c = u.length; c--; )
575
+ if (u[c] === o)
576
+ continue n;
577
+ r && u.push(o), s.push(l);
578
+ } else f(u, o, e) || (u !== s && u.push(o), s.push(l));
579
+ }
580
+ return s;
581
+ }
582
+ export {
583
+ Tn as A,
584
+ dt as B,
585
+ Pe as C,
586
+ Xn as D,
587
+ P as S,
588
+ It as a,
589
+ C as b,
590
+ Ot as c,
591
+ $t as d,
592
+ B as e,
593
+ _t as f,
594
+ Ln as g,
595
+ Jn as h,
596
+ Et as i,
597
+ Y as j,
598
+ $ as k,
599
+ bn as l,
600
+ tt as m,
601
+ An as n,
602
+ yn as o,
603
+ bt as p,
604
+ lt as q,
605
+ Pt as r,
606
+ it as s,
607
+ m as t,
608
+ ar as u,
609
+ St as v,
610
+ Vn as w,
611
+ En as x,
612
+ zn as y,
613
+ yr as z
614
+ };
src/backend/gradio_dropdownplus/templates/component/arc-Bt6Yqp6j.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { a0 as ln, a1 as an, a2 as H, a3 as q, a4 as B, a5 as un, a6 as y, a7 as tn, a8 as L, a9 as _, aa as rn, ab as o, ac as sn, ad as on, ae as fn } from "./mermaid.core-DH6TRyjK.js";
2
+ function cn(l) {
3
+ return l.innerRadius;
4
+ }
5
+ function yn(l) {
6
+ return l.outerRadius;
7
+ }
8
+ function gn(l) {
9
+ return l.startAngle;
10
+ }
11
+ function dn(l) {
12
+ return l.endAngle;
13
+ }
14
+ function mn(l) {
15
+ return l && l.padAngle;
16
+ }
17
+ function pn(l, h, I, D, v, A, C, a) {
18
+ var O = I - l, i = D - h, n = C - v, d = a - A, u = d * O - n * i;
19
+ if (!(u * u < y))
20
+ return u = (n * (h - A) - d * (l - v)) / u, [l + u * O, h + u * i];
21
+ }
22
+ function W(l, h, I, D, v, A, C) {
23
+ var a = l - I, O = h - D, i = (C ? A : -A) / L(a * a + O * O), n = i * O, d = -i * a, u = l + n, s = h + d, f = I + n, c = D + d, F = (u + f) / 2, t = (s + c) / 2, m = f - u, g = c - s, R = m * m + g * g, T = v - A, P = u * c - f * s, S = (g < 0 ? -1 : 1) * L(on(0, T * T * R - P * P)), j = (P * g - m * S) / R, z = (-P * m - g * S) / R, w = (P * g + m * S) / R, p = (-P * m + g * S) / R, x = j - F, e = z - t, r = w - F, G = p - t;
24
+ return x * x + e * e > r * r + G * G && (j = w, z = p), {
25
+ cx: j,
26
+ cy: z,
27
+ x01: -n,
28
+ y01: -d,
29
+ x11: j * (v / T - 1),
30
+ y11: z * (v / T - 1)
31
+ };
32
+ }
33
+ function hn() {
34
+ var l = cn, h = yn, I = B(0), D = null, v = gn, A = dn, C = mn, a = null, O = ln(i);
35
+ function i() {
36
+ var n, d, u = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - un, c = A.apply(this, arguments) - un, F = rn(c - f), t = c > f;
37
+ if (a || (a = n = O()), s < u && (d = s, s = u, u = d), !(s > y)) a.moveTo(0, 0);
38
+ else if (F > tn - y)
39
+ a.moveTo(s * H(f), s * q(f)), a.arc(0, 0, s, f, c, !t), u > y && (a.moveTo(u * H(c), u * q(c)), a.arc(0, 0, u, c, f, t));
40
+ else {
41
+ var m = f, g = c, R = f, T = c, P = F, S = F, j = C.apply(this, arguments) / 2, z = j > y && (D ? +D.apply(this, arguments) : L(u * u + s * s)), w = _(rn(s - u) / 2, +I.apply(this, arguments)), p = w, x = w, e, r;
42
+ if (z > y) {
43
+ var G = sn(z / u * q(j)), M = sn(z / s * q(j));
44
+ (P -= G * 2) > y ? (G *= t ? 1 : -1, R += G, T -= G) : (P = 0, R = T = (f + c) / 2), (S -= M * 2) > y ? (M *= t ? 1 : -1, m += M, g -= M) : (S = 0, m = g = (f + c) / 2);
45
+ }
46
+ var J = s * H(m), K = s * q(m), N = u * H(T), Q = u * q(T);
47
+ if (w > y) {
48
+ var U = s * H(g), V = s * q(g), X = u * H(R), Y = u * q(R), E;
49
+ if (F < an)
50
+ if (E = pn(J, K, X, Y, U, V, N, Q)) {
51
+ var Z = J - E[0], $ = K - E[1], b = U - E[0], k = V - E[1], nn = 1 / q(fn((Z * b + $ * k) / (L(Z * Z + $ * $) * L(b * b + k * k))) / 2), en = L(E[0] * E[0] + E[1] * E[1]);
52
+ p = _(w, (u - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
53
+ } else
54
+ p = x = 0;
55
+ }
56
+ S > y ? x > y ? (e = W(X, Y, J, K, s, x, t), r = W(U, V, N, Q, s, x, t), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, s, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), !t), a.arc(r.cx, r.cy, x, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : (a.moveTo(J, K), a.arc(0, 0, s, m, g, !t)) : a.moveTo(J, K), !(u > y) || !(P > y) ? a.lineTo(N, Q) : p > y ? (e = W(N, Q, U, V, u, -p, t), r = W(J, K, X, Y, u, -p, t), a.lineTo(e.cx + e.x01, e.cy + e.y01), p < w ? a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, u, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), t), a.arc(r.cx, r.cy, p, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : a.arc(0, 0, u, T, R, t);
57
+ }
58
+ if (a.closePath(), n) return a = null, n + "" || null;
59
+ }
60
+ return i.centroid = function() {
61
+ var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, d = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
62
+ return [H(d) * n, q(d) * n];
63
+ }, i.innerRadius = function(n) {
64
+ return arguments.length ? (l = typeof n == "function" ? n : B(+n), i) : l;
65
+ }, i.outerRadius = function(n) {
66
+ return arguments.length ? (h = typeof n == "function" ? n : B(+n), i) : h;
67
+ }, i.cornerRadius = function(n) {
68
+ return arguments.length ? (I = typeof n == "function" ? n : B(+n), i) : I;
69
+ }, i.padRadius = function(n) {
70
+ return arguments.length ? (D = n == null ? null : typeof n == "function" ? n : B(+n), i) : D;
71
+ }, i.startAngle = function(n) {
72
+ return arguments.length ? (v = typeof n == "function" ? n : B(+n), i) : v;
73
+ }, i.endAngle = function(n) {
74
+ return arguments.length ? (A = typeof n == "function" ? n : B(+n), i) : A;
75
+ }, i.padAngle = function(n) {
76
+ return arguments.length ? (C = typeof n == "function" ? n : B(+n), i) : C;
77
+ }, i.context = function(n) {
78
+ return arguments.length ? (a = n ?? null, i) : a;
79
+ }, i;
80
+ }
81
+ export {
82
+ hn as d
83
+ };
src/backend/gradio_dropdownplus/templates/component/architectureDiagram-KFL7JDKH-wk_kwIXK.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/blockDiagram-ZYB65J3Q-DNWCWPbh.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/c4Diagram-AAMF2YG6-BeY_xb6D.js ADDED
@@ -0,0 +1,1581 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { g as Se, d as De } from "./chunk-OMD6QJNC-DamKp1kC.js";
2
+ import { _ as g, s as Pe, g as Be, a as Ie, b as Me, c as Bt, d as jt, l as de, e as Le, f as Ne, h as Tt, i as ge, j as Ye, w as je, k as $t, m as fe } from "./mermaid.core-DH6TRyjK.js";
3
+ var Ft = function() {
4
+ var e = /* @__PURE__ */ g(function(_t, x, m, v) {
5
+ for (m = m || {}, v = _t.length; v--; m[_t[v]] = x) ;
6
+ return m;
7
+ }, "o"), t = [1, 24], s = [1, 25], o = [1, 26], l = [1, 27], a = [1, 28], r = [1, 63], n = [1, 64], i = [1, 65], u = [1, 66], d = [1, 67], f = [1, 68], y = [1, 69], E = [1, 29], O = [1, 30], S = [1, 31], P = [1, 32], M = [1, 33], U = [1, 34], H = [1, 35], q = [1, 36], G = [1, 37], K = [1, 38], J = [1, 39], Z = [1, 40], $ = [1, 41], tt = [1, 42], et = [1, 43], at = [1, 44], it = [1, 45], nt = [1, 46], rt = [1, 47], st = [1, 48], lt = [1, 50], ot = [1, 51], ct = [1, 52], ht = [1, 53], ut = [1, 54], dt = [1, 55], ft = [1, 56], pt = [1, 57], yt = [1, 58], gt = [1, 59], bt = [1, 60], Ct = [14, 42], Qt = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], St = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], k = [1, 82], A = [1, 83], C = [1, 84], w = [1, 85], T = [12, 14, 42], le = [12, 14, 33, 42], Mt = [12, 14, 33, 42, 76, 77, 79, 80], vt = [12, 33], Ht = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], qt = {
8
+ trace: /* @__PURE__ */ g(function() {
9
+ }, "trace"),
10
+ yy: {},
11
+ symbols_: { error: 2, start: 3, mermaidDoc: 4, direction: 5, direction_tb: 6, direction_bt: 7, direction_rl: 8, direction_lr: 9, graphConfig: 10, C4_CONTEXT: 11, NEWLINE: 12, statements: 13, EOF: 14, C4_CONTAINER: 15, C4_COMPONENT: 16, C4_DYNAMIC: 17, C4_DEPLOYMENT: 18, otherStatements: 19, diagramStatements: 20, otherStatement: 21, title: 22, accDescription: 23, acc_title: 24, acc_title_value: 25, acc_descr: 26, acc_descr_value: 27, acc_descr_multiline_value: 28, boundaryStatement: 29, boundaryStartStatement: 30, boundaryStopStatement: 31, boundaryStart: 32, LBRACE: 33, ENTERPRISE_BOUNDARY: 34, attributes: 35, SYSTEM_BOUNDARY: 36, BOUNDARY: 37, CONTAINER_BOUNDARY: 38, NODE: 39, NODE_L: 40, NODE_R: 41, RBRACE: 42, diagramStatement: 43, PERSON: 44, PERSON_EXT: 45, SYSTEM: 46, SYSTEM_DB: 47, SYSTEM_QUEUE: 48, SYSTEM_EXT: 49, SYSTEM_EXT_DB: 50, SYSTEM_EXT_QUEUE: 51, CONTAINER: 52, CONTAINER_DB: 53, CONTAINER_QUEUE: 54, CONTAINER_EXT: 55, CONTAINER_EXT_DB: 56, CONTAINER_EXT_QUEUE: 57, COMPONENT: 58, COMPONENT_DB: 59, COMPONENT_QUEUE: 60, COMPONENT_EXT: 61, COMPONENT_EXT_DB: 62, COMPONENT_EXT_QUEUE: 63, REL: 64, BIREL: 65, REL_U: 66, REL_D: 67, REL_L: 68, REL_R: 69, REL_B: 70, REL_INDEX: 71, UPDATE_EL_STYLE: 72, UPDATE_REL_STYLE: 73, UPDATE_LAYOUT_CONFIG: 74, attribute: 75, STR: 76, STR_KEY: 77, STR_VALUE: 78, ATTRIBUTE: 79, ATTRIBUTE_EMPTY: 80, $accept: 0, $end: 1 },
12
+ terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" },
13
+ productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]],
14
+ performAction: /* @__PURE__ */ g(function(x, m, v, b, R, h, Dt) {
15
+ var p = h.length - 1;
16
+ switch (R) {
17
+ case 3:
18
+ b.setDirection("TB");
19
+ break;
20
+ case 4:
21
+ b.setDirection("BT");
22
+ break;
23
+ case 5:
24
+ b.setDirection("RL");
25
+ break;
26
+ case 6:
27
+ b.setDirection("LR");
28
+ break;
29
+ case 8:
30
+ case 9:
31
+ case 10:
32
+ case 11:
33
+ case 12:
34
+ b.setC4Type(h[p - 3]);
35
+ break;
36
+ case 19:
37
+ b.setTitle(h[p].substring(6)), this.$ = h[p].substring(6);
38
+ break;
39
+ case 20:
40
+ b.setAccDescription(h[p].substring(15)), this.$ = h[p].substring(15);
41
+ break;
42
+ case 21:
43
+ this.$ = h[p].trim(), b.setTitle(this.$);
44
+ break;
45
+ case 22:
46
+ case 23:
47
+ this.$ = h[p].trim(), b.setAccDescription(this.$);
48
+ break;
49
+ case 28:
50
+ h[p].splice(2, 0, "ENTERPRISE"), b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
51
+ break;
52
+ case 29:
53
+ h[p].splice(2, 0, "SYSTEM"), b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
54
+ break;
55
+ case 30:
56
+ b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
57
+ break;
58
+ case 31:
59
+ h[p].splice(2, 0, "CONTAINER"), b.addContainerBoundary(...h[p]), this.$ = h[p];
60
+ break;
61
+ case 32:
62
+ b.addDeploymentNode("node", ...h[p]), this.$ = h[p];
63
+ break;
64
+ case 33:
65
+ b.addDeploymentNode("nodeL", ...h[p]), this.$ = h[p];
66
+ break;
67
+ case 34:
68
+ b.addDeploymentNode("nodeR", ...h[p]), this.$ = h[p];
69
+ break;
70
+ case 35:
71
+ b.popBoundaryParseStack();
72
+ break;
73
+ case 39:
74
+ b.addPersonOrSystem("person", ...h[p]), this.$ = h[p];
75
+ break;
76
+ case 40:
77
+ b.addPersonOrSystem("external_person", ...h[p]), this.$ = h[p];
78
+ break;
79
+ case 41:
80
+ b.addPersonOrSystem("system", ...h[p]), this.$ = h[p];
81
+ break;
82
+ case 42:
83
+ b.addPersonOrSystem("system_db", ...h[p]), this.$ = h[p];
84
+ break;
85
+ case 43:
86
+ b.addPersonOrSystem("system_queue", ...h[p]), this.$ = h[p];
87
+ break;
88
+ case 44:
89
+ b.addPersonOrSystem("external_system", ...h[p]), this.$ = h[p];
90
+ break;
91
+ case 45:
92
+ b.addPersonOrSystem("external_system_db", ...h[p]), this.$ = h[p];
93
+ break;
94
+ case 46:
95
+ b.addPersonOrSystem("external_system_queue", ...h[p]), this.$ = h[p];
96
+ break;
97
+ case 47:
98
+ b.addContainer("container", ...h[p]), this.$ = h[p];
99
+ break;
100
+ case 48:
101
+ b.addContainer("container_db", ...h[p]), this.$ = h[p];
102
+ break;
103
+ case 49:
104
+ b.addContainer("container_queue", ...h[p]), this.$ = h[p];
105
+ break;
106
+ case 50:
107
+ b.addContainer("external_container", ...h[p]), this.$ = h[p];
108
+ break;
109
+ case 51:
110
+ b.addContainer("external_container_db", ...h[p]), this.$ = h[p];
111
+ break;
112
+ case 52:
113
+ b.addContainer("external_container_queue", ...h[p]), this.$ = h[p];
114
+ break;
115
+ case 53:
116
+ b.addComponent("component", ...h[p]), this.$ = h[p];
117
+ break;
118
+ case 54:
119
+ b.addComponent("component_db", ...h[p]), this.$ = h[p];
120
+ break;
121
+ case 55:
122
+ b.addComponent("component_queue", ...h[p]), this.$ = h[p];
123
+ break;
124
+ case 56:
125
+ b.addComponent("external_component", ...h[p]), this.$ = h[p];
126
+ break;
127
+ case 57:
128
+ b.addComponent("external_component_db", ...h[p]), this.$ = h[p];
129
+ break;
130
+ case 58:
131
+ b.addComponent("external_component_queue", ...h[p]), this.$ = h[p];
132
+ break;
133
+ case 60:
134
+ b.addRel("rel", ...h[p]), this.$ = h[p];
135
+ break;
136
+ case 61:
137
+ b.addRel("birel", ...h[p]), this.$ = h[p];
138
+ break;
139
+ case 62:
140
+ b.addRel("rel_u", ...h[p]), this.$ = h[p];
141
+ break;
142
+ case 63:
143
+ b.addRel("rel_d", ...h[p]), this.$ = h[p];
144
+ break;
145
+ case 64:
146
+ b.addRel("rel_l", ...h[p]), this.$ = h[p];
147
+ break;
148
+ case 65:
149
+ b.addRel("rel_r", ...h[p]), this.$ = h[p];
150
+ break;
151
+ case 66:
152
+ b.addRel("rel_b", ...h[p]), this.$ = h[p];
153
+ break;
154
+ case 67:
155
+ h[p].splice(0, 1), b.addRel("rel", ...h[p]), this.$ = h[p];
156
+ break;
157
+ case 68:
158
+ b.updateElStyle("update_el_style", ...h[p]), this.$ = h[p];
159
+ break;
160
+ case 69:
161
+ b.updateRelStyle("update_rel_style", ...h[p]), this.$ = h[p];
162
+ break;
163
+ case 70:
164
+ b.updateLayoutConfig("update_layout_config", ...h[p]), this.$ = h[p];
165
+ break;
166
+ case 71:
167
+ this.$ = [h[p]];
168
+ break;
169
+ case 72:
170
+ h[p].unshift(h[p - 1]), this.$ = h[p];
171
+ break;
172
+ case 73:
173
+ case 75:
174
+ this.$ = h[p].trim();
175
+ break;
176
+ case 74:
177
+ let Et = {};
178
+ Et[h[p - 1].trim()] = h[p].trim(), this.$ = Et;
179
+ break;
180
+ case 76:
181
+ this.$ = "";
182
+ break;
183
+ }
184
+ }, "anonymous"),
185
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 14: [1, 74] }, e(Ct, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }), e(Ct, [2, 14]), e(Qt, [2, 16], { 12: [1, 76] }), e(Ct, [2, 36], { 12: [1, 77] }), e(St, [2, 19]), e(St, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, e(St, [2, 23]), { 35: 80, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 86, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 87, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 88, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 89, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 90, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 91, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 92, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 93, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 94, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 95, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 96, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 97, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 98, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 99, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 100, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 101, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 102, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 103, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 104, 75: 81, 76: k, 77: A, 79: C, 80: w }, e(T, [2, 59]), { 35: 105, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 106, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 107, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 108, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 109, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 110, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 111, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 112, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 113, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 114, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 115, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 120, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 121, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 122, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 123, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 124, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 125, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, e(Ct, [2, 15]), e(Qt, [2, 17], { 21: 22, 19: 130, 22: t, 23: s, 24: o, 26: l, 28: a }), e(Ct, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: t, 23: s, 24: o, 26: l, 28: a, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }), e(St, [2, 21]), e(St, [2, 22]), e(T, [2, 39]), e(le, [2, 71], { 75: 81, 35: 132, 76: k, 77: A, 79: C, 80: w }), e(Mt, [2, 73]), { 78: [1, 133] }, e(Mt, [2, 75]), e(Mt, [2, 76]), e(T, [2, 40]), e(T, [2, 41]), e(T, [2, 42]), e(T, [2, 43]), e(T, [2, 44]), e(T, [2, 45]), e(T, [2, 46]), e(T, [2, 47]), e(T, [2, 48]), e(T, [2, 49]), e(T, [2, 50]), e(T, [2, 51]), e(T, [2, 52]), e(T, [2, 53]), e(T, [2, 54]), e(T, [2, 55]), e(T, [2, 56]), e(T, [2, 57]), e(T, [2, 58]), e(T, [2, 60]), e(T, [2, 61]), e(T, [2, 62]), e(T, [2, 63]), e(T, [2, 64]), e(T, [2, 65]), e(T, [2, 66]), e(T, [2, 67]), e(T, [2, 68]), e(T, [2, 69]), e(T, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, e(vt, [2, 28]), e(vt, [2, 29]), e(vt, [2, 30]), e(vt, [2, 31]), e(vt, [2, 32]), e(vt, [2, 33]), e(vt, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, e(Qt, [2, 18]), e(Ct, [2, 38]), e(le, [2, 72]), e(Mt, [2, 74]), e(T, [2, 24]), e(T, [2, 35]), e(Ht, [2, 25]), e(Ht, [2, 26], { 12: [1, 138] }), e(Ht, [2, 27])],
186
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] },
187
+ parseError: /* @__PURE__ */ g(function(x, m) {
188
+ if (m.recoverable)
189
+ this.trace(x);
190
+ else {
191
+ var v = new Error(x);
192
+ throw v.hash = m, v;
193
+ }
194
+ }, "parseError"),
195
+ parse: /* @__PURE__ */ g(function(x) {
196
+ var m = this, v = [0], b = [], R = [null], h = [], Dt = this.table, p = "", Et = 0, oe = 0, we = 2, ce = 1, Te = h.slice.call(arguments, 1), D = Object.create(this.lexer), kt = { yy: {} };
197
+ for (var Gt in this.yy)
198
+ Object.prototype.hasOwnProperty.call(this.yy, Gt) && (kt.yy[Gt] = this.yy[Gt]);
199
+ D.setInput(x, kt.yy), kt.yy.lexer = D, kt.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
200
+ var Kt = D.yylloc;
201
+ h.push(Kt);
202
+ var Oe = D.options && D.options.ranges;
203
+ typeof kt.yy.parseError == "function" ? this.parseError = kt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
204
+ function Re(L) {
205
+ v.length = v.length - 2 * L, R.length = R.length - L, h.length = h.length - L;
206
+ }
207
+ g(Re, "popStack");
208
+ function he() {
209
+ var L;
210
+ return L = b.pop() || D.lex() || ce, typeof L != "number" && (L instanceof Array && (b = L, L = b.pop()), L = m.symbols_[L] || L), L;
211
+ }
212
+ g(he, "lex");
213
+ for (var I, At, N, Jt, wt = {}, Nt, W, ue, Yt; ; ) {
214
+ if (At = v[v.length - 1], this.defaultActions[At] ? N = this.defaultActions[At] : ((I === null || typeof I > "u") && (I = he()), N = Dt[At] && Dt[At][I]), typeof N > "u" || !N.length || !N[0]) {
215
+ var Zt = "";
216
+ Yt = [];
217
+ for (Nt in Dt[At])
218
+ this.terminals_[Nt] && Nt > we && Yt.push("'" + this.terminals_[Nt] + "'");
219
+ D.showPosition ? Zt = "Parse error on line " + (Et + 1) + `:
220
+ ` + D.showPosition() + `
221
+ Expecting ` + Yt.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : Zt = "Parse error on line " + (Et + 1) + ": Unexpected " + (I == ce ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(Zt, {
222
+ text: D.match,
223
+ token: this.terminals_[I] || I,
224
+ line: D.yylineno,
225
+ loc: Kt,
226
+ expected: Yt
227
+ });
228
+ }
229
+ if (N[0] instanceof Array && N.length > 1)
230
+ throw new Error("Parse Error: multiple actions possible at state: " + At + ", token: " + I);
231
+ switch (N[0]) {
232
+ case 1:
233
+ v.push(I), R.push(D.yytext), h.push(D.yylloc), v.push(N[1]), I = null, oe = D.yyleng, p = D.yytext, Et = D.yylineno, Kt = D.yylloc;
234
+ break;
235
+ case 2:
236
+ if (W = this.productions_[N[1]][1], wt.$ = R[R.length - W], wt._$ = {
237
+ first_line: h[h.length - (W || 1)].first_line,
238
+ last_line: h[h.length - 1].last_line,
239
+ first_column: h[h.length - (W || 1)].first_column,
240
+ last_column: h[h.length - 1].last_column
241
+ }, Oe && (wt._$.range = [
242
+ h[h.length - (W || 1)].range[0],
243
+ h[h.length - 1].range[1]
244
+ ]), Jt = this.performAction.apply(wt, [
245
+ p,
246
+ oe,
247
+ Et,
248
+ kt.yy,
249
+ N[1],
250
+ R,
251
+ h
252
+ ].concat(Te)), typeof Jt < "u")
253
+ return Jt;
254
+ W && (v = v.slice(0, -1 * W * 2), R = R.slice(0, -1 * W), h = h.slice(0, -1 * W)), v.push(this.productions_[N[1]][0]), R.push(wt.$), h.push(wt._$), ue = Dt[v[v.length - 2]][v[v.length - 1]], v.push(ue);
255
+ break;
256
+ case 3:
257
+ return !0;
258
+ }
259
+ }
260
+ return !0;
261
+ }, "parse")
262
+ }, Ce = /* @__PURE__ */ function() {
263
+ var _t = {
264
+ EOF: 1,
265
+ parseError: /* @__PURE__ */ g(function(m, v) {
266
+ if (this.yy.parser)
267
+ this.yy.parser.parseError(m, v);
268
+ else
269
+ throw new Error(m);
270
+ }, "parseError"),
271
+ // resets the lexer, sets new input
272
+ setInput: /* @__PURE__ */ g(function(x, m) {
273
+ return this.yy = m || this.yy || {}, this._input = x, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
274
+ first_line: 1,
275
+ first_column: 0,
276
+ last_line: 1,
277
+ last_column: 0
278
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
279
+ }, "setInput"),
280
+ // consumes and returns one char from the input
281
+ input: /* @__PURE__ */ g(function() {
282
+ var x = this._input[0];
283
+ this.yytext += x, this.yyleng++, this.offset++, this.match += x, this.matched += x;
284
+ var m = x.match(/(?:\r\n?|\n).*/g);
285
+ return m ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), x;
286
+ }, "input"),
287
+ // unshifts one char (or a string) into the input
288
+ unput: /* @__PURE__ */ g(function(x) {
289
+ var m = x.length, v = x.split(/(?:\r\n?|\n)/g);
290
+ this._input = x + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - m), this.offset -= m;
291
+ var b = this.match.split(/(?:\r\n?|\n)/g);
292
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), v.length - 1 && (this.yylineno -= v.length - 1);
293
+ var R = this.yylloc.range;
294
+ return this.yylloc = {
295
+ first_line: this.yylloc.first_line,
296
+ last_line: this.yylineno + 1,
297
+ first_column: this.yylloc.first_column,
298
+ last_column: v ? (v.length === b.length ? this.yylloc.first_column : 0) + b[b.length - v.length].length - v[0].length : this.yylloc.first_column - m
299
+ }, this.options.ranges && (this.yylloc.range = [R[0], R[0] + this.yyleng - m]), this.yyleng = this.yytext.length, this;
300
+ }, "unput"),
301
+ // When called from action, caches matched text and appends it on next action
302
+ more: /* @__PURE__ */ g(function() {
303
+ return this._more = !0, this;
304
+ }, "more"),
305
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
306
+ reject: /* @__PURE__ */ g(function() {
307
+ if (this.options.backtrack_lexer)
308
+ this._backtrack = !0;
309
+ else
310
+ return 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).
311
+ ` + this.showPosition(), {
312
+ text: "",
313
+ token: null,
314
+ line: this.yylineno
315
+ });
316
+ return this;
317
+ }, "reject"),
318
+ // retain first n characters of the match
319
+ less: /* @__PURE__ */ g(function(x) {
320
+ this.unput(this.match.slice(x));
321
+ }, "less"),
322
+ // displays already matched input, i.e. for error messages
323
+ pastInput: /* @__PURE__ */ g(function() {
324
+ var x = this.matched.substr(0, this.matched.length - this.match.length);
325
+ return (x.length > 20 ? "..." : "") + x.substr(-20).replace(/\n/g, "");
326
+ }, "pastInput"),
327
+ // displays upcoming input, i.e. for error messages
328
+ upcomingInput: /* @__PURE__ */ g(function() {
329
+ var x = this.match;
330
+ return x.length < 20 && (x += this._input.substr(0, 20 - x.length)), (x.substr(0, 20) + (x.length > 20 ? "..." : "")).replace(/\n/g, "");
331
+ }, "upcomingInput"),
332
+ // displays the character position where the lexing error occurred, i.e. for error messages
333
+ showPosition: /* @__PURE__ */ g(function() {
334
+ var x = this.pastInput(), m = new Array(x.length + 1).join("-");
335
+ return x + this.upcomingInput() + `
336
+ ` + m + "^";
337
+ }, "showPosition"),
338
+ // test the lexed token: return FALSE when not a match, otherwise return token
339
+ test_match: /* @__PURE__ */ g(function(x, m) {
340
+ var v, b, R;
341
+ if (this.options.backtrack_lexer && (R = {
342
+ yylineno: this.yylineno,
343
+ yylloc: {
344
+ first_line: this.yylloc.first_line,
345
+ last_line: this.last_line,
346
+ first_column: this.yylloc.first_column,
347
+ last_column: this.yylloc.last_column
348
+ },
349
+ yytext: this.yytext,
350
+ match: this.match,
351
+ matches: this.matches,
352
+ matched: this.matched,
353
+ yyleng: this.yyleng,
354
+ offset: this.offset,
355
+ _more: this._more,
356
+ _input: this._input,
357
+ yy: this.yy,
358
+ conditionStack: this.conditionStack.slice(0),
359
+ done: this.done
360
+ }, this.options.ranges && (R.yylloc.range = this.yylloc.range.slice(0))), b = x[0].match(/(?:\r\n?|\n).*/g), b && (this.yylineno += b.length), this.yylloc = {
361
+ first_line: this.yylloc.last_line,
362
+ last_line: this.yylineno + 1,
363
+ first_column: this.yylloc.last_column,
364
+ last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + x[0].length
365
+ }, this.yytext += x[0], this.match += x[0], this.matches = x, 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(x[0].length), this.matched += x[0], v = this.performAction.call(this, this.yy, this, m, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), v)
366
+ return v;
367
+ if (this._backtrack) {
368
+ for (var h in R)
369
+ this[h] = R[h];
370
+ return !1;
371
+ }
372
+ return !1;
373
+ }, "test_match"),
374
+ // return next match in input
375
+ next: /* @__PURE__ */ g(function() {
376
+ if (this.done)
377
+ return this.EOF;
378
+ this._input || (this.done = !0);
379
+ var x, m, v, b;
380
+ this._more || (this.yytext = "", this.match = "");
381
+ for (var R = this._currentRules(), h = 0; h < R.length; h++)
382
+ if (v = this._input.match(this.rules[R[h]]), v && (!m || v[0].length > m[0].length)) {
383
+ if (m = v, b = h, this.options.backtrack_lexer) {
384
+ if (x = this.test_match(v, R[h]), x !== !1)
385
+ return x;
386
+ if (this._backtrack) {
387
+ m = !1;
388
+ continue;
389
+ } else
390
+ return !1;
391
+ } else if (!this.options.flex)
392
+ break;
393
+ }
394
+ return m ? (x = this.test_match(m, R[b]), x !== !1 ? x : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
395
+ ` + this.showPosition(), {
396
+ text: "",
397
+ token: null,
398
+ line: this.yylineno
399
+ });
400
+ }, "next"),
401
+ // return next match that has a token
402
+ lex: /* @__PURE__ */ g(function() {
403
+ var m = this.next();
404
+ return m || this.lex();
405
+ }, "lex"),
406
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
407
+ begin: /* @__PURE__ */ g(function(m) {
408
+ this.conditionStack.push(m);
409
+ }, "begin"),
410
+ // pop the previously active lexer condition state off the condition stack
411
+ popState: /* @__PURE__ */ g(function() {
412
+ var m = this.conditionStack.length - 1;
413
+ return m > 0 ? this.conditionStack.pop() : this.conditionStack[0];
414
+ }, "popState"),
415
+ // produce the lexer rule set which is active for the currently active lexer condition state
416
+ _currentRules: /* @__PURE__ */ g(function() {
417
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
418
+ }, "_currentRules"),
419
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
420
+ topState: /* @__PURE__ */ g(function(m) {
421
+ return m = this.conditionStack.length - 1 - Math.abs(m || 0), m >= 0 ? this.conditionStack[m] : "INITIAL";
422
+ }, "topState"),
423
+ // alias for begin(condition)
424
+ pushState: /* @__PURE__ */ g(function(m) {
425
+ this.begin(m);
426
+ }, "pushState"),
427
+ // return the number of states currently on the stack
428
+ stateStackSize: /* @__PURE__ */ g(function() {
429
+ return this.conditionStack.length;
430
+ }, "stateStackSize"),
431
+ options: {},
432
+ performAction: /* @__PURE__ */ g(function(m, v, b, R) {
433
+ switch (b) {
434
+ case 0:
435
+ return 6;
436
+ case 1:
437
+ return 7;
438
+ case 2:
439
+ return 8;
440
+ case 3:
441
+ return 9;
442
+ case 4:
443
+ return 22;
444
+ case 5:
445
+ return 23;
446
+ case 6:
447
+ return this.begin("acc_title"), 24;
448
+ case 7:
449
+ return this.popState(), "acc_title_value";
450
+ case 8:
451
+ return this.begin("acc_descr"), 26;
452
+ case 9:
453
+ return this.popState(), "acc_descr_value";
454
+ case 10:
455
+ this.begin("acc_descr_multiline");
456
+ break;
457
+ case 11:
458
+ this.popState();
459
+ break;
460
+ case 12:
461
+ return "acc_descr_multiline_value";
462
+ case 13:
463
+ break;
464
+ case 14:
465
+ c;
466
+ break;
467
+ case 15:
468
+ return 12;
469
+ case 16:
470
+ break;
471
+ case 17:
472
+ return 11;
473
+ case 18:
474
+ return 15;
475
+ case 19:
476
+ return 16;
477
+ case 20:
478
+ return 17;
479
+ case 21:
480
+ return 18;
481
+ case 22:
482
+ return this.begin("person_ext"), 45;
483
+ case 23:
484
+ return this.begin("person"), 44;
485
+ case 24:
486
+ return this.begin("system_ext_queue"), 51;
487
+ case 25:
488
+ return this.begin("system_ext_db"), 50;
489
+ case 26:
490
+ return this.begin("system_ext"), 49;
491
+ case 27:
492
+ return this.begin("system_queue"), 48;
493
+ case 28:
494
+ return this.begin("system_db"), 47;
495
+ case 29:
496
+ return this.begin("system"), 46;
497
+ case 30:
498
+ return this.begin("boundary"), 37;
499
+ case 31:
500
+ return this.begin("enterprise_boundary"), 34;
501
+ case 32:
502
+ return this.begin("system_boundary"), 36;
503
+ case 33:
504
+ return this.begin("container_ext_queue"), 57;
505
+ case 34:
506
+ return this.begin("container_ext_db"), 56;
507
+ case 35:
508
+ return this.begin("container_ext"), 55;
509
+ case 36:
510
+ return this.begin("container_queue"), 54;
511
+ case 37:
512
+ return this.begin("container_db"), 53;
513
+ case 38:
514
+ return this.begin("container"), 52;
515
+ case 39:
516
+ return this.begin("container_boundary"), 38;
517
+ case 40:
518
+ return this.begin("component_ext_queue"), 63;
519
+ case 41:
520
+ return this.begin("component_ext_db"), 62;
521
+ case 42:
522
+ return this.begin("component_ext"), 61;
523
+ case 43:
524
+ return this.begin("component_queue"), 60;
525
+ case 44:
526
+ return this.begin("component_db"), 59;
527
+ case 45:
528
+ return this.begin("component"), 58;
529
+ case 46:
530
+ return this.begin("node"), 39;
531
+ case 47:
532
+ return this.begin("node"), 39;
533
+ case 48:
534
+ return this.begin("node_l"), 40;
535
+ case 49:
536
+ return this.begin("node_r"), 41;
537
+ case 50:
538
+ return this.begin("rel"), 64;
539
+ case 51:
540
+ return this.begin("birel"), 65;
541
+ case 52:
542
+ return this.begin("rel_u"), 66;
543
+ case 53:
544
+ return this.begin("rel_u"), 66;
545
+ case 54:
546
+ return this.begin("rel_d"), 67;
547
+ case 55:
548
+ return this.begin("rel_d"), 67;
549
+ case 56:
550
+ return this.begin("rel_l"), 68;
551
+ case 57:
552
+ return this.begin("rel_l"), 68;
553
+ case 58:
554
+ return this.begin("rel_r"), 69;
555
+ case 59:
556
+ return this.begin("rel_r"), 69;
557
+ case 60:
558
+ return this.begin("rel_b"), 70;
559
+ case 61:
560
+ return this.begin("rel_index"), 71;
561
+ case 62:
562
+ return this.begin("update_el_style"), 72;
563
+ case 63:
564
+ return this.begin("update_rel_style"), 73;
565
+ case 64:
566
+ return this.begin("update_layout_config"), 74;
567
+ case 65:
568
+ return "EOF_IN_STRUCT";
569
+ case 66:
570
+ return this.begin("attribute"), "ATTRIBUTE_EMPTY";
571
+ case 67:
572
+ this.begin("attribute");
573
+ break;
574
+ case 68:
575
+ this.popState(), this.popState();
576
+ break;
577
+ case 69:
578
+ return 80;
579
+ case 70:
580
+ break;
581
+ case 71:
582
+ return 80;
583
+ case 72:
584
+ this.begin("string");
585
+ break;
586
+ case 73:
587
+ this.popState();
588
+ break;
589
+ case 74:
590
+ return "STR";
591
+ case 75:
592
+ this.begin("string_kv");
593
+ break;
594
+ case 76:
595
+ return this.begin("string_kv_key"), "STR_KEY";
596
+ case 77:
597
+ this.popState(), this.begin("string_kv_value");
598
+ break;
599
+ case 78:
600
+ return "STR_VALUE";
601
+ case 79:
602
+ this.popState(), this.popState();
603
+ break;
604
+ case 80:
605
+ return "STR";
606
+ case 81:
607
+ return "LBRACE";
608
+ case 82:
609
+ return "RBRACE";
610
+ case 83:
611
+ return "SPACE";
612
+ case 84:
613
+ return "EOL";
614
+ case 85:
615
+ return 14;
616
+ }
617
+ }, "anonymous"),
618
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
619
+ conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, string_kv_value: { rules: [78, 79], inclusive: !1 }, string_kv_key: { rules: [77], inclusive: !1 }, string_kv: { rules: [76], inclusive: !1 }, string: { rules: [73, 74], inclusive: !1 }, attribute: { rules: [68, 69, 70, 71, 72, 75, 80], inclusive: !1 }, update_layout_config: { rules: [65, 66, 67, 68], inclusive: !1 }, update_rel_style: { rules: [65, 66, 67, 68], inclusive: !1 }, update_el_style: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_b: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_r: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_l: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_d: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_u: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [65, 66, 67, 68], inclusive: !1 }, node_r: { rules: [65, 66, 67, 68], inclusive: !1 }, node_l: { rules: [65, 66, 67, 68], inclusive: !1 }, node: { rules: [65, 66, 67, 68], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, component_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, component_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component: { rules: [65, 66, 67, 68], inclusive: !1 }, container_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, container_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container: { rules: [65, 66, 67, 68], inclusive: !1 }, birel: { rules: [65, 66, 67, 68], inclusive: !1 }, system_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, enterprise_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, system_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system: { rules: [65, 66, 67, 68], inclusive: !1 }, person_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, person: { rules: [65, 66, 67, 68], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], inclusive: !0 } }
620
+ };
621
+ return _t;
622
+ }();
623
+ qt.lexer = Ce;
624
+ function Lt() {
625
+ this.yy = {};
626
+ }
627
+ return g(Lt, "Parser"), Lt.prototype = qt, qt.Parser = Lt, new Lt();
628
+ }();
629
+ Ft.parser = Ft;
630
+ var Ue = Ft, V = [], xt = [""], B = "global", F = "", X = [
631
+ {
632
+ alias: "global",
633
+ label: { text: "global" },
634
+ type: { text: "global" },
635
+ tags: null,
636
+ link: null,
637
+ parentBoundary: ""
638
+ }
639
+ ], It = [], ie = "", ne = !1, Vt = 4, zt = 2, be, Fe = /* @__PURE__ */ g(function() {
640
+ return be;
641
+ }, "getC4Type"), Ve = /* @__PURE__ */ g(function(e) {
642
+ be = ge(e, Bt());
643
+ }, "setC4Type"), ze = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n, i) {
644
+ if (e == null || t === void 0 || t === null || s === void 0 || s === null || o === void 0 || o === null)
645
+ return;
646
+ let u = {};
647
+ const d = It.find((f) => f.from === t && f.to === s);
648
+ if (d ? u = d : It.push(u), u.type = e, u.from = t, u.to = s, u.label = { text: o }, l == null)
649
+ u.techn = { text: "" };
650
+ else if (typeof l == "object") {
651
+ let [f, y] = Object.entries(l)[0];
652
+ u[f] = { text: y };
653
+ } else
654
+ u.techn = { text: l };
655
+ if (a == null)
656
+ u.descr = { text: "" };
657
+ else if (typeof a == "object") {
658
+ let [f, y] = Object.entries(a)[0];
659
+ u[f] = { text: y };
660
+ } else
661
+ u.descr = { text: a };
662
+ if (typeof r == "object") {
663
+ let [f, y] = Object.entries(r)[0];
664
+ u[f] = y;
665
+ } else
666
+ u.sprite = r;
667
+ if (typeof n == "object") {
668
+ let [f, y] = Object.entries(n)[0];
669
+ u[f] = y;
670
+ } else
671
+ u.tags = n;
672
+ if (typeof i == "object") {
673
+ let [f, y] = Object.entries(i)[0];
674
+ u[f] = y;
675
+ } else
676
+ u.link = i;
677
+ u.wrap = mt();
678
+ }, "addRel"), Xe = /* @__PURE__ */ g(function(e, t, s, o, l, a, r) {
679
+ if (t === null || s === null)
680
+ return;
681
+ let n = {};
682
+ const i = V.find((u) => u.alias === t);
683
+ if (i && t === i.alias ? n = i : (n.alias = t, V.push(n)), s == null ? n.label = { text: "" } : n.label = { text: s }, o == null)
684
+ n.descr = { text: "" };
685
+ else if (typeof o == "object") {
686
+ let [u, d] = Object.entries(o)[0];
687
+ n[u] = { text: d };
688
+ } else
689
+ n.descr = { text: o };
690
+ if (typeof l == "object") {
691
+ let [u, d] = Object.entries(l)[0];
692
+ n[u] = d;
693
+ } else
694
+ n.sprite = l;
695
+ if (typeof a == "object") {
696
+ let [u, d] = Object.entries(a)[0];
697
+ n[u] = d;
698
+ } else
699
+ n.tags = a;
700
+ if (typeof r == "object") {
701
+ let [u, d] = Object.entries(r)[0];
702
+ n[u] = d;
703
+ } else
704
+ n.link = r;
705
+ n.typeC4Shape = { text: e }, n.parentBoundary = B, n.wrap = mt();
706
+ }, "addPersonOrSystem"), We = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
707
+ if (t === null || s === null)
708
+ return;
709
+ let i = {};
710
+ const u = V.find((d) => d.alias === t);
711
+ if (u && t === u.alias ? i = u : (i.alias = t, V.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
712
+ i.techn = { text: "" };
713
+ else if (typeof o == "object") {
714
+ let [d, f] = Object.entries(o)[0];
715
+ i[d] = { text: f };
716
+ } else
717
+ i.techn = { text: o };
718
+ if (l == null)
719
+ i.descr = { text: "" };
720
+ else if (typeof l == "object") {
721
+ let [d, f] = Object.entries(l)[0];
722
+ i[d] = { text: f };
723
+ } else
724
+ i.descr = { text: l };
725
+ if (typeof a == "object") {
726
+ let [d, f] = Object.entries(a)[0];
727
+ i[d] = f;
728
+ } else
729
+ i.sprite = a;
730
+ if (typeof r == "object") {
731
+ let [d, f] = Object.entries(r)[0];
732
+ i[d] = f;
733
+ } else
734
+ i.tags = r;
735
+ if (typeof n == "object") {
736
+ let [d, f] = Object.entries(n)[0];
737
+ i[d] = f;
738
+ } else
739
+ i.link = n;
740
+ i.wrap = mt(), i.typeC4Shape = { text: e }, i.parentBoundary = B;
741
+ }, "addContainer"), Qe = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
742
+ if (t === null || s === null)
743
+ return;
744
+ let i = {};
745
+ const u = V.find((d) => d.alias === t);
746
+ if (u && t === u.alias ? i = u : (i.alias = t, V.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
747
+ i.techn = { text: "" };
748
+ else if (typeof o == "object") {
749
+ let [d, f] = Object.entries(o)[0];
750
+ i[d] = { text: f };
751
+ } else
752
+ i.techn = { text: o };
753
+ if (l == null)
754
+ i.descr = { text: "" };
755
+ else if (typeof l == "object") {
756
+ let [d, f] = Object.entries(l)[0];
757
+ i[d] = { text: f };
758
+ } else
759
+ i.descr = { text: l };
760
+ if (typeof a == "object") {
761
+ let [d, f] = Object.entries(a)[0];
762
+ i[d] = f;
763
+ } else
764
+ i.sprite = a;
765
+ if (typeof r == "object") {
766
+ let [d, f] = Object.entries(r)[0];
767
+ i[d] = f;
768
+ } else
769
+ i.tags = r;
770
+ if (typeof n == "object") {
771
+ let [d, f] = Object.entries(n)[0];
772
+ i[d] = f;
773
+ } else
774
+ i.link = n;
775
+ i.wrap = mt(), i.typeC4Shape = { text: e }, i.parentBoundary = B;
776
+ }, "addComponent"), He = /* @__PURE__ */ g(function(e, t, s, o, l) {
777
+ if (e === null || t === null)
778
+ return;
779
+ let a = {};
780
+ const r = X.find((n) => n.alias === e);
781
+ if (r && e === r.alias ? a = r : (a.alias = e, X.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
782
+ a.type = { text: "system" };
783
+ else if (typeof s == "object") {
784
+ let [n, i] = Object.entries(s)[0];
785
+ a[n] = { text: i };
786
+ } else
787
+ a.type = { text: s };
788
+ if (typeof o == "object") {
789
+ let [n, i] = Object.entries(o)[0];
790
+ a[n] = i;
791
+ } else
792
+ a.tags = o;
793
+ if (typeof l == "object") {
794
+ let [n, i] = Object.entries(l)[0];
795
+ a[n] = i;
796
+ } else
797
+ a.link = l;
798
+ a.parentBoundary = B, a.wrap = mt(), F = B, B = e, xt.push(F);
799
+ }, "addPersonOrSystemBoundary"), qe = /* @__PURE__ */ g(function(e, t, s, o, l) {
800
+ if (e === null || t === null)
801
+ return;
802
+ let a = {};
803
+ const r = X.find((n) => n.alias === e);
804
+ if (r && e === r.alias ? a = r : (a.alias = e, X.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
805
+ a.type = { text: "container" };
806
+ else if (typeof s == "object") {
807
+ let [n, i] = Object.entries(s)[0];
808
+ a[n] = { text: i };
809
+ } else
810
+ a.type = { text: s };
811
+ if (typeof o == "object") {
812
+ let [n, i] = Object.entries(o)[0];
813
+ a[n] = i;
814
+ } else
815
+ a.tags = o;
816
+ if (typeof l == "object") {
817
+ let [n, i] = Object.entries(l)[0];
818
+ a[n] = i;
819
+ } else
820
+ a.link = l;
821
+ a.parentBoundary = B, a.wrap = mt(), F = B, B = e, xt.push(F);
822
+ }, "addContainerBoundary"), Ge = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
823
+ if (t === null || s === null)
824
+ return;
825
+ let i = {};
826
+ const u = X.find((d) => d.alias === t);
827
+ if (u && t === u.alias ? i = u : (i.alias = t, X.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
828
+ i.type = { text: "node" };
829
+ else if (typeof o == "object") {
830
+ let [d, f] = Object.entries(o)[0];
831
+ i[d] = { text: f };
832
+ } else
833
+ i.type = { text: o };
834
+ if (l == null)
835
+ i.descr = { text: "" };
836
+ else if (typeof l == "object") {
837
+ let [d, f] = Object.entries(l)[0];
838
+ i[d] = { text: f };
839
+ } else
840
+ i.descr = { text: l };
841
+ if (typeof r == "object") {
842
+ let [d, f] = Object.entries(r)[0];
843
+ i[d] = f;
844
+ } else
845
+ i.tags = r;
846
+ if (typeof n == "object") {
847
+ let [d, f] = Object.entries(n)[0];
848
+ i[d] = f;
849
+ } else
850
+ i.link = n;
851
+ i.nodeType = e, i.parentBoundary = B, i.wrap = mt(), F = B, B = t, xt.push(F);
852
+ }, "addDeploymentNode"), Ke = /* @__PURE__ */ g(function() {
853
+ B = F, xt.pop(), F = xt.pop(), xt.push(F);
854
+ }, "popBoundaryParseStack"), Je = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n, i, u, d) {
855
+ let f = V.find((y) => y.alias === t);
856
+ if (!(f === void 0 && (f = X.find((y) => y.alias === t), f === void 0))) {
857
+ if (s != null)
858
+ if (typeof s == "object") {
859
+ let [y, E] = Object.entries(s)[0];
860
+ f[y] = E;
861
+ } else
862
+ f.bgColor = s;
863
+ if (o != null)
864
+ if (typeof o == "object") {
865
+ let [y, E] = Object.entries(o)[0];
866
+ f[y] = E;
867
+ } else
868
+ f.fontColor = o;
869
+ if (l != null)
870
+ if (typeof l == "object") {
871
+ let [y, E] = Object.entries(l)[0];
872
+ f[y] = E;
873
+ } else
874
+ f.borderColor = l;
875
+ if (a != null)
876
+ if (typeof a == "object") {
877
+ let [y, E] = Object.entries(a)[0];
878
+ f[y] = E;
879
+ } else
880
+ f.shadowing = a;
881
+ if (r != null)
882
+ if (typeof r == "object") {
883
+ let [y, E] = Object.entries(r)[0];
884
+ f[y] = E;
885
+ } else
886
+ f.shape = r;
887
+ if (n != null)
888
+ if (typeof n == "object") {
889
+ let [y, E] = Object.entries(n)[0];
890
+ f[y] = E;
891
+ } else
892
+ f.sprite = n;
893
+ if (i != null)
894
+ if (typeof i == "object") {
895
+ let [y, E] = Object.entries(i)[0];
896
+ f[y] = E;
897
+ } else
898
+ f.techn = i;
899
+ if (u != null)
900
+ if (typeof u == "object") {
901
+ let [y, E] = Object.entries(u)[0];
902
+ f[y] = E;
903
+ } else
904
+ f.legendText = u;
905
+ if (d != null)
906
+ if (typeof d == "object") {
907
+ let [y, E] = Object.entries(d)[0];
908
+ f[y] = E;
909
+ } else
910
+ f.legendSprite = d;
911
+ }
912
+ }, "updateElStyle"), Ze = /* @__PURE__ */ g(function(e, t, s, o, l, a, r) {
913
+ const n = It.find((i) => i.from === t && i.to === s);
914
+ if (n !== void 0) {
915
+ if (o != null)
916
+ if (typeof o == "object") {
917
+ let [i, u] = Object.entries(o)[0];
918
+ n[i] = u;
919
+ } else
920
+ n.textColor = o;
921
+ if (l != null)
922
+ if (typeof l == "object") {
923
+ let [i, u] = Object.entries(l)[0];
924
+ n[i] = u;
925
+ } else
926
+ n.lineColor = l;
927
+ if (a != null)
928
+ if (typeof a == "object") {
929
+ let [i, u] = Object.entries(a)[0];
930
+ n[i] = parseInt(u);
931
+ } else
932
+ n.offsetX = parseInt(a);
933
+ if (r != null)
934
+ if (typeof r == "object") {
935
+ let [i, u] = Object.entries(r)[0];
936
+ n[i] = parseInt(u);
937
+ } else
938
+ n.offsetY = parseInt(r);
939
+ }
940
+ }, "updateRelStyle"), $e = /* @__PURE__ */ g(function(e, t, s) {
941
+ let o = Vt, l = zt;
942
+ if (typeof t == "object") {
943
+ const a = Object.values(t)[0];
944
+ o = parseInt(a);
945
+ } else
946
+ o = parseInt(t);
947
+ if (typeof s == "object") {
948
+ const a = Object.values(s)[0];
949
+ l = parseInt(a);
950
+ } else
951
+ l = parseInt(s);
952
+ o >= 1 && (Vt = o), l >= 1 && (zt = l);
953
+ }, "updateLayoutConfig"), t0 = /* @__PURE__ */ g(function() {
954
+ return Vt;
955
+ }, "getC4ShapeInRow"), e0 = /* @__PURE__ */ g(function() {
956
+ return zt;
957
+ }, "getC4BoundaryInRow"), a0 = /* @__PURE__ */ g(function() {
958
+ return B;
959
+ }, "getCurrentBoundaryParse"), i0 = /* @__PURE__ */ g(function() {
960
+ return F;
961
+ }, "getParentBoundaryParse"), _e = /* @__PURE__ */ g(function(e) {
962
+ return e == null ? V : V.filter((t) => t.parentBoundary === e);
963
+ }, "getC4ShapeArray"), n0 = /* @__PURE__ */ g(function(e) {
964
+ return V.find((t) => t.alias === e);
965
+ }, "getC4Shape"), r0 = /* @__PURE__ */ g(function(e) {
966
+ return Object.keys(_e(e));
967
+ }, "getC4ShapeKeys"), xe = /* @__PURE__ */ g(function(e) {
968
+ return e == null ? X : X.filter((t) => t.parentBoundary === e);
969
+ }, "getBoundaries"), s0 = xe, l0 = /* @__PURE__ */ g(function() {
970
+ return It;
971
+ }, "getRels"), o0 = /* @__PURE__ */ g(function() {
972
+ return ie;
973
+ }, "getTitle"), c0 = /* @__PURE__ */ g(function(e) {
974
+ ne = e;
975
+ }, "setWrap"), mt = /* @__PURE__ */ g(function() {
976
+ return ne;
977
+ }, "autoWrap"), h0 = /* @__PURE__ */ g(function() {
978
+ V = [], X = [
979
+ {
980
+ alias: "global",
981
+ label: { text: "global" },
982
+ type: { text: "global" },
983
+ tags: null,
984
+ link: null,
985
+ parentBoundary: ""
986
+ }
987
+ ], F = "", B = "global", xt = [""], It = [], xt = [""], ie = "", ne = !1, Vt = 4, zt = 2;
988
+ }, "clear"), u0 = {
989
+ SOLID: 0,
990
+ DOTTED: 1,
991
+ NOTE: 2,
992
+ SOLID_CROSS: 3,
993
+ DOTTED_CROSS: 4,
994
+ SOLID_OPEN: 5,
995
+ DOTTED_OPEN: 6,
996
+ LOOP_START: 10,
997
+ LOOP_END: 11,
998
+ ALT_START: 12,
999
+ ALT_ELSE: 13,
1000
+ ALT_END: 14,
1001
+ OPT_START: 15,
1002
+ OPT_END: 16,
1003
+ ACTIVE_START: 17,
1004
+ ACTIVE_END: 18,
1005
+ PAR_START: 19,
1006
+ PAR_AND: 20,
1007
+ PAR_END: 21,
1008
+ RECT_START: 22,
1009
+ RECT_END: 23,
1010
+ SOLID_POINT: 24,
1011
+ DOTTED_POINT: 25
1012
+ }, d0 = {
1013
+ FILLED: 0,
1014
+ OPEN: 1
1015
+ }, f0 = {
1016
+ LEFTOF: 0,
1017
+ RIGHTOF: 1,
1018
+ OVER: 2
1019
+ }, p0 = /* @__PURE__ */ g(function(e) {
1020
+ ie = ge(e, Bt());
1021
+ }, "setTitle"), te = {
1022
+ addPersonOrSystem: Xe,
1023
+ addPersonOrSystemBoundary: He,
1024
+ addContainer: We,
1025
+ addContainerBoundary: qe,
1026
+ addComponent: Qe,
1027
+ addDeploymentNode: Ge,
1028
+ popBoundaryParseStack: Ke,
1029
+ addRel: ze,
1030
+ updateElStyle: Je,
1031
+ updateRelStyle: Ze,
1032
+ updateLayoutConfig: $e,
1033
+ autoWrap: mt,
1034
+ setWrap: c0,
1035
+ getC4ShapeArray: _e,
1036
+ getC4Shape: n0,
1037
+ getC4ShapeKeys: r0,
1038
+ getBoundaries: xe,
1039
+ getBoundarys: s0,
1040
+ getCurrentBoundaryParse: a0,
1041
+ getParentBoundaryParse: i0,
1042
+ getRels: l0,
1043
+ getTitle: o0,
1044
+ getC4Type: Fe,
1045
+ getC4ShapeInRow: t0,
1046
+ getC4BoundaryInRow: e0,
1047
+ setAccTitle: Me,
1048
+ getAccTitle: Ie,
1049
+ getAccDescription: Be,
1050
+ setAccDescription: Pe,
1051
+ getConfig: /* @__PURE__ */ g(() => Bt().c4, "getConfig"),
1052
+ clear: h0,
1053
+ LINETYPE: u0,
1054
+ ARROWTYPE: d0,
1055
+ PLACEMENT: f0,
1056
+ setTitle: p0,
1057
+ setC4Type: Ve
1058
+ // apply,
1059
+ }, re = /* @__PURE__ */ g(function(e, t) {
1060
+ return De(e, t);
1061
+ }, "drawRect"), me = /* @__PURE__ */ g(function(e, t, s, o, l, a) {
1062
+ const r = e.append("image");
1063
+ r.attr("width", t), r.attr("height", s), r.attr("x", o), r.attr("y", l);
1064
+ let n = a.startsWith("data:image/png;base64") ? a : Ye(a);
1065
+ r.attr("xlink:href", n);
1066
+ }, "drawImage"), y0 = /* @__PURE__ */ g((e, t, s) => {
1067
+ const o = e.append("g");
1068
+ let l = 0;
1069
+ for (let a of t) {
1070
+ let r = a.textColor ? a.textColor : "#444444", n = a.lineColor ? a.lineColor : "#444444", i = a.offsetX ? parseInt(a.offsetX) : 0, u = a.offsetY ? parseInt(a.offsetY) : 0, d = "";
1071
+ if (l === 0) {
1072
+ let y = o.append("line");
1073
+ y.attr("x1", a.startPoint.x), y.attr("y1", a.startPoint.y), y.attr("x2", a.endPoint.x), y.attr("y2", a.endPoint.y), y.attr("stroke-width", "1"), y.attr("stroke", n), y.style("fill", "none"), a.type !== "rel_b" && y.attr("marker-end", "url(" + d + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && y.attr("marker-start", "url(" + d + "#arrowend)"), l = -1;
1074
+ } else {
1075
+ let y = o.append("path");
1076
+ y.attr("fill", "none").attr("stroke-width", "1").attr("stroke", n).attr(
1077
+ "d",
1078
+ "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", a.startPoint.x).replaceAll("starty", a.startPoint.y).replaceAll(
1079
+ "controlx",
1080
+ a.startPoint.x + (a.endPoint.x - a.startPoint.x) / 2 - (a.endPoint.x - a.startPoint.x) / 4
1081
+ ).replaceAll("controly", a.startPoint.y + (a.endPoint.y - a.startPoint.y) / 2).replaceAll("stopx", a.endPoint.x).replaceAll("stopy", a.endPoint.y)
1082
+ ), a.type !== "rel_b" && y.attr("marker-end", "url(" + d + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && y.attr("marker-start", "url(" + d + "#arrowend)");
1083
+ }
1084
+ let f = s.messageFont();
1085
+ Q(s)(
1086
+ a.label.text,
1087
+ o,
1088
+ Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
1089
+ Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + u,
1090
+ a.label.width,
1091
+ a.label.height,
1092
+ { fill: r },
1093
+ f
1094
+ ), a.techn && a.techn.text !== "" && (f = s.messageFont(), Q(s)(
1095
+ "[" + a.techn.text + "]",
1096
+ o,
1097
+ Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
1098
+ Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + s.messageFontSize + 5 + u,
1099
+ Math.max(a.label.width, a.techn.width),
1100
+ a.techn.height,
1101
+ { fill: r, "font-style": "italic" },
1102
+ f
1103
+ ));
1104
+ }
1105
+ }, "drawRels"), g0 = /* @__PURE__ */ g(function(e, t, s) {
1106
+ const o = e.append("g");
1107
+ let l = t.bgColor ? t.bgColor : "none", a = t.borderColor ? t.borderColor : "#444444", r = t.fontColor ? t.fontColor : "black", n = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
1108
+ t.nodeType && (n = { "stroke-width": 1 });
1109
+ let i = {
1110
+ x: t.x,
1111
+ y: t.y,
1112
+ fill: l,
1113
+ stroke: a,
1114
+ width: t.width,
1115
+ height: t.height,
1116
+ rx: 2.5,
1117
+ ry: 2.5,
1118
+ attrs: n
1119
+ };
1120
+ re(o, i);
1121
+ let u = s.boundaryFont();
1122
+ u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = r, Q(s)(
1123
+ t.label.text,
1124
+ o,
1125
+ t.x,
1126
+ t.y + t.label.Y,
1127
+ t.width,
1128
+ t.height,
1129
+ { fill: "#444444" },
1130
+ u
1131
+ ), t.type && t.type.text !== "" && (u = s.boundaryFont(), u.fontColor = r, Q(s)(
1132
+ t.type.text,
1133
+ o,
1134
+ t.x,
1135
+ t.y + t.type.Y,
1136
+ t.width,
1137
+ t.height,
1138
+ { fill: "#444444" },
1139
+ u
1140
+ )), t.descr && t.descr.text !== "" && (u = s.boundaryFont(), u.fontSize = u.fontSize - 2, u.fontColor = r, Q(s)(
1141
+ t.descr.text,
1142
+ o,
1143
+ t.x,
1144
+ t.y + t.descr.Y,
1145
+ t.width,
1146
+ t.height,
1147
+ { fill: "#444444" },
1148
+ u
1149
+ ));
1150
+ }, "drawBoundary"), b0 = /* @__PURE__ */ g(function(e, t, s) {
1151
+ var f;
1152
+ let o = t.bgColor ? t.bgColor : s[t.typeC4Shape.text + "_bg_color"], l = t.borderColor ? t.borderColor : s[t.typeC4Shape.text + "_border_color"], a = t.fontColor ? t.fontColor : "#FFFFFF", r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1153
+ switch (t.typeC4Shape.text) {
1154
+ case "person":
1155
+ r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1156
+ break;
1157
+ case "external_person":
1158
+ r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
1159
+ break;
1160
+ }
1161
+ const n = e.append("g");
1162
+ n.attr("class", "person-man");
1163
+ const i = Se();
1164
+ switch (t.typeC4Shape.text) {
1165
+ case "person":
1166
+ case "external_person":
1167
+ case "system":
1168
+ case "external_system":
1169
+ case "container":
1170
+ case "external_container":
1171
+ case "component":
1172
+ case "external_component":
1173
+ i.x = t.x, i.y = t.y, i.fill = o, i.width = t.width, i.height = t.height, i.stroke = l, i.rx = 2.5, i.ry = 2.5, i.attrs = { "stroke-width": 0.5 }, re(n, i);
1174
+ break;
1175
+ case "system_db":
1176
+ case "external_system_db":
1177
+ case "container_db":
1178
+ case "external_container_db":
1179
+ case "component_db":
1180
+ case "external_component_db":
1181
+ n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
1182
+ "d",
1183
+ "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2).replaceAll("height", t.height)
1184
+ ), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
1185
+ "d",
1186
+ "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2)
1187
+ );
1188
+ break;
1189
+ case "system_queue":
1190
+ case "external_system_queue":
1191
+ case "container_queue":
1192
+ case "external_container_queue":
1193
+ case "component_queue":
1194
+ case "external_component_queue":
1195
+ n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
1196
+ "d",
1197
+ "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("width", t.width).replaceAll("half", t.height / 2)
1198
+ ), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
1199
+ "d",
1200
+ "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", t.x + t.width).replaceAll("starty", t.y).replaceAll("half", t.height / 2)
1201
+ );
1202
+ break;
1203
+ }
1204
+ let u = w0(s, t.typeC4Shape.text);
1205
+ switch (n.append("text").attr("fill", a).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", t.typeC4Shape.width).attr("x", t.x + t.width / 2 - t.typeC4Shape.width / 2).attr("y", t.y + t.typeC4Shape.Y).text("<<" + t.typeC4Shape.text + ">>"), t.typeC4Shape.text) {
1206
+ case "person":
1207
+ case "external_person":
1208
+ me(
1209
+ n,
1210
+ 48,
1211
+ 48,
1212
+ t.x + t.width / 2 - 24,
1213
+ t.y + t.image.Y,
1214
+ r
1215
+ );
1216
+ break;
1217
+ }
1218
+ let d = s[t.typeC4Shape.text + "Font"]();
1219
+ return d.fontWeight = "bold", d.fontSize = d.fontSize + 2, d.fontColor = a, Q(s)(
1220
+ t.label.text,
1221
+ n,
1222
+ t.x,
1223
+ t.y + t.label.Y,
1224
+ t.width,
1225
+ t.height,
1226
+ { fill: a },
1227
+ d
1228
+ ), d = s[t.typeC4Shape.text + "Font"](), d.fontColor = a, t.techn && ((f = t.techn) == null ? void 0 : f.text) !== "" ? Q(s)(
1229
+ t.techn.text,
1230
+ n,
1231
+ t.x,
1232
+ t.y + t.techn.Y,
1233
+ t.width,
1234
+ t.height,
1235
+ { fill: a, "font-style": "italic" },
1236
+ d
1237
+ ) : t.type && t.type.text !== "" && Q(s)(
1238
+ t.type.text,
1239
+ n,
1240
+ t.x,
1241
+ t.y + t.type.Y,
1242
+ t.width,
1243
+ t.height,
1244
+ { fill: a, "font-style": "italic" },
1245
+ d
1246
+ ), t.descr && t.descr.text !== "" && (d = s.personFont(), d.fontColor = a, Q(s)(
1247
+ t.descr.text,
1248
+ n,
1249
+ t.x,
1250
+ t.y + t.descr.Y,
1251
+ t.width,
1252
+ t.height,
1253
+ { fill: a },
1254
+ d
1255
+ )), t.height;
1256
+ }, "drawC4Shape"), _0 = /* @__PURE__ */ g(function(e) {
1257
+ e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1258
+ "d",
1259
+ "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
1260
+ );
1261
+ }, "insertDatabaseIcon"), x0 = /* @__PURE__ */ g(function(e) {
1262
+ e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1263
+ "d",
1264
+ "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
1265
+ );
1266
+ }, "insertComputerIcon"), m0 = /* @__PURE__ */ g(function(e) {
1267
+ e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1268
+ "d",
1269
+ "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
1270
+ );
1271
+ }, "insertClockIcon"), v0 = /* @__PURE__ */ g(function(e) {
1272
+ e.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
1273
+ }, "insertArrowHead"), E0 = /* @__PURE__ */ g(function(e) {
1274
+ e.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
1275
+ }, "insertArrowEnd"), k0 = /* @__PURE__ */ g(function(e) {
1276
+ e.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
1277
+ }, "insertArrowFilledHead"), A0 = /* @__PURE__ */ g(function(e) {
1278
+ e.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
1279
+ }, "insertDynamicNumber"), C0 = /* @__PURE__ */ g(function(e) {
1280
+ const s = e.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
1281
+ s.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), s.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
1282
+ }, "insertArrowCrossHead"), w0 = /* @__PURE__ */ g((e, t) => ({
1283
+ fontFamily: e[t + "FontFamily"],
1284
+ fontSize: e[t + "FontSize"],
1285
+ fontWeight: e[t + "FontWeight"]
1286
+ }), "getC4ShapeFont"), Q = /* @__PURE__ */ function() {
1287
+ function e(l, a, r, n, i, u, d) {
1288
+ const f = a.append("text").attr("x", r + i / 2).attr("y", n + u / 2 + 5).style("text-anchor", "middle").text(l);
1289
+ o(f, d);
1290
+ }
1291
+ g(e, "byText");
1292
+ function t(l, a, r, n, i, u, d, f) {
1293
+ const { fontSize: y, fontFamily: E, fontWeight: O } = f, S = l.split($t.lineBreakRegex);
1294
+ for (let P = 0; P < S.length; P++) {
1295
+ const M = P * y - y * (S.length - 1) / 2, U = a.append("text").attr("x", r + i / 2).attr("y", n).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", y).style("font-weight", O).style("font-family", E);
1296
+ U.append("tspan").attr("dy", M).text(S[P]).attr("alignment-baseline", "mathematical"), o(U, d);
1297
+ }
1298
+ }
1299
+ g(t, "byTspan");
1300
+ function s(l, a, r, n, i, u, d, f) {
1301
+ const y = a.append("switch"), O = y.append("foreignObject").attr("x", r).attr("y", n).attr("width", i).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1302
+ O.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(l), t(l, y, r, n, i, u, d, f), o(O, d);
1303
+ }
1304
+ g(s, "byFo");
1305
+ function o(l, a) {
1306
+ for (const r in a)
1307
+ a.hasOwnProperty(r) && l.attr(r, a[r]);
1308
+ }
1309
+ return g(o, "_setTextAttrs"), function(l) {
1310
+ return l.textPlacement === "fo" ? s : l.textPlacement === "old" ? e : t;
1311
+ };
1312
+ }(), z = {
1313
+ drawRect: re,
1314
+ drawBoundary: g0,
1315
+ drawC4Shape: b0,
1316
+ drawRels: y0,
1317
+ drawImage: me,
1318
+ insertArrowHead: v0,
1319
+ insertArrowEnd: E0,
1320
+ insertArrowFilledHead: k0,
1321
+ insertDynamicNumber: A0,
1322
+ insertArrowCrossHead: C0,
1323
+ insertDatabaseIcon: _0,
1324
+ insertComputerIcon: x0,
1325
+ insertClockIcon: m0
1326
+ }, Xt = 0, Wt = 0, ve = 4, ee = 2;
1327
+ Ft.yy = te;
1328
+ var _ = {}, Ot, Ee = (Ot = class {
1329
+ constructor(t) {
1330
+ this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, ae(t.db.getConfig());
1331
+ }
1332
+ setData(t, s, o, l) {
1333
+ this.nextData.startx = this.data.startx = t, this.nextData.stopx = this.data.stopx = s, this.nextData.starty = this.data.starty = o, this.nextData.stopy = this.data.stopy = l;
1334
+ }
1335
+ updateVal(t, s, o, l) {
1336
+ t[s] === void 0 ? t[s] = o : t[s] = l(o, t[s]);
1337
+ }
1338
+ insert(t) {
1339
+ this.nextData.cnt = this.nextData.cnt + 1;
1340
+ let s = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + t.margin : this.nextData.stopx + t.margin * 2, o = s + t.width, l = this.nextData.starty + t.margin * 2, a = l + t.height;
1341
+ (s >= this.data.widthLimit || o >= this.data.widthLimit || this.nextData.cnt > ve) && (s = this.nextData.startx + t.margin + _.nextLinePaddingX, l = this.nextData.stopy + t.margin * 2, this.nextData.stopx = o = s + t.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = a = l + t.height, this.nextData.cnt = 1), t.x = s, t.y = l, this.updateVal(this.data, "startx", s, Math.min), this.updateVal(this.data, "starty", l, Math.min), this.updateVal(this.data, "stopx", o, Math.max), this.updateVal(this.data, "stopy", a, Math.max), this.updateVal(this.nextData, "startx", s, Math.min), this.updateVal(this.nextData, "starty", l, Math.min), this.updateVal(this.nextData, "stopx", o, Math.max), this.updateVal(this.nextData, "stopy", a, Math.max);
1342
+ }
1343
+ init(t) {
1344
+ this.name = "", this.data = {
1345
+ startx: void 0,
1346
+ stopx: void 0,
1347
+ starty: void 0,
1348
+ stopy: void 0,
1349
+ widthLimit: void 0
1350
+ }, this.nextData = {
1351
+ startx: void 0,
1352
+ stopx: void 0,
1353
+ starty: void 0,
1354
+ stopy: void 0,
1355
+ cnt: 0
1356
+ }, ae(t.db.getConfig());
1357
+ }
1358
+ bumpLastMargin(t) {
1359
+ this.data.stopx += t, this.data.stopy += t;
1360
+ }
1361
+ }, g(Ot, "Bounds"), Ot), ae = /* @__PURE__ */ g(function(e) {
1362
+ Ne(_, e), e.fontFamily && (_.personFontFamily = _.systemFontFamily = _.messageFontFamily = e.fontFamily), e.fontSize && (_.personFontSize = _.systemFontSize = _.messageFontSize = e.fontSize), e.fontWeight && (_.personFontWeight = _.systemFontWeight = _.messageFontWeight = e.fontWeight);
1363
+ }, "setConf"), Pt = /* @__PURE__ */ g((e, t) => ({
1364
+ fontFamily: e[t + "FontFamily"],
1365
+ fontSize: e[t + "FontSize"],
1366
+ fontWeight: e[t + "FontWeight"]
1367
+ }), "c4ShapeFont"), Ut = /* @__PURE__ */ g((e) => ({
1368
+ fontFamily: e.boundaryFontFamily,
1369
+ fontSize: e.boundaryFontSize,
1370
+ fontWeight: e.boundaryFontWeight
1371
+ }), "boundaryFont"), T0 = /* @__PURE__ */ g((e) => ({
1372
+ fontFamily: e.messageFontFamily,
1373
+ fontSize: e.messageFontSize,
1374
+ fontWeight: e.messageFontWeight
1375
+ }), "messageFont");
1376
+ function j(e, t, s, o, l) {
1377
+ if (!t[e].width)
1378
+ if (s)
1379
+ t[e].text = je(t[e].text, l, o), t[e].textLines = t[e].text.split($t.lineBreakRegex).length, t[e].width = l, t[e].height = fe(t[e].text, o);
1380
+ else {
1381
+ let a = t[e].text.split($t.lineBreakRegex);
1382
+ t[e].textLines = a.length;
1383
+ let r = 0;
1384
+ t[e].height = 0, t[e].width = 0;
1385
+ for (const n of a)
1386
+ t[e].width = Math.max(
1387
+ Tt(n, o),
1388
+ t[e].width
1389
+ ), r = fe(n, o), t[e].height = t[e].height + r;
1390
+ }
1391
+ }
1392
+ g(j, "calcC4ShapeTextWH");
1393
+ var ke = /* @__PURE__ */ g(function(e, t, s) {
1394
+ t.x = s.data.startx, t.y = s.data.starty, t.width = s.data.stopx - s.data.startx, t.height = s.data.stopy - s.data.starty, t.label.y = _.c4ShapeMargin - 35;
1395
+ let o = t.wrap && _.wrap, l = Ut(_);
1396
+ l.fontSize = l.fontSize + 2, l.fontWeight = "bold";
1397
+ let a = Tt(t.label.text, l);
1398
+ j("label", t, o, l, a), z.drawBoundary(e, t, _);
1399
+ }, "drawBoundary"), Ae = /* @__PURE__ */ g(function(e, t, s, o) {
1400
+ let l = 0;
1401
+ for (const a of o) {
1402
+ l = 0;
1403
+ const r = s[a];
1404
+ let n = Pt(_, r.typeC4Shape.text);
1405
+ switch (n.fontSize = n.fontSize - 2, r.typeC4Shape.width = Tt(
1406
+ "«" + r.typeC4Shape.text + "»",
1407
+ n
1408
+ ), r.typeC4Shape.height = n.fontSize + 2, r.typeC4Shape.Y = _.c4ShapePadding, l = r.typeC4Shape.Y + r.typeC4Shape.height - 4, r.image = { width: 0, height: 0, Y: 0 }, r.typeC4Shape.text) {
1409
+ case "person":
1410
+ case "external_person":
1411
+ r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height;
1412
+ break;
1413
+ }
1414
+ r.sprite && (r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height);
1415
+ let i = r.wrap && _.wrap, u = _.width - _.c4ShapePadding * 2, d = Pt(_, r.typeC4Shape.text);
1416
+ if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", j("label", r, i, d, u), r.label.Y = l + 8, l = r.label.Y + r.label.height, r.type && r.type.text !== "") {
1417
+ r.type.text = "[" + r.type.text + "]";
1418
+ let E = Pt(_, r.typeC4Shape.text);
1419
+ j("type", r, i, E, u), r.type.Y = l + 5, l = r.type.Y + r.type.height;
1420
+ } else if (r.techn && r.techn.text !== "") {
1421
+ r.techn.text = "[" + r.techn.text + "]";
1422
+ let E = Pt(_, r.techn.text);
1423
+ j("techn", r, i, E, u), r.techn.Y = l + 5, l = r.techn.Y + r.techn.height;
1424
+ }
1425
+ let f = l, y = r.label.width;
1426
+ if (r.descr && r.descr.text !== "") {
1427
+ let E = Pt(_, r.typeC4Shape.text);
1428
+ j("descr", r, i, E, u), r.descr.Y = l + 20, l = r.descr.Y + r.descr.height, y = Math.max(r.label.width, r.descr.width), f = l - r.descr.textLines * 5;
1429
+ }
1430
+ y = y + _.c4ShapePadding, r.width = Math.max(r.width || _.width, y, _.width), r.height = Math.max(r.height || _.height, f, _.height), r.margin = r.margin || _.c4ShapeMargin, e.insert(r), z.drawC4Shape(t, r, _);
1431
+ }
1432
+ e.bumpLastMargin(_.c4ShapeMargin);
1433
+ }, "drawC4ShapeArray"), Rt, Y = (Rt = class {
1434
+ constructor(t, s) {
1435
+ this.x = t, this.y = s;
1436
+ }
1437
+ }, g(Rt, "Point"), Rt), pe = /* @__PURE__ */ g(function(e, t) {
1438
+ let s = e.x, o = e.y, l = t.x, a = t.y, r = s + e.width / 2, n = o + e.height / 2, i = Math.abs(s - l), u = Math.abs(o - a), d = u / i, f = e.height / e.width, y = null;
1439
+ return o == a && s < l ? y = new Y(s + e.width, n) : o == a && s > l ? y = new Y(s, n) : s == l && o < a ? y = new Y(r, o + e.height) : s == l && o > a && (y = new Y(r, o)), s > l && o < a ? f >= d ? y = new Y(s, n + d * e.width / 2) : y = new Y(
1440
+ r - i / u * e.height / 2,
1441
+ o + e.height
1442
+ ) : s < l && o < a ? f >= d ? y = new Y(s + e.width, n + d * e.width / 2) : y = new Y(
1443
+ r + i / u * e.height / 2,
1444
+ o + e.height
1445
+ ) : s < l && o > a ? f >= d ? y = new Y(s + e.width, n - d * e.width / 2) : y = new Y(r + e.height / 2 * i / u, o) : s > l && o > a && (f >= d ? y = new Y(s, n - e.width / 2 * d) : y = new Y(r - e.height / 2 * i / u, o)), y;
1446
+ }, "getIntersectPoint"), O0 = /* @__PURE__ */ g(function(e, t) {
1447
+ let s = { x: 0, y: 0 };
1448
+ s.x = t.x + t.width / 2, s.y = t.y + t.height / 2;
1449
+ let o = pe(e, s);
1450
+ s.x = e.x + e.width / 2, s.y = e.y + e.height / 2;
1451
+ let l = pe(t, s);
1452
+ return { startPoint: o, endPoint: l };
1453
+ }, "getIntersectPoints"), R0 = /* @__PURE__ */ g(function(e, t, s, o) {
1454
+ let l = 0;
1455
+ for (let a of t) {
1456
+ l = l + 1;
1457
+ let r = a.wrap && _.wrap, n = T0(_);
1458
+ o.db.getC4Type() === "C4Dynamic" && (a.label.text = l + ": " + a.label.text);
1459
+ let u = Tt(a.label.text, n);
1460
+ j("label", a, r, n, u), a.techn && a.techn.text !== "" && (u = Tt(a.techn.text, n), j("techn", a, r, n, u)), a.descr && a.descr.text !== "" && (u = Tt(a.descr.text, n), j("descr", a, r, n, u));
1461
+ let d = s(a.from), f = s(a.to), y = O0(d, f);
1462
+ a.startPoint = y.startPoint, a.endPoint = y.endPoint;
1463
+ }
1464
+ z.drawRels(e, t, _);
1465
+ }, "drawRels");
1466
+ function se(e, t, s, o, l) {
1467
+ let a = new Ee(l);
1468
+ a.data.widthLimit = s.data.widthLimit / Math.min(ee, o.length);
1469
+ for (let [r, n] of o.entries()) {
1470
+ let i = 0;
1471
+ n.image = { width: 0, height: 0, Y: 0 }, n.sprite && (n.image.width = 48, n.image.height = 48, n.image.Y = i, i = n.image.Y + n.image.height);
1472
+ let u = n.wrap && _.wrap, d = Ut(_);
1473
+ if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", j(
1474
+ "label",
1475
+ n,
1476
+ u,
1477
+ d,
1478
+ a.data.widthLimit
1479
+ ), n.label.Y = i + 8, i = n.label.Y + n.label.height, n.type && n.type.text !== "") {
1480
+ n.type.text = "[" + n.type.text + "]";
1481
+ let O = Ut(_);
1482
+ j(
1483
+ "type",
1484
+ n,
1485
+ u,
1486
+ O,
1487
+ a.data.widthLimit
1488
+ ), n.type.Y = i + 5, i = n.type.Y + n.type.height;
1489
+ }
1490
+ if (n.descr && n.descr.text !== "") {
1491
+ let O = Ut(_);
1492
+ O.fontSize = O.fontSize - 2, j(
1493
+ "descr",
1494
+ n,
1495
+ u,
1496
+ O,
1497
+ a.data.widthLimit
1498
+ ), n.descr.Y = i + 20, i = n.descr.Y + n.descr.height;
1499
+ }
1500
+ if (r == 0 || r % ee === 0) {
1501
+ let O = s.data.startx + _.diagramMarginX, S = s.data.stopy + _.diagramMarginY + i;
1502
+ a.setData(O, O, S, S);
1503
+ } else {
1504
+ let O = a.data.stopx !== a.data.startx ? a.data.stopx + _.diagramMarginX : a.data.startx, S = a.data.starty;
1505
+ a.setData(O, O, S, S);
1506
+ }
1507
+ a.name = n.alias;
1508
+ let f = l.db.getC4ShapeArray(n.alias), y = l.db.getC4ShapeKeys(n.alias);
1509
+ y.length > 0 && Ae(
1510
+ a,
1511
+ e,
1512
+ f,
1513
+ y
1514
+ ), t = n.alias;
1515
+ let E = l.db.getBoundaries(t);
1516
+ E.length > 0 && se(
1517
+ e,
1518
+ t,
1519
+ a,
1520
+ E,
1521
+ l
1522
+ ), n.alias !== "global" && ke(e, n, a), s.data.stopy = Math.max(
1523
+ a.data.stopy + _.c4ShapeMargin,
1524
+ s.data.stopy
1525
+ ), s.data.stopx = Math.max(
1526
+ a.data.stopx + _.c4ShapeMargin,
1527
+ s.data.stopx
1528
+ ), Xt = Math.max(Xt, s.data.stopx), Wt = Math.max(Wt, s.data.stopy);
1529
+ }
1530
+ }
1531
+ g(se, "drawInsideBoundary");
1532
+ var S0 = /* @__PURE__ */ g(function(e, t, s, o) {
1533
+ _ = Bt().c4;
1534
+ const l = Bt().securityLevel;
1535
+ let a;
1536
+ l === "sandbox" && (a = jt("#i" + t));
1537
+ const r = l === "sandbox" ? jt(a.nodes()[0].contentDocument.body) : jt("body");
1538
+ let n = o.db;
1539
+ o.db.setWrap(_.wrap), ve = n.getC4ShapeInRow(), ee = n.getC4BoundaryInRow(), de.debug(`C:${JSON.stringify(_, null, 2)}`);
1540
+ const i = l === "sandbox" ? r.select(`[id="${t}"]`) : jt(`[id="${t}"]`);
1541
+ z.insertComputerIcon(i), z.insertDatabaseIcon(i), z.insertClockIcon(i);
1542
+ let u = new Ee(o);
1543
+ u.setData(
1544
+ _.diagramMarginX,
1545
+ _.diagramMarginX,
1546
+ _.diagramMarginY,
1547
+ _.diagramMarginY
1548
+ ), u.data.widthLimit = screen.availWidth, Xt = _.diagramMarginX, Wt = _.diagramMarginY;
1549
+ const d = o.db.getTitle();
1550
+ let f = o.db.getBoundaries("");
1551
+ se(i, "", u, f, o), z.insertArrowHead(i), z.insertArrowEnd(i), z.insertArrowCrossHead(i), z.insertArrowFilledHead(i), R0(i, o.db.getRels(), o.db.getC4Shape, o), u.data.stopx = Xt, u.data.stopy = Wt;
1552
+ const y = u.data;
1553
+ let O = y.stopy - y.starty + 2 * _.diagramMarginY;
1554
+ const P = y.stopx - y.startx + 2 * _.diagramMarginX;
1555
+ d && i.append("text").text(d).attr("x", (y.stopx - y.startx) / 2 - 4 * _.diagramMarginX).attr("y", y.starty + _.diagramMarginY), Le(i, O, P, _.useMaxWidth);
1556
+ const M = d ? 60 : 0;
1557
+ i.attr(
1558
+ "viewBox",
1559
+ y.startx - _.diagramMarginX + " -" + (_.diagramMarginY + M) + " " + P + " " + (O + M)
1560
+ ), de.debug("models:", y);
1561
+ }, "draw"), ye = {
1562
+ drawPersonOrSystemArray: Ae,
1563
+ drawBoundary: ke,
1564
+ setConf: ae,
1565
+ draw: S0
1566
+ }, D0 = /* @__PURE__ */ g((e) => `.person {
1567
+ stroke: ${e.personBorder};
1568
+ fill: ${e.personBkg};
1569
+ }
1570
+ `, "getStyles"), P0 = D0, M0 = {
1571
+ parser: Ue,
1572
+ db: te,
1573
+ renderer: ye,
1574
+ styles: P0,
1575
+ init: /* @__PURE__ */ g(({ c4: e, wrap: t }) => {
1576
+ ye.setConf(e), te.setWrap(t);
1577
+ }, "init")
1578
+ };
1579
+ export {
1580
+ M0 as diagram
1581
+ };
src/backend/gradio_dropdownplus/templates/component/channel-Ab7oN4Gk.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import { ap as o, aq as n } from "./mermaid.core-DH6TRyjK.js";
2
+ const t = (a, r) => o.lang.round(n.parse(a)[r]);
3
+ export {
4
+ t as c
5
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-ANTBXLJU-BwgTSljF.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as l } from "./mermaid.core-DH6TRyjK.js";
2
+ function m(e, c) {
3
+ var i, t, o;
4
+ e.accDescr && ((i = c.setAccDescription) == null || i.call(c, e.accDescr)), e.accTitle && ((t = c.setAccTitle) == null || t.call(c, e.accTitle)), e.title && ((o = c.setDiagramTitle) == null || o.call(c, e.title));
5
+ }
6
+ l(m, "populateCommonDb");
7
+ export {
8
+ m as p
9
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-FHKO5MBM-CzrxxPWK.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as s } from "./mermaid.core-DH6TRyjK.js";
2
+ var t, e = (t = class {
3
+ /**
4
+ * @param init - Function that creates the default state.
5
+ */
6
+ constructor(i) {
7
+ this.init = i, this.records = this.init();
8
+ }
9
+ reset() {
10
+ this.records = this.init();
11
+ }
12
+ }, s(t, "ImperativeState"), t);
13
+ export {
14
+ e as I
15
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-GLLZNHP4-DAmLcc0i.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as e } from "./mermaid.core-DH6TRyjK.js";
2
+ var l = /* @__PURE__ */ e(() => `
3
+ /* Font Awesome icon styling - consolidated */
4
+ .label-icon {
5
+ display: inline-block;
6
+ height: 1em;
7
+ overflow: visible;
8
+ vertical-align: -0.125em;
9
+ }
10
+
11
+ .node .label-icon path {
12
+ fill: currentColor;
13
+ stroke: revert;
14
+ stroke-width: revert;
15
+ }
16
+ `, "getIconStyles");
17
+ export {
18
+ l as g
19
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-JBRWN2VN-19qyBxpW.js ADDED
@@ -0,0 +1,1376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { g as et } from "./chunk-GLLZNHP4-DAmLcc0i.js";
2
+ import { g as tt } from "./chunk-WVR4S24B-Br22bM8P.js";
3
+ import { s as st } from "./chunk-NRVI72HA-CQ3LV39f.js";
4
+ import { _ as f, l as Oe, c as F, o as it, r as at, u as we, d as $, b as nt, a as rt, s as ut, g as lt, p as ct, q as ot, k as v, y as ht, x as dt, i as pt, Q as R } from "./mermaid.core-DH6TRyjK.js";
5
+ var Ve = function() {
6
+ var s = /* @__PURE__ */ f(function(I, c, h, p) {
7
+ for (h = h || {}, p = I.length; p--; h[I[p]] = c) ;
8
+ return h;
9
+ }, "o"), i = [1, 18], a = [1, 19], u = [1, 20], l = [1, 41], r = [1, 42], o = [1, 26], A = [1, 24], g = [1, 25], D = [1, 32], L = [1, 33], Ae = [1, 34], m = [1, 45], fe = [1, 35], ge = [1, 36], Ce = [1, 37], me = [1, 38], be = [1, 27], Ee = [1, 28], ye = [1, 29], Te = [1, 30], ke = [1, 31], b = [1, 44], E = [1, 46], y = [1, 43], T = [1, 47], De = [1, 9], d = [1, 8, 9], ee = [1, 58], te = [1, 59], se = [1, 60], ie = [1, 61], ae = [1, 62], Fe = [1, 63], Be = [1, 64], ne = [1, 8, 9, 41], Pe = [1, 76], P = [1, 8, 9, 12, 13, 22, 39, 41, 44, 66, 67, 68, 69, 70, 71, 72, 77, 79], re = [1, 8, 9, 12, 13, 18, 20, 22, 39, 41, 44, 48, 58, 66, 67, 68, 69, 70, 71, 72, 77, 79, 84, 99, 101, 102], ue = [13, 58, 84, 99, 101, 102], z = [13, 58, 71, 72, 84, 99, 101, 102], Me = [13, 58, 66, 67, 68, 69, 70, 84, 99, 101, 102], _e = [1, 99], K = [1, 116], Y = [1, 108], Q = [1, 114], W = [1, 109], j = [1, 110], X = [1, 111], q = [1, 112], H = [1, 113], J = [1, 115], Re = [22, 58, 59, 80, 84, 85, 86, 87, 88, 89], Se = [1, 8, 9, 39, 41, 44], le = [1, 8, 9, 22], Ge = [1, 144], Ue = [1, 8, 9, 59], N = [1, 8, 9, 22, 58, 59, 80, 84, 85, 86, 87, 88, 89], Ne = {
10
+ trace: /* @__PURE__ */ f(function() {
11
+ }, "trace"),
12
+ yy: {},
13
+ symbols_: { error: 2, start: 3, mermaidDoc: 4, statements: 5, graphConfig: 6, CLASS_DIAGRAM: 7, NEWLINE: 8, EOF: 9, statement: 10, classLabel: 11, SQS: 12, STR: 13, SQE: 14, namespaceName: 15, alphaNumToken: 16, classLiteralName: 17, DOT: 18, className: 19, GENERICTYPE: 20, relationStatement: 21, LABEL: 22, namespaceStatement: 23, classStatement: 24, memberStatement: 25, annotationStatement: 26, clickStatement: 27, styleStatement: 28, cssClassStatement: 29, noteStatement: 30, classDefStatement: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, namespaceIdentifier: 38, STRUCT_START: 39, classStatements: 40, STRUCT_STOP: 41, NAMESPACE: 42, classIdentifier: 43, STYLE_SEPARATOR: 44, members: 45, CLASS: 46, ANNOTATION_START: 47, ANNOTATION_END: 48, MEMBER: 49, SEPARATOR: 50, relation: 51, NOTE_FOR: 52, noteText: 53, NOTE: 54, CLASSDEF: 55, classList: 56, stylesOpt: 57, ALPHA: 58, COMMA: 59, direction_tb: 60, direction_bt: 61, direction_rl: 62, direction_lr: 63, relationType: 64, lineType: 65, AGGREGATION: 66, EXTENSION: 67, COMPOSITION: 68, DEPENDENCY: 69, LOLLIPOP: 70, LINE: 71, DOTTED_LINE: 72, CALLBACK: 73, LINK: 74, LINK_TARGET: 75, CLICK: 76, CALLBACK_NAME: 77, CALLBACK_ARGS: 78, HREF: 79, STYLE: 80, CSSCLASS: 81, style: 82, styleComponent: 83, NUM: 84, COLON: 85, UNIT: 86, SPACE: 87, BRKT: 88, PCT: 89, commentToken: 90, textToken: 91, graphCodeTokens: 92, textNoTagsToken: 93, TAGSTART: 94, TAGEND: 95, "==": 96, "--": 97, DEFAULT: 98, MINUS: 99, keywords: 100, UNICODE_TEXT: 101, BQUOTE_STR: 102, $accept: 0, $end: 1 },
14
+ terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 18: "DOT", 20: "GENERICTYPE", 22: "LABEL", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 39: "STRUCT_START", 41: "STRUCT_STOP", 42: "NAMESPACE", 44: "STYLE_SEPARATOR", 46: "CLASS", 47: "ANNOTATION_START", 48: "ANNOTATION_END", 49: "MEMBER", 50: "SEPARATOR", 52: "NOTE_FOR", 54: "NOTE", 55: "CLASSDEF", 58: "ALPHA", 59: "COMMA", 60: "direction_tb", 61: "direction_bt", 62: "direction_rl", 63: "direction_lr", 66: "AGGREGATION", 67: "EXTENSION", 68: "COMPOSITION", 69: "DEPENDENCY", 70: "LOLLIPOP", 71: "LINE", 72: "DOTTED_LINE", 73: "CALLBACK", 74: "LINK", 75: "LINK_TARGET", 76: "CLICK", 77: "CALLBACK_NAME", 78: "CALLBACK_ARGS", 79: "HREF", 80: "STYLE", 81: "CSSCLASS", 84: "NUM", 85: "COLON", 86: "UNIT", 87: "SPACE", 88: "BRKT", 89: "PCT", 92: "graphCodeTokens", 94: "TAGSTART", 95: "TAGEND", 96: "==", 97: "--", 98: "DEFAULT", 99: "MINUS", 100: "keywords", 101: "UNICODE_TEXT", 102: "BQUOTE_STR" },
15
+ productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 1], [15, 3], [15, 2], [19, 1], [19, 3], [19, 1], [19, 2], [19, 2], [19, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [23, 4], [23, 5], [38, 2], [40, 1], [40, 2], [40, 3], [24, 1], [24, 3], [24, 4], [24, 6], [43, 2], [43, 3], [26, 4], [45, 1], [45, 2], [25, 1], [25, 2], [25, 1], [25, 1], [21, 3], [21, 4], [21, 4], [21, 5], [30, 3], [30, 2], [31, 3], [56, 1], [56, 3], [32, 1], [32, 1], [32, 1], [32, 1], [51, 3], [51, 2], [51, 2], [51, 1], [64, 1], [64, 1], [64, 1], [64, 1], [64, 1], [65, 1], [65, 1], [27, 3], [27, 4], [27, 3], [27, 4], [27, 4], [27, 5], [27, 3], [27, 4], [27, 4], [27, 5], [27, 4], [27, 5], [27, 5], [27, 6], [28, 3], [29, 3], [57, 1], [57, 3], [82, 1], [82, 2], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [90, 1], [90, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [93, 1], [93, 1], [93, 1], [93, 1], [16, 1], [16, 1], [16, 1], [16, 1], [17, 1], [53, 1]],
16
+ performAction: /* @__PURE__ */ f(function(c, h, p, n, C, e, Z) {
17
+ var t = e.length - 1;
18
+ switch (C) {
19
+ case 8:
20
+ this.$ = e[t - 1];
21
+ break;
22
+ case 9:
23
+ case 10:
24
+ case 13:
25
+ case 15:
26
+ this.$ = e[t];
27
+ break;
28
+ case 11:
29
+ case 14:
30
+ this.$ = e[t - 2] + "." + e[t];
31
+ break;
32
+ case 12:
33
+ case 16:
34
+ this.$ = e[t - 1] + e[t];
35
+ break;
36
+ case 17:
37
+ case 18:
38
+ this.$ = e[t - 1] + "~" + e[t] + "~";
39
+ break;
40
+ case 19:
41
+ n.addRelation(e[t]);
42
+ break;
43
+ case 20:
44
+ e[t - 1].title = n.cleanupLabel(e[t]), n.addRelation(e[t - 1]);
45
+ break;
46
+ case 31:
47
+ this.$ = e[t].trim(), n.setAccTitle(this.$);
48
+ break;
49
+ case 32:
50
+ case 33:
51
+ this.$ = e[t].trim(), n.setAccDescription(this.$);
52
+ break;
53
+ case 34:
54
+ n.addClassesToNamespace(e[t - 3], e[t - 1]);
55
+ break;
56
+ case 35:
57
+ n.addClassesToNamespace(e[t - 4], e[t - 1]);
58
+ break;
59
+ case 36:
60
+ this.$ = e[t], n.addNamespace(e[t]);
61
+ break;
62
+ case 37:
63
+ this.$ = [e[t]];
64
+ break;
65
+ case 38:
66
+ this.$ = [e[t - 1]];
67
+ break;
68
+ case 39:
69
+ e[t].unshift(e[t - 2]), this.$ = e[t];
70
+ break;
71
+ case 41:
72
+ n.setCssClass(e[t - 2], e[t]);
73
+ break;
74
+ case 42:
75
+ n.addMembers(e[t - 3], e[t - 1]);
76
+ break;
77
+ case 43:
78
+ n.setCssClass(e[t - 5], e[t - 3]), n.addMembers(e[t - 5], e[t - 1]);
79
+ break;
80
+ case 44:
81
+ this.$ = e[t], n.addClass(e[t]);
82
+ break;
83
+ case 45:
84
+ this.$ = e[t - 1], n.addClass(e[t - 1]), n.setClassLabel(e[t - 1], e[t]);
85
+ break;
86
+ case 46:
87
+ n.addAnnotation(e[t], e[t - 2]);
88
+ break;
89
+ case 47:
90
+ case 60:
91
+ this.$ = [e[t]];
92
+ break;
93
+ case 48:
94
+ e[t].push(e[t - 1]), this.$ = e[t];
95
+ break;
96
+ case 49:
97
+ break;
98
+ case 50:
99
+ n.addMember(e[t - 1], n.cleanupLabel(e[t]));
100
+ break;
101
+ case 51:
102
+ break;
103
+ case 52:
104
+ break;
105
+ case 53:
106
+ this.$ = { id1: e[t - 2], id2: e[t], relation: e[t - 1], relationTitle1: "none", relationTitle2: "none" };
107
+ break;
108
+ case 54:
109
+ this.$ = { id1: e[t - 3], id2: e[t], relation: e[t - 1], relationTitle1: e[t - 2], relationTitle2: "none" };
110
+ break;
111
+ case 55:
112
+ this.$ = { id1: e[t - 3], id2: e[t], relation: e[t - 2], relationTitle1: "none", relationTitle2: e[t - 1] };
113
+ break;
114
+ case 56:
115
+ this.$ = { id1: e[t - 4], id2: e[t], relation: e[t - 2], relationTitle1: e[t - 3], relationTitle2: e[t - 1] };
116
+ break;
117
+ case 57:
118
+ n.addNote(e[t], e[t - 1]);
119
+ break;
120
+ case 58:
121
+ n.addNote(e[t]);
122
+ break;
123
+ case 59:
124
+ this.$ = e[t - 2], n.defineClass(e[t - 1], e[t]);
125
+ break;
126
+ case 61:
127
+ this.$ = e[t - 2].concat([e[t]]);
128
+ break;
129
+ case 62:
130
+ n.setDirection("TB");
131
+ break;
132
+ case 63:
133
+ n.setDirection("BT");
134
+ break;
135
+ case 64:
136
+ n.setDirection("RL");
137
+ break;
138
+ case 65:
139
+ n.setDirection("LR");
140
+ break;
141
+ case 66:
142
+ this.$ = { type1: e[t - 2], type2: e[t], lineType: e[t - 1] };
143
+ break;
144
+ case 67:
145
+ this.$ = { type1: "none", type2: e[t], lineType: e[t - 1] };
146
+ break;
147
+ case 68:
148
+ this.$ = { type1: e[t - 1], type2: "none", lineType: e[t] };
149
+ break;
150
+ case 69:
151
+ this.$ = { type1: "none", type2: "none", lineType: e[t] };
152
+ break;
153
+ case 70:
154
+ this.$ = n.relationType.AGGREGATION;
155
+ break;
156
+ case 71:
157
+ this.$ = n.relationType.EXTENSION;
158
+ break;
159
+ case 72:
160
+ this.$ = n.relationType.COMPOSITION;
161
+ break;
162
+ case 73:
163
+ this.$ = n.relationType.DEPENDENCY;
164
+ break;
165
+ case 74:
166
+ this.$ = n.relationType.LOLLIPOP;
167
+ break;
168
+ case 75:
169
+ this.$ = n.lineType.LINE;
170
+ break;
171
+ case 76:
172
+ this.$ = n.lineType.DOTTED_LINE;
173
+ break;
174
+ case 77:
175
+ case 83:
176
+ this.$ = e[t - 2], n.setClickEvent(e[t - 1], e[t]);
177
+ break;
178
+ case 78:
179
+ case 84:
180
+ this.$ = e[t - 3], n.setClickEvent(e[t - 2], e[t - 1]), n.setTooltip(e[t - 2], e[t]);
181
+ break;
182
+ case 79:
183
+ this.$ = e[t - 2], n.setLink(e[t - 1], e[t]);
184
+ break;
185
+ case 80:
186
+ this.$ = e[t - 3], n.setLink(e[t - 2], e[t - 1], e[t]);
187
+ break;
188
+ case 81:
189
+ this.$ = e[t - 3], n.setLink(e[t - 2], e[t - 1]), n.setTooltip(e[t - 2], e[t]);
190
+ break;
191
+ case 82:
192
+ this.$ = e[t - 4], n.setLink(e[t - 3], e[t - 2], e[t]), n.setTooltip(e[t - 3], e[t - 1]);
193
+ break;
194
+ case 85:
195
+ this.$ = e[t - 3], n.setClickEvent(e[t - 2], e[t - 1], e[t]);
196
+ break;
197
+ case 86:
198
+ this.$ = e[t - 4], n.setClickEvent(e[t - 3], e[t - 2], e[t - 1]), n.setTooltip(e[t - 3], e[t]);
199
+ break;
200
+ case 87:
201
+ this.$ = e[t - 3], n.setLink(e[t - 2], e[t]);
202
+ break;
203
+ case 88:
204
+ this.$ = e[t - 4], n.setLink(e[t - 3], e[t - 1], e[t]);
205
+ break;
206
+ case 89:
207
+ this.$ = e[t - 4], n.setLink(e[t - 3], e[t - 1]), n.setTooltip(e[t - 3], e[t]);
208
+ break;
209
+ case 90:
210
+ this.$ = e[t - 5], n.setLink(e[t - 4], e[t - 2], e[t]), n.setTooltip(e[t - 4], e[t - 1]);
211
+ break;
212
+ case 91:
213
+ this.$ = e[t - 2], n.setCssStyle(e[t - 1], e[t]);
214
+ break;
215
+ case 92:
216
+ n.setCssClass(e[t - 1], e[t]);
217
+ break;
218
+ case 93:
219
+ this.$ = [e[t]];
220
+ break;
221
+ case 94:
222
+ e[t - 2].push(e[t]), this.$ = e[t - 2];
223
+ break;
224
+ case 96:
225
+ this.$ = e[t - 1] + e[t];
226
+ break;
227
+ }
228
+ }, "anonymous"),
229
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: i, 35: a, 37: u, 38: 22, 42: l, 43: 23, 46: r, 47: o, 49: A, 50: g, 52: D, 54: L, 55: Ae, 58: m, 60: fe, 61: ge, 62: Ce, 63: me, 73: be, 74: Ee, 76: ye, 80: Te, 81: ke, 84: b, 99: E, 101: y, 102: T }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, s(De, [2, 5], { 8: [1, 48] }), { 8: [1, 49] }, s(d, [2, 19], { 22: [1, 50] }), s(d, [2, 21]), s(d, [2, 22]), s(d, [2, 23]), s(d, [2, 24]), s(d, [2, 25]), s(d, [2, 26]), s(d, [2, 27]), s(d, [2, 28]), s(d, [2, 29]), s(d, [2, 30]), { 34: [1, 51] }, { 36: [1, 52] }, s(d, [2, 33]), s(d, [2, 49], { 51: 53, 64: 56, 65: 57, 13: [1, 54], 22: [1, 55], 66: ee, 67: te, 68: se, 69: ie, 70: ae, 71: Fe, 72: Be }), { 39: [1, 65] }, s(ne, [2, 40], { 39: [1, 67], 44: [1, 66] }), s(d, [2, 51]), s(d, [2, 52]), { 16: 68, 58: m, 84: b, 99: E, 101: y }, { 16: 39, 17: 40, 19: 69, 58: m, 84: b, 99: E, 101: y, 102: T }, { 16: 39, 17: 40, 19: 70, 58: m, 84: b, 99: E, 101: y, 102: T }, { 16: 39, 17: 40, 19: 71, 58: m, 84: b, 99: E, 101: y, 102: T }, { 58: [1, 72] }, { 13: [1, 73] }, { 16: 39, 17: 40, 19: 74, 58: m, 84: b, 99: E, 101: y, 102: T }, { 13: Pe, 53: 75 }, { 56: 77, 58: [1, 78] }, s(d, [2, 62]), s(d, [2, 63]), s(d, [2, 64]), s(d, [2, 65]), s(P, [2, 13], { 16: 39, 17: 40, 19: 80, 18: [1, 79], 20: [1, 81], 58: m, 84: b, 99: E, 101: y, 102: T }), s(P, [2, 15], { 20: [1, 82] }), { 15: 83, 16: 84, 17: 85, 58: m, 84: b, 99: E, 101: y, 102: T }, { 16: 39, 17: 40, 19: 86, 58: m, 84: b, 99: E, 101: y, 102: T }, s(re, [2, 119]), s(re, [2, 120]), s(re, [2, 121]), s(re, [2, 122]), s([1, 8, 9, 12, 13, 20, 22, 39, 41, 44, 66, 67, 68, 69, 70, 71, 72, 77, 79], [2, 123]), s(De, [2, 6], { 10: 5, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 19: 21, 38: 22, 43: 23, 16: 39, 17: 40, 5: 87, 33: i, 35: a, 37: u, 42: l, 46: r, 47: o, 49: A, 50: g, 52: D, 54: L, 55: Ae, 58: m, 60: fe, 61: ge, 62: Ce, 63: me, 73: be, 74: Ee, 76: ye, 80: Te, 81: ke, 84: b, 99: E, 101: y, 102: T }), { 5: 88, 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: i, 35: a, 37: u, 38: 22, 42: l, 43: 23, 46: r, 47: o, 49: A, 50: g, 52: D, 54: L, 55: Ae, 58: m, 60: fe, 61: ge, 62: Ce, 63: me, 73: be, 74: Ee, 76: ye, 80: Te, 81: ke, 84: b, 99: E, 101: y, 102: T }, s(d, [2, 20]), s(d, [2, 31]), s(d, [2, 32]), { 13: [1, 90], 16: 39, 17: 40, 19: 89, 58: m, 84: b, 99: E, 101: y, 102: T }, { 51: 91, 64: 56, 65: 57, 66: ee, 67: te, 68: se, 69: ie, 70: ae, 71: Fe, 72: Be }, s(d, [2, 50]), { 65: 92, 71: Fe, 72: Be }, s(ue, [2, 69], { 64: 93, 66: ee, 67: te, 68: se, 69: ie, 70: ae }), s(z, [2, 70]), s(z, [2, 71]), s(z, [2, 72]), s(z, [2, 73]), s(z, [2, 74]), s(Me, [2, 75]), s(Me, [2, 76]), { 8: [1, 95], 24: 96, 40: 94, 43: 23, 46: r }, { 16: 97, 58: m, 84: b, 99: E, 101: y }, { 45: 98, 49: _e }, { 48: [1, 100] }, { 13: [1, 101] }, { 13: [1, 102] }, { 77: [1, 103], 79: [1, 104] }, { 22: K, 57: 105, 58: Y, 80: Q, 82: 106, 83: 107, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }, { 58: [1, 117] }, { 13: Pe, 53: 118 }, s(d, [2, 58]), s(d, [2, 124]), { 22: K, 57: 119, 58: Y, 59: [1, 120], 80: Q, 82: 106, 83: 107, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }, s(Re, [2, 60]), { 16: 39, 17: 40, 19: 121, 58: m, 84: b, 99: E, 101: y, 102: T }, s(P, [2, 16]), s(P, [2, 17]), s(P, [2, 18]), { 39: [2, 36] }, { 15: 123, 16: 84, 17: 85, 18: [1, 122], 39: [2, 9], 58: m, 84: b, 99: E, 101: y, 102: T }, { 39: [2, 10] }, s(Se, [2, 44], { 11: 124, 12: [1, 125] }), s(De, [2, 7]), { 9: [1, 126] }, s(le, [2, 53]), { 16: 39, 17: 40, 19: 127, 58: m, 84: b, 99: E, 101: y, 102: T }, { 13: [1, 129], 16: 39, 17: 40, 19: 128, 58: m, 84: b, 99: E, 101: y, 102: T }, s(ue, [2, 68], { 64: 130, 66: ee, 67: te, 68: se, 69: ie, 70: ae }), s(ue, [2, 67]), { 41: [1, 131] }, { 24: 96, 40: 132, 43: 23, 46: r }, { 8: [1, 133], 41: [2, 37] }, s(ne, [2, 41], { 39: [1, 134] }), { 41: [1, 135] }, { 41: [2, 47], 45: 136, 49: _e }, { 16: 39, 17: 40, 19: 137, 58: m, 84: b, 99: E, 101: y, 102: T }, s(d, [2, 77], { 13: [1, 138] }), s(d, [2, 79], { 13: [1, 140], 75: [1, 139] }), s(d, [2, 83], { 13: [1, 141], 78: [1, 142] }), { 13: [1, 143] }, s(d, [2, 91], { 59: Ge }), s(Ue, [2, 93], { 83: 145, 22: K, 58: Y, 80: Q, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }), s(N, [2, 95]), s(N, [2, 97]), s(N, [2, 98]), s(N, [2, 99]), s(N, [2, 100]), s(N, [2, 101]), s(N, [2, 102]), s(N, [2, 103]), s(N, [2, 104]), s(N, [2, 105]), s(d, [2, 92]), s(d, [2, 57]), s(d, [2, 59], { 59: Ge }), { 58: [1, 146] }, s(P, [2, 14]), { 15: 147, 16: 84, 17: 85, 58: m, 84: b, 99: E, 101: y, 102: T }, { 39: [2, 12] }, s(Se, [2, 45]), { 13: [1, 148] }, { 1: [2, 4] }, s(le, [2, 55]), s(le, [2, 54]), { 16: 39, 17: 40, 19: 149, 58: m, 84: b, 99: E, 101: y, 102: T }, s(ue, [2, 66]), s(d, [2, 34]), { 41: [1, 150] }, { 24: 96, 40: 151, 41: [2, 38], 43: 23, 46: r }, { 45: 152, 49: _e }, s(ne, [2, 42]), { 41: [2, 48] }, s(d, [2, 46]), s(d, [2, 78]), s(d, [2, 80]), s(d, [2, 81], { 75: [1, 153] }), s(d, [2, 84]), s(d, [2, 85], { 13: [1, 154] }), s(d, [2, 87], { 13: [1, 156], 75: [1, 155] }), { 22: K, 58: Y, 80: Q, 82: 157, 83: 107, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }, s(N, [2, 96]), s(Re, [2, 61]), { 39: [2, 11] }, { 14: [1, 158] }, s(le, [2, 56]), s(d, [2, 35]), { 41: [2, 39] }, { 41: [1, 159] }, s(d, [2, 82]), s(d, [2, 86]), s(d, [2, 88]), s(d, [2, 89], { 75: [1, 160] }), s(Ue, [2, 94], { 83: 145, 22: K, 58: Y, 80: Q, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }), s(Se, [2, 8]), s(ne, [2, 43]), s(d, [2, 90])],
230
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 83: [2, 36], 85: [2, 10], 123: [2, 12], 126: [2, 4], 136: [2, 48], 147: [2, 11], 151: [2, 39] },
231
+ parseError: /* @__PURE__ */ f(function(c, h) {
232
+ if (h.recoverable)
233
+ this.trace(c);
234
+ else {
235
+ var p = new Error(c);
236
+ throw p.hash = h, p;
237
+ }
238
+ }, "parseError"),
239
+ parse: /* @__PURE__ */ f(function(c) {
240
+ var h = this, p = [0], n = [], C = [null], e = [], Z = this.table, t = "", oe = 0, ze = 0, He = 2, Ke = 1, Je = e.slice.call(arguments, 1), k = Object.create(this.lexer), O = { yy: {} };
241
+ for (var Le in this.yy)
242
+ Object.prototype.hasOwnProperty.call(this.yy, Le) && (O.yy[Le] = this.yy[Le]);
243
+ k.setInput(c, O.yy), O.yy.lexer = k, O.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
244
+ var xe = k.yylloc;
245
+ e.push(xe);
246
+ var Ze = k.options && k.options.ranges;
247
+ typeof O.yy.parseError == "function" ? this.parseError = O.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
248
+ function $e(_) {
249
+ p.length = p.length - 2 * _, C.length = C.length - _, e.length = e.length - _;
250
+ }
251
+ f($e, "popStack");
252
+ function Ye() {
253
+ var _;
254
+ return _ = n.pop() || k.lex() || Ke, typeof _ != "number" && (_ instanceof Array && (n = _, _ = n.pop()), _ = h.symbols_[_] || _), _;
255
+ }
256
+ f(Ye, "lex");
257
+ for (var B, w, S, ve, M = {}, he, x, Qe, de; ; ) {
258
+ if (w = p[p.length - 1], this.defaultActions[w] ? S = this.defaultActions[w] : ((B === null || typeof B > "u") && (B = Ye()), S = Z[w] && Z[w][B]), typeof S > "u" || !S.length || !S[0]) {
259
+ var Ie = "";
260
+ de = [];
261
+ for (he in Z[w])
262
+ this.terminals_[he] && he > He && de.push("'" + this.terminals_[he] + "'");
263
+ k.showPosition ? Ie = "Parse error on line " + (oe + 1) + `:
264
+ ` + k.showPosition() + `
265
+ Expecting ` + de.join(", ") + ", got '" + (this.terminals_[B] || B) + "'" : Ie = "Parse error on line " + (oe + 1) + ": Unexpected " + (B == Ke ? "end of input" : "'" + (this.terminals_[B] || B) + "'"), this.parseError(Ie, {
266
+ text: k.match,
267
+ token: this.terminals_[B] || B,
268
+ line: k.yylineno,
269
+ loc: xe,
270
+ expected: de
271
+ });
272
+ }
273
+ if (S[0] instanceof Array && S.length > 1)
274
+ throw new Error("Parse Error: multiple actions possible at state: " + w + ", token: " + B);
275
+ switch (S[0]) {
276
+ case 1:
277
+ p.push(B), C.push(k.yytext), e.push(k.yylloc), p.push(S[1]), B = null, ze = k.yyleng, t = k.yytext, oe = k.yylineno, xe = k.yylloc;
278
+ break;
279
+ case 2:
280
+ if (x = this.productions_[S[1]][1], M.$ = C[C.length - x], M._$ = {
281
+ first_line: e[e.length - (x || 1)].first_line,
282
+ last_line: e[e.length - 1].last_line,
283
+ first_column: e[e.length - (x || 1)].first_column,
284
+ last_column: e[e.length - 1].last_column
285
+ }, Ze && (M._$.range = [
286
+ e[e.length - (x || 1)].range[0],
287
+ e[e.length - 1].range[1]
288
+ ]), ve = this.performAction.apply(M, [
289
+ t,
290
+ ze,
291
+ oe,
292
+ O.yy,
293
+ S[1],
294
+ C,
295
+ e
296
+ ].concat(Je)), typeof ve < "u")
297
+ return ve;
298
+ x && (p = p.slice(0, -1 * x * 2), C = C.slice(0, -1 * x), e = e.slice(0, -1 * x)), p.push(this.productions_[S[1]][0]), C.push(M.$), e.push(M._$), Qe = Z[p[p.length - 2]][p[p.length - 1]], p.push(Qe);
299
+ break;
300
+ case 3:
301
+ return !0;
302
+ }
303
+ }
304
+ return !0;
305
+ }, "parse")
306
+ }, qe = /* @__PURE__ */ function() {
307
+ var I = {
308
+ EOF: 1,
309
+ parseError: /* @__PURE__ */ f(function(h, p) {
310
+ if (this.yy.parser)
311
+ this.yy.parser.parseError(h, p);
312
+ else
313
+ throw new Error(h);
314
+ }, "parseError"),
315
+ // resets the lexer, sets new input
316
+ setInput: /* @__PURE__ */ f(function(c, h) {
317
+ return this.yy = h || this.yy || {}, this._input = c, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
318
+ first_line: 1,
319
+ first_column: 0,
320
+ last_line: 1,
321
+ last_column: 0
322
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
323
+ }, "setInput"),
324
+ // consumes and returns one char from the input
325
+ input: /* @__PURE__ */ f(function() {
326
+ var c = this._input[0];
327
+ this.yytext += c, this.yyleng++, this.offset++, this.match += c, this.matched += c;
328
+ var h = c.match(/(?:\r\n?|\n).*/g);
329
+ return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), c;
330
+ }, "input"),
331
+ // unshifts one char (or a string) into the input
332
+ unput: /* @__PURE__ */ f(function(c) {
333
+ var h = c.length, p = c.split(/(?:\r\n?|\n)/g);
334
+ this._input = c + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
335
+ var n = this.match.split(/(?:\r\n?|\n)/g);
336
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), p.length - 1 && (this.yylineno -= p.length - 1);
337
+ var C = this.yylloc.range;
338
+ return this.yylloc = {
339
+ first_line: this.yylloc.first_line,
340
+ last_line: this.yylineno + 1,
341
+ first_column: this.yylloc.first_column,
342
+ last_column: p ? (p.length === n.length ? this.yylloc.first_column : 0) + n[n.length - p.length].length - p[0].length : this.yylloc.first_column - h
343
+ }, this.options.ranges && (this.yylloc.range = [C[0], C[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
344
+ }, "unput"),
345
+ // When called from action, caches matched text and appends it on next action
346
+ more: /* @__PURE__ */ f(function() {
347
+ return this._more = !0, this;
348
+ }, "more"),
349
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
350
+ reject: /* @__PURE__ */ f(function() {
351
+ if (this.options.backtrack_lexer)
352
+ this._backtrack = !0;
353
+ else
354
+ return 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).
355
+ ` + this.showPosition(), {
356
+ text: "",
357
+ token: null,
358
+ line: this.yylineno
359
+ });
360
+ return this;
361
+ }, "reject"),
362
+ // retain first n characters of the match
363
+ less: /* @__PURE__ */ f(function(c) {
364
+ this.unput(this.match.slice(c));
365
+ }, "less"),
366
+ // displays already matched input, i.e. for error messages
367
+ pastInput: /* @__PURE__ */ f(function() {
368
+ var c = this.matched.substr(0, this.matched.length - this.match.length);
369
+ return (c.length > 20 ? "..." : "") + c.substr(-20).replace(/\n/g, "");
370
+ }, "pastInput"),
371
+ // displays upcoming input, i.e. for error messages
372
+ upcomingInput: /* @__PURE__ */ f(function() {
373
+ var c = this.match;
374
+ return c.length < 20 && (c += this._input.substr(0, 20 - c.length)), (c.substr(0, 20) + (c.length > 20 ? "..." : "")).replace(/\n/g, "");
375
+ }, "upcomingInput"),
376
+ // displays the character position where the lexing error occurred, i.e. for error messages
377
+ showPosition: /* @__PURE__ */ f(function() {
378
+ var c = this.pastInput(), h = new Array(c.length + 1).join("-");
379
+ return c + this.upcomingInput() + `
380
+ ` + h + "^";
381
+ }, "showPosition"),
382
+ // test the lexed token: return FALSE when not a match, otherwise return token
383
+ test_match: /* @__PURE__ */ f(function(c, h) {
384
+ var p, n, C;
385
+ if (this.options.backtrack_lexer && (C = {
386
+ yylineno: this.yylineno,
387
+ yylloc: {
388
+ first_line: this.yylloc.first_line,
389
+ last_line: this.last_line,
390
+ first_column: this.yylloc.first_column,
391
+ last_column: this.yylloc.last_column
392
+ },
393
+ yytext: this.yytext,
394
+ match: this.match,
395
+ matches: this.matches,
396
+ matched: this.matched,
397
+ yyleng: this.yyleng,
398
+ offset: this.offset,
399
+ _more: this._more,
400
+ _input: this._input,
401
+ yy: this.yy,
402
+ conditionStack: this.conditionStack.slice(0),
403
+ done: this.done
404
+ }, this.options.ranges && (C.yylloc.range = this.yylloc.range.slice(0))), n = c[0].match(/(?:\r\n?|\n).*/g), n && (this.yylineno += n.length), this.yylloc = {
405
+ first_line: this.yylloc.last_line,
406
+ last_line: this.yylineno + 1,
407
+ first_column: this.yylloc.last_column,
408
+ last_column: n ? n[n.length - 1].length - n[n.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + c[0].length
409
+ }, this.yytext += c[0], this.match += c[0], this.matches = c, 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(c[0].length), this.matched += c[0], p = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p)
410
+ return p;
411
+ if (this._backtrack) {
412
+ for (var e in C)
413
+ this[e] = C[e];
414
+ return !1;
415
+ }
416
+ return !1;
417
+ }, "test_match"),
418
+ // return next match in input
419
+ next: /* @__PURE__ */ f(function() {
420
+ if (this.done)
421
+ return this.EOF;
422
+ this._input || (this.done = !0);
423
+ var c, h, p, n;
424
+ this._more || (this.yytext = "", this.match = "");
425
+ for (var C = this._currentRules(), e = 0; e < C.length; e++)
426
+ if (p = this._input.match(this.rules[C[e]]), p && (!h || p[0].length > h[0].length)) {
427
+ if (h = p, n = e, this.options.backtrack_lexer) {
428
+ if (c = this.test_match(p, C[e]), c !== !1)
429
+ return c;
430
+ if (this._backtrack) {
431
+ h = !1;
432
+ continue;
433
+ } else
434
+ return !1;
435
+ } else if (!this.options.flex)
436
+ break;
437
+ }
438
+ return h ? (c = this.test_match(h, C[n]), c !== !1 ? c : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
439
+ ` + this.showPosition(), {
440
+ text: "",
441
+ token: null,
442
+ line: this.yylineno
443
+ });
444
+ }, "next"),
445
+ // return next match that has a token
446
+ lex: /* @__PURE__ */ f(function() {
447
+ var h = this.next();
448
+ return h || this.lex();
449
+ }, "lex"),
450
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
451
+ begin: /* @__PURE__ */ f(function(h) {
452
+ this.conditionStack.push(h);
453
+ }, "begin"),
454
+ // pop the previously active lexer condition state off the condition stack
455
+ popState: /* @__PURE__ */ f(function() {
456
+ var h = this.conditionStack.length - 1;
457
+ return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
458
+ }, "popState"),
459
+ // produce the lexer rule set which is active for the currently active lexer condition state
460
+ _currentRules: /* @__PURE__ */ f(function() {
461
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
462
+ }, "_currentRules"),
463
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
464
+ topState: /* @__PURE__ */ f(function(h) {
465
+ return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
466
+ }, "topState"),
467
+ // alias for begin(condition)
468
+ pushState: /* @__PURE__ */ f(function(h) {
469
+ this.begin(h);
470
+ }, "pushState"),
471
+ // return the number of states currently on the stack
472
+ stateStackSize: /* @__PURE__ */ f(function() {
473
+ return this.conditionStack.length;
474
+ }, "stateStackSize"),
475
+ options: {},
476
+ performAction: /* @__PURE__ */ f(function(h, p, n, C) {
477
+ switch (n) {
478
+ case 0:
479
+ return 60;
480
+ case 1:
481
+ return 61;
482
+ case 2:
483
+ return 62;
484
+ case 3:
485
+ return 63;
486
+ case 4:
487
+ break;
488
+ case 5:
489
+ break;
490
+ case 6:
491
+ return this.begin("acc_title"), 33;
492
+ case 7:
493
+ return this.popState(), "acc_title_value";
494
+ case 8:
495
+ return this.begin("acc_descr"), 35;
496
+ case 9:
497
+ return this.popState(), "acc_descr_value";
498
+ case 10:
499
+ this.begin("acc_descr_multiline");
500
+ break;
501
+ case 11:
502
+ this.popState();
503
+ break;
504
+ case 12:
505
+ return "acc_descr_multiline_value";
506
+ case 13:
507
+ return 8;
508
+ case 14:
509
+ break;
510
+ case 15:
511
+ return 7;
512
+ case 16:
513
+ return 7;
514
+ case 17:
515
+ return "EDGE_STATE";
516
+ case 18:
517
+ this.begin("callback_name");
518
+ break;
519
+ case 19:
520
+ this.popState();
521
+ break;
522
+ case 20:
523
+ this.popState(), this.begin("callback_args");
524
+ break;
525
+ case 21:
526
+ return 77;
527
+ case 22:
528
+ this.popState();
529
+ break;
530
+ case 23:
531
+ return 78;
532
+ case 24:
533
+ this.popState();
534
+ break;
535
+ case 25:
536
+ return "STR";
537
+ case 26:
538
+ this.begin("string");
539
+ break;
540
+ case 27:
541
+ return 80;
542
+ case 28:
543
+ return 55;
544
+ case 29:
545
+ return this.begin("namespace"), 42;
546
+ case 30:
547
+ return this.popState(), 8;
548
+ case 31:
549
+ break;
550
+ case 32:
551
+ return this.begin("namespace-body"), 39;
552
+ case 33:
553
+ return this.popState(), 41;
554
+ case 34:
555
+ return "EOF_IN_STRUCT";
556
+ case 35:
557
+ return 8;
558
+ case 36:
559
+ break;
560
+ case 37:
561
+ return "EDGE_STATE";
562
+ case 38:
563
+ return this.begin("class"), 46;
564
+ case 39:
565
+ return this.popState(), 8;
566
+ case 40:
567
+ break;
568
+ case 41:
569
+ return this.popState(), this.popState(), 41;
570
+ case 42:
571
+ return this.begin("class-body"), 39;
572
+ case 43:
573
+ return this.popState(), 41;
574
+ case 44:
575
+ return "EOF_IN_STRUCT";
576
+ case 45:
577
+ return "EDGE_STATE";
578
+ case 46:
579
+ return "OPEN_IN_STRUCT";
580
+ case 47:
581
+ break;
582
+ case 48:
583
+ return "MEMBER";
584
+ case 49:
585
+ return 81;
586
+ case 50:
587
+ return 73;
588
+ case 51:
589
+ return 74;
590
+ case 52:
591
+ return 76;
592
+ case 53:
593
+ return 52;
594
+ case 54:
595
+ return 54;
596
+ case 55:
597
+ return 47;
598
+ case 56:
599
+ return 48;
600
+ case 57:
601
+ return 79;
602
+ case 58:
603
+ this.popState();
604
+ break;
605
+ case 59:
606
+ return "GENERICTYPE";
607
+ case 60:
608
+ this.begin("generic");
609
+ break;
610
+ case 61:
611
+ this.popState();
612
+ break;
613
+ case 62:
614
+ return "BQUOTE_STR";
615
+ case 63:
616
+ this.begin("bqstring");
617
+ break;
618
+ case 64:
619
+ return 75;
620
+ case 65:
621
+ return 75;
622
+ case 66:
623
+ return 75;
624
+ case 67:
625
+ return 75;
626
+ case 68:
627
+ return 67;
628
+ case 69:
629
+ return 67;
630
+ case 70:
631
+ return 69;
632
+ case 71:
633
+ return 69;
634
+ case 72:
635
+ return 68;
636
+ case 73:
637
+ return 66;
638
+ case 74:
639
+ return 70;
640
+ case 75:
641
+ return 71;
642
+ case 76:
643
+ return 72;
644
+ case 77:
645
+ return 22;
646
+ case 78:
647
+ return 44;
648
+ case 79:
649
+ return 99;
650
+ case 80:
651
+ return 18;
652
+ case 81:
653
+ return "PLUS";
654
+ case 82:
655
+ return 85;
656
+ case 83:
657
+ return 59;
658
+ case 84:
659
+ return 88;
660
+ case 85:
661
+ return 88;
662
+ case 86:
663
+ return 89;
664
+ case 87:
665
+ return "EQUALS";
666
+ case 88:
667
+ return "EQUALS";
668
+ case 89:
669
+ return 58;
670
+ case 90:
671
+ return 12;
672
+ case 91:
673
+ return 14;
674
+ case 92:
675
+ return "PUNCTUATION";
676
+ case 93:
677
+ return 84;
678
+ case 94:
679
+ return 101;
680
+ case 95:
681
+ return 87;
682
+ case 96:
683
+ return 87;
684
+ case 97:
685
+ return 9;
686
+ }
687
+ }, "anonymous"),
688
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:classDef\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/],
689
+ conditions: { "namespace-body": { rules: [26, 33, 34, 35, 36, 37, 38, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, namespace: { rules: [26, 29, 30, 31, 32, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, "class-body": { rules: [26, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, class: { rules: [26, 39, 40, 41, 42, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, acc_descr: { rules: [9, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, acc_title: { rules: [7, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, callback_args: { rules: [22, 23, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, callback_name: { rules: [19, 20, 21, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, href: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, struct: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, generic: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, bqstring: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, string: { rules: [24, 25, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 29, 38, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], inclusive: !0 } }
690
+ };
691
+ return I;
692
+ }();
693
+ Ne.lexer = qe;
694
+ function ce() {
695
+ this.yy = {};
696
+ }
697
+ return f(ce, "Parser"), ce.prototype = Ne, Ne.Parser = ce, new ce();
698
+ }();
699
+ Ve.parser = Ve;
700
+ var Tt = Ve, We = ["#", "+", "~", "-", ""], G, je = (G = class {
701
+ constructor(i, a) {
702
+ this.memberType = a, this.visibility = "", this.classifier = "", this.text = "";
703
+ const u = pt(i, F());
704
+ this.parseMember(u);
705
+ }
706
+ getDisplayDetails() {
707
+ let i = this.visibility + R(this.id);
708
+ this.memberType === "method" && (i += `(${R(this.parameters.trim())})`, this.returnType && (i += " : " + R(this.returnType))), i = i.trim();
709
+ const a = this.parseClassifier();
710
+ return {
711
+ displayText: i,
712
+ cssStyle: a
713
+ };
714
+ }
715
+ parseMember(i) {
716
+ let a = "";
717
+ if (this.memberType === "method") {
718
+ const r = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);
719
+ if (r) {
720
+ const o = r[1] ? r[1].trim() : "";
721
+ if (We.includes(o) && (this.visibility = o), this.id = r[2], this.parameters = r[3] ? r[3].trim() : "", a = r[4] ? r[4].trim() : "", this.returnType = r[5] ? r[5].trim() : "", a === "") {
722
+ const A = this.returnType.substring(this.returnType.length - 1);
723
+ /[$*]/.exec(A) && (a = A, this.returnType = this.returnType.substring(0, this.returnType.length - 1));
724
+ }
725
+ }
726
+ } else {
727
+ const l = i.length, r = i.substring(0, 1), o = i.substring(l - 1);
728
+ We.includes(r) && (this.visibility = r), /[$*]/.exec(o) && (a = o), this.id = i.substring(
729
+ this.visibility === "" ? 0 : 1,
730
+ a === "" ? l : l - 1
731
+ );
732
+ }
733
+ this.classifier = a, this.id = this.id.startsWith(" ") ? " " + this.id.trim() : this.id.trim();
734
+ const u = `${this.visibility ? "\\" + this.visibility : ""}${R(this.id)}${this.memberType === "method" ? `(${R(this.parameters)})${this.returnType ? " : " + R(this.returnType) : ""}` : ""}`;
735
+ this.text = u.replaceAll("<", "&lt;").replaceAll(">", "&gt;"), this.text.startsWith("\\&lt;") && (this.text = this.text.replace("\\&lt;", "~"));
736
+ }
737
+ parseClassifier() {
738
+ switch (this.classifier) {
739
+ case "*":
740
+ return "font-style:italic;";
741
+ case "$":
742
+ return "text-decoration:underline;";
743
+ default:
744
+ return "";
745
+ }
746
+ }
747
+ }, f(G, "ClassMember"), G), pe = "classId-", Xe = 0, V = /* @__PURE__ */ f((s) => v.sanitizeText(s, F()), "sanitizeText"), U, kt = (U = class {
748
+ constructor() {
749
+ this.relations = [], this.classes = /* @__PURE__ */ new Map(), this.styleClasses = /* @__PURE__ */ new Map(), this.notes = [], this.interfaces = [], this.namespaces = /* @__PURE__ */ new Map(), this.namespaceCounter = 0, this.functions = [], this.lineType = {
750
+ LINE: 0,
751
+ DOTTED_LINE: 1
752
+ }, this.relationType = {
753
+ AGGREGATION: 0,
754
+ EXTENSION: 1,
755
+ COMPOSITION: 2,
756
+ DEPENDENCY: 3,
757
+ LOLLIPOP: 4
758
+ }, this.setupToolTips = /* @__PURE__ */ f((i) => {
759
+ let a = $(".mermaidTooltip");
760
+ (a._groups || a)[0][0] === null && (a = $("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), $(i).select("svg").selectAll("g.node").on("mouseover", (r) => {
761
+ const o = $(r.currentTarget);
762
+ if (o.attr("title") === null)
763
+ return;
764
+ const g = this.getBoundingClientRect();
765
+ a.transition().duration(200).style("opacity", ".9"), a.text(o.attr("title")).style("left", window.scrollX + g.left + (g.right - g.left) / 2 + "px").style("top", window.scrollY + g.top - 14 + document.body.scrollTop + "px"), a.html(a.html().replace(/&lt;br\/&gt;/g, "<br/>")), o.classed("hover", !0);
766
+ }).on("mouseout", (r) => {
767
+ a.transition().duration(500).style("opacity", 0), $(r.currentTarget).classed("hover", !1);
768
+ });
769
+ }, "setupToolTips"), this.direction = "TB", this.setAccTitle = nt, this.getAccTitle = rt, this.setAccDescription = ut, this.getAccDescription = lt, this.setDiagramTitle = ct, this.getDiagramTitle = ot, this.getConfig = /* @__PURE__ */ f(() => F().class, "getConfig"), this.functions.push(this.setupToolTips.bind(this)), this.clear(), this.addRelation = this.addRelation.bind(this), this.addClassesToNamespace = this.addClassesToNamespace.bind(this), this.addNamespace = this.addNamespace.bind(this), this.setCssClass = this.setCssClass.bind(this), this.addMembers = this.addMembers.bind(this), this.addClass = this.addClass.bind(this), this.setClassLabel = this.setClassLabel.bind(this), this.addAnnotation = this.addAnnotation.bind(this), this.addMember = this.addMember.bind(this), this.cleanupLabel = this.cleanupLabel.bind(this), this.addNote = this.addNote.bind(this), this.defineClass = this.defineClass.bind(this), this.setDirection = this.setDirection.bind(this), this.setLink = this.setLink.bind(this), this.bindFunctions = this.bindFunctions.bind(this), this.clear = this.clear.bind(this), this.setTooltip = this.setTooltip.bind(this), this.setClickEvent = this.setClickEvent.bind(this), this.setCssStyle = this.setCssStyle.bind(this);
770
+ }
771
+ splitClassNameAndType(i) {
772
+ const a = v.sanitizeText(i, F());
773
+ let u = "", l = a;
774
+ if (a.indexOf("~") > 0) {
775
+ const r = a.split("~");
776
+ l = V(r[0]), u = V(r[1]);
777
+ }
778
+ return { className: l, type: u };
779
+ }
780
+ setClassLabel(i, a) {
781
+ const u = v.sanitizeText(i, F());
782
+ a && (a = V(a));
783
+ const { className: l } = this.splitClassNameAndType(u);
784
+ this.classes.get(l).label = a, this.classes.get(l).text = `${a}${this.classes.get(l).type ? `<${this.classes.get(l).type}>` : ""}`;
785
+ }
786
+ /**
787
+ * Function called by parser when a node definition has been found.
788
+ *
789
+ * @param id - ID of the class to add
790
+ * @public
791
+ */
792
+ addClass(i) {
793
+ const a = v.sanitizeText(i, F()), { className: u, type: l } = this.splitClassNameAndType(a);
794
+ if (this.classes.has(u))
795
+ return;
796
+ const r = v.sanitizeText(u, F());
797
+ this.classes.set(r, {
798
+ id: r,
799
+ type: l,
800
+ label: r,
801
+ text: `${r}${l ? `&lt;${l}&gt;` : ""}`,
802
+ shape: "classBox",
803
+ cssClasses: "default",
804
+ methods: [],
805
+ members: [],
806
+ annotations: [],
807
+ styles: [],
808
+ domId: pe + r + "-" + Xe
809
+ }), Xe++;
810
+ }
811
+ addInterface(i, a) {
812
+ const u = {
813
+ id: `interface${this.interfaces.length}`,
814
+ label: i,
815
+ classId: a
816
+ };
817
+ this.interfaces.push(u);
818
+ }
819
+ /**
820
+ * Function to lookup domId from id in the graph definition.
821
+ *
822
+ * @param id - class ID to lookup
823
+ * @public
824
+ */
825
+ lookUpDomId(i) {
826
+ const a = v.sanitizeText(i, F());
827
+ if (this.classes.has(a))
828
+ return this.classes.get(a).domId;
829
+ throw new Error("Class not found: " + a);
830
+ }
831
+ clear() {
832
+ this.relations = [], this.classes = /* @__PURE__ */ new Map(), this.notes = [], this.interfaces = [], this.functions = [], this.functions.push(this.setupToolTips.bind(this)), this.namespaces = /* @__PURE__ */ new Map(), this.namespaceCounter = 0, this.direction = "TB", ht();
833
+ }
834
+ getClass(i) {
835
+ return this.classes.get(i);
836
+ }
837
+ getClasses() {
838
+ return this.classes;
839
+ }
840
+ getRelations() {
841
+ return this.relations;
842
+ }
843
+ getNotes() {
844
+ return this.notes;
845
+ }
846
+ addRelation(i) {
847
+ Oe.debug("Adding relation: " + JSON.stringify(i));
848
+ const a = [
849
+ this.relationType.LOLLIPOP,
850
+ this.relationType.AGGREGATION,
851
+ this.relationType.COMPOSITION,
852
+ this.relationType.DEPENDENCY,
853
+ this.relationType.EXTENSION
854
+ ];
855
+ i.relation.type1 === this.relationType.LOLLIPOP && !a.includes(i.relation.type2) ? (this.addClass(i.id2), this.addInterface(i.id1, i.id2), i.id1 = `interface${this.interfaces.length - 1}`) : i.relation.type2 === this.relationType.LOLLIPOP && !a.includes(i.relation.type1) ? (this.addClass(i.id1), this.addInterface(i.id2, i.id1), i.id2 = `interface${this.interfaces.length - 1}`) : (this.addClass(i.id1), this.addClass(i.id2)), i.id1 = this.splitClassNameAndType(i.id1).className, i.id2 = this.splitClassNameAndType(i.id2).className, i.relationTitle1 = v.sanitizeText(
856
+ i.relationTitle1.trim(),
857
+ F()
858
+ ), i.relationTitle2 = v.sanitizeText(
859
+ i.relationTitle2.trim(),
860
+ F()
861
+ ), this.relations.push(i);
862
+ }
863
+ /**
864
+ * Adds an annotation to the specified class Annotations mark special properties of the given type
865
+ * (like 'interface' or 'service')
866
+ *
867
+ * @param className - The class name
868
+ * @param annotation - The name of the annotation without any brackets
869
+ * @public
870
+ */
871
+ addAnnotation(i, a) {
872
+ const u = this.splitClassNameAndType(i).className;
873
+ this.classes.get(u).annotations.push(a);
874
+ }
875
+ /**
876
+ * Adds a member to the specified class
877
+ *
878
+ * @param className - The class name
879
+ * @param member - The full name of the member. If the member is enclosed in `<<brackets>>` it is
880
+ * treated as an annotation If the member is ending with a closing bracket ) it is treated as a
881
+ * method Otherwise the member will be treated as a normal property
882
+ * @public
883
+ */
884
+ addMember(i, a) {
885
+ this.addClass(i);
886
+ const u = this.splitClassNameAndType(i).className, l = this.classes.get(u);
887
+ if (typeof a == "string") {
888
+ const r = a.trim();
889
+ r.startsWith("<<") && r.endsWith(">>") ? l.annotations.push(V(r.substring(2, r.length - 2))) : r.indexOf(")") > 0 ? l.methods.push(new je(r, "method")) : r && l.members.push(new je(r, "attribute"));
890
+ }
891
+ }
892
+ addMembers(i, a) {
893
+ Array.isArray(a) && (a.reverse(), a.forEach((u) => this.addMember(i, u)));
894
+ }
895
+ addNote(i, a) {
896
+ const u = {
897
+ id: `note${this.notes.length}`,
898
+ class: a,
899
+ text: i
900
+ };
901
+ this.notes.push(u);
902
+ }
903
+ cleanupLabel(i) {
904
+ return i.startsWith(":") && (i = i.substring(1)), V(i.trim());
905
+ }
906
+ /**
907
+ * Called by parser when assigning cssClass to a class
908
+ *
909
+ * @param ids - Comma separated list of ids
910
+ * @param className - Class to add
911
+ */
912
+ setCssClass(i, a) {
913
+ i.split(",").forEach((u) => {
914
+ let l = u;
915
+ /\d/.exec(u[0]) && (l = pe + l);
916
+ const r = this.classes.get(l);
917
+ r && (r.cssClasses += " " + a);
918
+ });
919
+ }
920
+ defineClass(i, a) {
921
+ for (const u of i) {
922
+ let l = this.styleClasses.get(u);
923
+ l === void 0 && (l = { id: u, styles: [], textStyles: [] }, this.styleClasses.set(u, l)), a && a.forEach((r) => {
924
+ if (/color/.exec(r)) {
925
+ const o = r.replace("fill", "bgFill");
926
+ l.textStyles.push(o);
927
+ }
928
+ l.styles.push(r);
929
+ }), this.classes.forEach((r) => {
930
+ r.cssClasses.includes(u) && r.styles.push(...a.flatMap((o) => o.split(",")));
931
+ });
932
+ }
933
+ }
934
+ /**
935
+ * Called by parser when a tooltip is found, e.g. a clickable element.
936
+ *
937
+ * @param ids - Comma separated list of ids
938
+ * @param tooltip - Tooltip to add
939
+ */
940
+ setTooltip(i, a) {
941
+ i.split(",").forEach((u) => {
942
+ a !== void 0 && (this.classes.get(u).tooltip = V(a));
943
+ });
944
+ }
945
+ getTooltip(i, a) {
946
+ return a && this.namespaces.has(a) ? this.namespaces.get(a).classes.get(i).tooltip : this.classes.get(i).tooltip;
947
+ }
948
+ /**
949
+ * Called by parser when a link is found. Adds the URL to the vertex data.
950
+ *
951
+ * @param ids - Comma separated list of ids
952
+ * @param linkStr - URL to create a link for
953
+ * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
954
+ */
955
+ setLink(i, a, u) {
956
+ const l = F();
957
+ i.split(",").forEach((r) => {
958
+ let o = r;
959
+ /\d/.exec(r[0]) && (o = pe + o);
960
+ const A = this.classes.get(o);
961
+ A && (A.link = we.formatUrl(a, l), l.securityLevel === "sandbox" ? A.linkTarget = "_top" : typeof u == "string" ? A.linkTarget = V(u) : A.linkTarget = "_blank");
962
+ }), this.setCssClass(i, "clickable");
963
+ }
964
+ /**
965
+ * Called by parser when a click definition is found. Registers an event handler.
966
+ *
967
+ * @param ids - Comma separated list of ids
968
+ * @param functionName - Function to be called on click
969
+ * @param functionArgs - Function args the function should be called with
970
+ */
971
+ setClickEvent(i, a, u) {
972
+ i.split(",").forEach((l) => {
973
+ this.setClickFunc(l, a, u), this.classes.get(l).haveCallback = !0;
974
+ }), this.setCssClass(i, "clickable");
975
+ }
976
+ setClickFunc(i, a, u) {
977
+ const l = v.sanitizeText(i, F());
978
+ if (F().securityLevel !== "loose" || a === void 0)
979
+ return;
980
+ const o = l;
981
+ if (this.classes.has(o)) {
982
+ const A = this.lookUpDomId(o);
983
+ let g = [];
984
+ if (typeof u == "string") {
985
+ g = u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
986
+ for (let D = 0; D < g.length; D++) {
987
+ let L = g[D].trim();
988
+ L.startsWith('"') && L.endsWith('"') && (L = L.substr(1, L.length - 2)), g[D] = L;
989
+ }
990
+ }
991
+ g.length === 0 && g.push(A), this.functions.push(() => {
992
+ const D = document.querySelector(`[id="${A}"]`);
993
+ D !== null && D.addEventListener(
994
+ "click",
995
+ () => {
996
+ we.runFunc(a, ...g);
997
+ },
998
+ !1
999
+ );
1000
+ });
1001
+ }
1002
+ }
1003
+ bindFunctions(i) {
1004
+ this.functions.forEach((a) => {
1005
+ a(i);
1006
+ });
1007
+ }
1008
+ getDirection() {
1009
+ return this.direction;
1010
+ }
1011
+ setDirection(i) {
1012
+ this.direction = i;
1013
+ }
1014
+ /**
1015
+ * Function called by parser when a namespace definition has been found.
1016
+ *
1017
+ * @param id - ID of the namespace to add
1018
+ * @public
1019
+ */
1020
+ addNamespace(i) {
1021
+ this.namespaces.has(i) || (this.namespaces.set(i, {
1022
+ id: i,
1023
+ classes: /* @__PURE__ */ new Map(),
1024
+ children: {},
1025
+ domId: pe + i + "-" + this.namespaceCounter
1026
+ }), this.namespaceCounter++);
1027
+ }
1028
+ getNamespace(i) {
1029
+ return this.namespaces.get(i);
1030
+ }
1031
+ getNamespaces() {
1032
+ return this.namespaces;
1033
+ }
1034
+ /**
1035
+ * Function called by parser when a namespace definition has been found.
1036
+ *
1037
+ * @param id - ID of the namespace to add
1038
+ * @param classNames - IDs of the class to add
1039
+ * @public
1040
+ */
1041
+ addClassesToNamespace(i, a) {
1042
+ if (this.namespaces.has(i))
1043
+ for (const u of a) {
1044
+ const { className: l } = this.splitClassNameAndType(u);
1045
+ this.classes.get(l).parent = i, this.namespaces.get(i).classes.set(l, this.classes.get(l));
1046
+ }
1047
+ }
1048
+ setCssStyle(i, a) {
1049
+ const u = this.classes.get(i);
1050
+ if (!(!a || !u))
1051
+ for (const l of a)
1052
+ l.includes(",") ? u.styles.push(...l.split(",")) : u.styles.push(l);
1053
+ }
1054
+ /**
1055
+ * Gets the arrow marker for a type index
1056
+ *
1057
+ * @param type - The type to look for
1058
+ * @returns The arrow marker
1059
+ */
1060
+ getArrowMarker(i) {
1061
+ let a;
1062
+ switch (i) {
1063
+ case 0:
1064
+ a = "aggregation";
1065
+ break;
1066
+ case 1:
1067
+ a = "extension";
1068
+ break;
1069
+ case 2:
1070
+ a = "composition";
1071
+ break;
1072
+ case 3:
1073
+ a = "dependency";
1074
+ break;
1075
+ case 4:
1076
+ a = "lollipop";
1077
+ break;
1078
+ default:
1079
+ a = "none";
1080
+ }
1081
+ return a;
1082
+ }
1083
+ getData() {
1084
+ var r;
1085
+ const i = [], a = [], u = F();
1086
+ for (const o of this.namespaces.keys()) {
1087
+ const A = this.namespaces.get(o);
1088
+ if (A) {
1089
+ const g = {
1090
+ id: A.id,
1091
+ label: A.id,
1092
+ isGroup: !0,
1093
+ padding: u.class.padding ?? 16,
1094
+ // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]
1095
+ shape: "rect",
1096
+ cssStyles: ["fill: none", "stroke: black"],
1097
+ look: u.look
1098
+ };
1099
+ i.push(g);
1100
+ }
1101
+ }
1102
+ for (const o of this.classes.keys()) {
1103
+ const A = this.classes.get(o);
1104
+ if (A) {
1105
+ const g = A;
1106
+ g.parentId = A.parent, g.look = u.look, i.push(g);
1107
+ }
1108
+ }
1109
+ let l = 0;
1110
+ for (const o of this.notes) {
1111
+ l++;
1112
+ const A = {
1113
+ id: o.id,
1114
+ label: o.text,
1115
+ isGroup: !1,
1116
+ shape: "note",
1117
+ padding: u.class.padding ?? 6,
1118
+ cssStyles: [
1119
+ "text-align: left",
1120
+ "white-space: nowrap",
1121
+ `fill: ${u.themeVariables.noteBkgColor}`,
1122
+ `stroke: ${u.themeVariables.noteBorderColor}`
1123
+ ],
1124
+ look: u.look
1125
+ };
1126
+ i.push(A);
1127
+ const g = ((r = this.classes.get(o.class)) == null ? void 0 : r.id) ?? "";
1128
+ if (g) {
1129
+ const D = {
1130
+ id: `edgeNote${l}`,
1131
+ start: o.id,
1132
+ end: g,
1133
+ type: "normal",
1134
+ thickness: "normal",
1135
+ classes: "relation",
1136
+ arrowTypeStart: "none",
1137
+ arrowTypeEnd: "none",
1138
+ arrowheadStyle: "",
1139
+ labelStyle: [""],
1140
+ style: ["fill: none"],
1141
+ pattern: "dotted",
1142
+ look: u.look
1143
+ };
1144
+ a.push(D);
1145
+ }
1146
+ }
1147
+ for (const o of this.interfaces) {
1148
+ const A = {
1149
+ id: o.id,
1150
+ label: o.label,
1151
+ isGroup: !1,
1152
+ shape: "rect",
1153
+ cssStyles: ["opacity: 0;"],
1154
+ look: u.look
1155
+ };
1156
+ i.push(A);
1157
+ }
1158
+ l = 0;
1159
+ for (const o of this.relations) {
1160
+ l++;
1161
+ const A = {
1162
+ id: dt(o.id1, o.id2, {
1163
+ prefix: "id",
1164
+ counter: l
1165
+ }),
1166
+ start: o.id1,
1167
+ end: o.id2,
1168
+ type: "normal",
1169
+ label: o.title,
1170
+ labelpos: "c",
1171
+ thickness: "normal",
1172
+ classes: "relation",
1173
+ arrowTypeStart: this.getArrowMarker(o.relation.type1),
1174
+ arrowTypeEnd: this.getArrowMarker(o.relation.type2),
1175
+ startLabelRight: o.relationTitle1 === "none" ? "" : o.relationTitle1,
1176
+ endLabelLeft: o.relationTitle2 === "none" ? "" : o.relationTitle2,
1177
+ arrowheadStyle: "",
1178
+ labelStyle: ["display: inline-block"],
1179
+ style: o.style || "",
1180
+ pattern: o.relation.lineType == 1 ? "dashed" : "solid",
1181
+ look: u.look
1182
+ };
1183
+ a.push(A);
1184
+ }
1185
+ return { nodes: i, edges: a, other: {}, config: u, direction: this.getDirection() };
1186
+ }
1187
+ }, f(U, "ClassDB"), U), At = /* @__PURE__ */ f((s) => `g.classGroup text {
1188
+ fill: ${s.nodeBorder || s.classText};
1189
+ stroke: none;
1190
+ font-family: ${s.fontFamily};
1191
+ font-size: 10px;
1192
+
1193
+ .title {
1194
+ font-weight: bolder;
1195
+ }
1196
+
1197
+ }
1198
+
1199
+ .nodeLabel, .edgeLabel {
1200
+ color: ${s.classText};
1201
+ }
1202
+ .edgeLabel .label rect {
1203
+ fill: ${s.mainBkg};
1204
+ }
1205
+ .label text {
1206
+ fill: ${s.classText};
1207
+ }
1208
+
1209
+ .labelBkg {
1210
+ background: ${s.mainBkg};
1211
+ }
1212
+ .edgeLabel .label span {
1213
+ background: ${s.mainBkg};
1214
+ }
1215
+
1216
+ .classTitle {
1217
+ font-weight: bolder;
1218
+ }
1219
+ .node rect,
1220
+ .node circle,
1221
+ .node ellipse,
1222
+ .node polygon,
1223
+ .node path {
1224
+ fill: ${s.mainBkg};
1225
+ stroke: ${s.nodeBorder};
1226
+ stroke-width: 1px;
1227
+ }
1228
+
1229
+
1230
+ .divider {
1231
+ stroke: ${s.nodeBorder};
1232
+ stroke-width: 1;
1233
+ }
1234
+
1235
+ g.clickable {
1236
+ cursor: pointer;
1237
+ }
1238
+
1239
+ g.classGroup rect {
1240
+ fill: ${s.mainBkg};
1241
+ stroke: ${s.nodeBorder};
1242
+ }
1243
+
1244
+ g.classGroup line {
1245
+ stroke: ${s.nodeBorder};
1246
+ stroke-width: 1;
1247
+ }
1248
+
1249
+ .classLabel .box {
1250
+ stroke: none;
1251
+ stroke-width: 0;
1252
+ fill: ${s.mainBkg};
1253
+ opacity: 0.5;
1254
+ }
1255
+
1256
+ .classLabel .label {
1257
+ fill: ${s.nodeBorder};
1258
+ font-size: 10px;
1259
+ }
1260
+
1261
+ .relation {
1262
+ stroke: ${s.lineColor};
1263
+ stroke-width: 1;
1264
+ fill: none;
1265
+ }
1266
+
1267
+ .dashed-line{
1268
+ stroke-dasharray: 3;
1269
+ }
1270
+
1271
+ .dotted-line{
1272
+ stroke-dasharray: 1 2;
1273
+ }
1274
+
1275
+ #compositionStart, .composition {
1276
+ fill: ${s.lineColor} !important;
1277
+ stroke: ${s.lineColor} !important;
1278
+ stroke-width: 1;
1279
+ }
1280
+
1281
+ #compositionEnd, .composition {
1282
+ fill: ${s.lineColor} !important;
1283
+ stroke: ${s.lineColor} !important;
1284
+ stroke-width: 1;
1285
+ }
1286
+
1287
+ #dependencyStart, .dependency {
1288
+ fill: ${s.lineColor} !important;
1289
+ stroke: ${s.lineColor} !important;
1290
+ stroke-width: 1;
1291
+ }
1292
+
1293
+ #dependencyStart, .dependency {
1294
+ fill: ${s.lineColor} !important;
1295
+ stroke: ${s.lineColor} !important;
1296
+ stroke-width: 1;
1297
+ }
1298
+
1299
+ #extensionStart, .extension {
1300
+ fill: transparent !important;
1301
+ stroke: ${s.lineColor} !important;
1302
+ stroke-width: 1;
1303
+ }
1304
+
1305
+ #extensionEnd, .extension {
1306
+ fill: transparent !important;
1307
+ stroke: ${s.lineColor} !important;
1308
+ stroke-width: 1;
1309
+ }
1310
+
1311
+ #aggregationStart, .aggregation {
1312
+ fill: transparent !important;
1313
+ stroke: ${s.lineColor} !important;
1314
+ stroke-width: 1;
1315
+ }
1316
+
1317
+ #aggregationEnd, .aggregation {
1318
+ fill: transparent !important;
1319
+ stroke: ${s.lineColor} !important;
1320
+ stroke-width: 1;
1321
+ }
1322
+
1323
+ #lollipopStart, .lollipop {
1324
+ fill: ${s.mainBkg} !important;
1325
+ stroke: ${s.lineColor} !important;
1326
+ stroke-width: 1;
1327
+ }
1328
+
1329
+ #lollipopEnd, .lollipop {
1330
+ fill: ${s.mainBkg} !important;
1331
+ stroke: ${s.lineColor} !important;
1332
+ stroke-width: 1;
1333
+ }
1334
+
1335
+ .edgeTerminals {
1336
+ font-size: 11px;
1337
+ line-height: initial;
1338
+ }
1339
+
1340
+ .classTitleText {
1341
+ text-anchor: middle;
1342
+ font-size: 18px;
1343
+ fill: ${s.textColor};
1344
+ }
1345
+ ${et()}
1346
+ `, "getStyles"), Dt = At, ft = /* @__PURE__ */ f((s, i = "TB") => {
1347
+ if (!s.doc)
1348
+ return i;
1349
+ let a = i;
1350
+ for (const u of s.doc)
1351
+ u.stmt === "dir" && (a = u.value);
1352
+ return a;
1353
+ }, "getDir"), gt = /* @__PURE__ */ f(function(s, i) {
1354
+ return i.db.getClasses();
1355
+ }, "getClasses"), Ct = /* @__PURE__ */ f(async function(s, i, a, u) {
1356
+ Oe.info("REF0:"), Oe.info("Drawing class diagram (v3)", i);
1357
+ const { securityLevel: l, state: r, layout: o } = F(), A = u.db.getData(), g = tt(i, l);
1358
+ A.type = u.type, A.layoutAlgorithm = it(o), A.nodeSpacing = (r == null ? void 0 : r.nodeSpacing) || 50, A.rankSpacing = (r == null ? void 0 : r.rankSpacing) || 50, A.markers = ["aggregation", "extension", "composition", "dependency", "lollipop"], A.diagramId = i, await at(A, g);
1359
+ const D = 8;
1360
+ we.insertTitle(
1361
+ g,
1362
+ "classDiagramTitleText",
1363
+ (r == null ? void 0 : r.titleTopMargin) ?? 25,
1364
+ u.db.getDiagramTitle()
1365
+ ), st(g, D, "classDiagram", (r == null ? void 0 : r.useMaxWidth) ?? !0);
1366
+ }, "draw"), Ft = {
1367
+ getClasses: gt,
1368
+ draw: Ct,
1369
+ getDir: ft
1370
+ };
1371
+ export {
1372
+ kt as C,
1373
+ Tt as a,
1374
+ Ft as c,
1375
+ Dt as s
1376
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-LXBSTHXV-CNtjhS2l.js ADDED
@@ -0,0 +1,1382 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { g as te } from "./chunk-WVR4S24B-Br22bM8P.js";
2
+ import { s as ee } from "./chunk-NRVI72HA-CQ3LV39f.js";
3
+ import { _ as f, l as D, c as F, r as se, u as ie, a as re, b as ae, g as ne, s as oe, p as le, q as ce, T as he, k as W, y as ue } from "./mermaid.core-DH6TRyjK.js";
4
+ var vt = function() {
5
+ var e = /* @__PURE__ */ f(function(V, o, h, n) {
6
+ for (h = h || {}, n = V.length; n--; h[V[n]] = o) ;
7
+ return h;
8
+ }, "o"), t = [1, 2], s = [1, 3], a = [1, 4], i = [2, 4], l = [1, 9], d = [1, 11], S = [1, 16], p = [1, 17], T = [1, 18], _ = [1, 19], m = [1, 33], k = [1, 20], A = [1, 21], $ = [1, 22], x = [1, 23], R = [1, 24], u = [1, 26], L = [1, 27], I = [1, 28], N = [1, 29], G = [1, 30], P = [1, 31], B = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], K = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
9
+ trace: /* @__PURE__ */ f(function() {
10
+ }, "trace"),
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, styleStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
14
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
15
+ performAction: /* @__PURE__ */ f(function(o, h, n, g, E, r, Z) {
16
+ var c = r.length - 1;
17
+ switch (E) {
18
+ case 3:
19
+ return g.setRootDoc(r[c]), r[c];
20
+ case 4:
21
+ this.$ = [];
22
+ break;
23
+ case 5:
24
+ r[c] != "nl" && (r[c - 1].push(r[c]), this.$ = r[c - 1]);
25
+ break;
26
+ case 6:
27
+ case 7:
28
+ this.$ = r[c];
29
+ break;
30
+ case 8:
31
+ this.$ = "nl";
32
+ break;
33
+ case 12:
34
+ this.$ = r[c];
35
+ break;
36
+ case 13:
37
+ const tt = r[c - 1];
38
+ tt.description = g.trimColon(r[c]), this.$ = tt;
39
+ break;
40
+ case 14:
41
+ this.$ = { stmt: "relation", state1: r[c - 2], state2: r[c] };
42
+ break;
43
+ case 15:
44
+ const Tt = g.trimColon(r[c]);
45
+ this.$ = { stmt: "relation", state1: r[c - 3], state2: r[c - 1], description: Tt };
46
+ break;
47
+ case 19:
48
+ this.$ = { stmt: "state", id: r[c - 3], type: "default", description: "", doc: r[c - 1] };
49
+ break;
50
+ case 20:
51
+ var U = r[c], X = r[c - 2].trim();
52
+ if (r[c].match(":")) {
53
+ var ut = r[c].split(":");
54
+ U = ut[0], X = [X, ut[1]];
55
+ }
56
+ this.$ = { stmt: "state", id: U, type: "default", description: X };
57
+ break;
58
+ case 21:
59
+ this.$ = { stmt: "state", id: r[c - 3], type: "default", description: r[c - 5], doc: r[c - 1] };
60
+ break;
61
+ case 22:
62
+ this.$ = { stmt: "state", id: r[c], type: "fork" };
63
+ break;
64
+ case 23:
65
+ this.$ = { stmt: "state", id: r[c], type: "join" };
66
+ break;
67
+ case 24:
68
+ this.$ = { stmt: "state", id: r[c], type: "choice" };
69
+ break;
70
+ case 25:
71
+ this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
72
+ break;
73
+ case 26:
74
+ this.$ = { stmt: "state", id: r[c - 1].trim(), note: { position: r[c - 2].trim(), text: r[c].trim() } };
75
+ break;
76
+ case 29:
77
+ this.$ = r[c].trim(), g.setAccTitle(this.$);
78
+ break;
79
+ case 30:
80
+ case 31:
81
+ this.$ = r[c].trim(), g.setAccDescription(this.$);
82
+ break;
83
+ case 32:
84
+ this.$ = {
85
+ stmt: "click",
86
+ id: r[c - 3],
87
+ url: r[c - 2],
88
+ tooltip: r[c - 1]
89
+ };
90
+ break;
91
+ case 33:
92
+ this.$ = {
93
+ stmt: "click",
94
+ id: r[c - 3],
95
+ url: r[c - 1],
96
+ tooltip: ""
97
+ };
98
+ break;
99
+ case 34:
100
+ case 35:
101
+ this.$ = { stmt: "classDef", id: r[c - 1].trim(), classes: r[c].trim() };
102
+ break;
103
+ case 36:
104
+ this.$ = { stmt: "style", id: r[c - 1].trim(), styleClass: r[c].trim() };
105
+ break;
106
+ case 37:
107
+ this.$ = { stmt: "applyClass", id: r[c - 1].trim(), styleClass: r[c].trim() };
108
+ break;
109
+ case 38:
110
+ g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
111
+ break;
112
+ case 39:
113
+ g.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
114
+ break;
115
+ case 40:
116
+ g.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
117
+ break;
118
+ case 41:
119
+ g.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
120
+ break;
121
+ case 44:
122
+ case 45:
123
+ this.$ = { stmt: "state", id: r[c].trim(), type: "default", description: "" };
124
+ break;
125
+ case 46:
126
+ this.$ = { stmt: "state", id: r[c - 2].trim(), classes: [r[c].trim()], type: "default", description: "" };
127
+ break;
128
+ case 47:
129
+ this.$ = { stmt: "state", id: r[c - 2].trim(), classes: [r[c].trim()], type: "default", description: "" };
130
+ break;
131
+ }
132
+ }, "anonymous"),
133
+ table: [{ 3: 1, 4: t, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: t, 5: s, 6: a }, { 3: 6, 4: t, 5: s, 6: a }, e([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 7]), e(y, [2, 8]), e(y, [2, 9]), e(y, [2, 10]), e(y, [2, 11]), e(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), e(y, [2, 16]), { 18: [1, 42] }, e(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, e(y, [2, 22]), e(y, [2, 23]), e(y, [2, 24]), e(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, e(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, e(y, [2, 31]), { 13: 51, 24: m, 57: K }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, e(ct, [2, 44], { 58: [1, 56] }), e(ct, [2, 45], { 58: [1, 57] }), e(y, [2, 38]), e(y, [2, 39]), e(y, [2, 40]), e(y, [2, 41]), e(y, [2, 6]), e(y, [2, 13]), { 13: 58, 24: m, 57: K }, e(y, [2, 17]), e(xt, i, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, e(y, [2, 29]), e(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, e(y, [2, 14], { 14: [1, 71] }), { 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 21: [1, 72], 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, e(y, [2, 34]), e(y, [2, 35]), e(y, [2, 36]), e(y, [2, 37]), e(ct, [2, 46]), e(ct, [2, 47]), e(y, [2, 15]), e(y, [2, 19]), e(xt, i, { 7: 78 }), e(y, [2, 26]), e(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 21: [1, 81], 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 32]), e(y, [2, 33]), e(y, [2, 21])],
134
+ defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
135
+ parseError: /* @__PURE__ */ f(function(o, h) {
136
+ if (h.recoverable)
137
+ this.trace(o);
138
+ else {
139
+ var n = new Error(o);
140
+ throw n.hash = h, n;
141
+ }
142
+ }, "parseError"),
143
+ parse: /* @__PURE__ */ f(function(o) {
144
+ var h = this, n = [0], g = [], E = [null], r = [], Z = this.table, c = "", U = 0, X = 0, ut = 2, tt = 1, Tt = r.slice.call(arguments, 1), b = Object.create(this.lexer), j = { yy: {} };
145
+ for (var Et in this.yy)
146
+ Object.prototype.hasOwnProperty.call(this.yy, Et) && (j.yy[Et] = this.yy[Et]);
147
+ b.setInput(o, j.yy), j.yy.lexer = b, j.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
148
+ var _t = b.yylloc;
149
+ r.push(_t);
150
+ var Qt = b.options && b.options.ranges;
151
+ typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
152
+ function Zt(O) {
153
+ n.length = n.length - 2 * O, E.length = E.length - O, r.length = r.length - O;
154
+ }
155
+ f(Zt, "popStack");
156
+ function Lt() {
157
+ var O;
158
+ return O = g.pop() || b.lex() || tt, typeof O != "number" && (O instanceof Array && (g = O, O = g.pop()), O = h.symbols_[O] || O), O;
159
+ }
160
+ f(Lt, "lex");
161
+ for (var C, H, w, mt, J = {}, dt, Y, Ot, ft; ; ) {
162
+ if (H = n[n.length - 1], this.defaultActions[H] ? w = this.defaultActions[H] : ((C === null || typeof C > "u") && (C = Lt()), w = Z[H] && Z[H][C]), typeof w > "u" || !w.length || !w[0]) {
163
+ var Dt = "";
164
+ ft = [];
165
+ for (dt in Z[H])
166
+ this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
167
+ b.showPosition ? Dt = "Parse error on line " + (U + 1) + `:
168
+ ` + b.showPosition() + `
169
+ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt = "Parse error on line " + (U + 1) + ": Unexpected " + (C == tt ? "end of input" : "'" + (this.terminals_[C] || C) + "'"), this.parseError(Dt, {
170
+ text: b.match,
171
+ token: this.terminals_[C] || C,
172
+ line: b.yylineno,
173
+ loc: _t,
174
+ expected: ft
175
+ });
176
+ }
177
+ if (w[0] instanceof Array && w.length > 1)
178
+ throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + C);
179
+ switch (w[0]) {
180
+ case 1:
181
+ n.push(C), E.push(b.yytext), r.push(b.yylloc), n.push(w[1]), C = null, X = b.yyleng, c = b.yytext, U = b.yylineno, _t = b.yylloc;
182
+ break;
183
+ case 2:
184
+ if (Y = this.productions_[w[1]][1], J.$ = E[E.length - Y], J._$ = {
185
+ first_line: r[r.length - (Y || 1)].first_line,
186
+ last_line: r[r.length - 1].last_line,
187
+ first_column: r[r.length - (Y || 1)].first_column,
188
+ last_column: r[r.length - 1].last_column
189
+ }, Qt && (J._$.range = [
190
+ r[r.length - (Y || 1)].range[0],
191
+ r[r.length - 1].range[1]
192
+ ]), mt = this.performAction.apply(J, [
193
+ c,
194
+ X,
195
+ U,
196
+ j.yy,
197
+ w[1],
198
+ E,
199
+ r
200
+ ].concat(Tt)), typeof mt < "u")
201
+ return mt;
202
+ Y && (n = n.slice(0, -1 * Y * 2), E = E.slice(0, -1 * Y), r = r.slice(0, -1 * Y)), n.push(this.productions_[w[1]][0]), E.push(J.$), r.push(J._$), Ot = Z[n[n.length - 2]][n[n.length - 1]], n.push(Ot);
203
+ break;
204
+ case 3:
205
+ return !0;
206
+ }
207
+ }
208
+ return !0;
209
+ }, "parse")
210
+ }, qt = /* @__PURE__ */ function() {
211
+ var V = {
212
+ EOF: 1,
213
+ parseError: /* @__PURE__ */ f(function(h, n) {
214
+ if (this.yy.parser)
215
+ this.yy.parser.parseError(h, n);
216
+ else
217
+ throw new Error(h);
218
+ }, "parseError"),
219
+ // resets the lexer, sets new input
220
+ setInput: /* @__PURE__ */ f(function(o, h) {
221
+ return this.yy = h || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
222
+ first_line: 1,
223
+ first_column: 0,
224
+ last_line: 1,
225
+ last_column: 0
226
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
227
+ }, "setInput"),
228
+ // consumes and returns one char from the input
229
+ input: /* @__PURE__ */ f(function() {
230
+ var o = this._input[0];
231
+ this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
232
+ var h = o.match(/(?:\r\n?|\n).*/g);
233
+ return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
234
+ }, "input"),
235
+ // unshifts one char (or a string) into the input
236
+ unput: /* @__PURE__ */ f(function(o) {
237
+ var h = o.length, n = o.split(/(?:\r\n?|\n)/g);
238
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
239
+ var g = this.match.split(/(?:\r\n?|\n)/g);
240
+ 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);
241
+ var E = this.yylloc.range;
242
+ return this.yylloc = {
243
+ first_line: this.yylloc.first_line,
244
+ last_line: this.yylineno + 1,
245
+ first_column: this.yylloc.first_column,
246
+ last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column - h
247
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
248
+ }, "unput"),
249
+ // When called from action, caches matched text and appends it on next action
250
+ more: /* @__PURE__ */ f(function() {
251
+ return this._more = !0, this;
252
+ }, "more"),
253
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
254
+ reject: /* @__PURE__ */ f(function() {
255
+ if (this.options.backtrack_lexer)
256
+ this._backtrack = !0;
257
+ else
258
+ return 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).
259
+ ` + this.showPosition(), {
260
+ text: "",
261
+ token: null,
262
+ line: this.yylineno
263
+ });
264
+ return this;
265
+ }, "reject"),
266
+ // retain first n characters of the match
267
+ less: /* @__PURE__ */ f(function(o) {
268
+ this.unput(this.match.slice(o));
269
+ }, "less"),
270
+ // displays already matched input, i.e. for error messages
271
+ pastInput: /* @__PURE__ */ f(function() {
272
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
273
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
274
+ }, "pastInput"),
275
+ // displays upcoming input, i.e. for error messages
276
+ upcomingInput: /* @__PURE__ */ f(function() {
277
+ var o = this.match;
278
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
279
+ }, "upcomingInput"),
280
+ // displays the character position where the lexing error occurred, i.e. for error messages
281
+ showPosition: /* @__PURE__ */ f(function() {
282
+ var o = this.pastInput(), h = new Array(o.length + 1).join("-");
283
+ return o + this.upcomingInput() + `
284
+ ` + h + "^";
285
+ }, "showPosition"),
286
+ // test the lexed token: return FALSE when not a match, otherwise return token
287
+ test_match: /* @__PURE__ */ f(function(o, h) {
288
+ var n, g, E;
289
+ if (this.options.backtrack_lexer && (E = {
290
+ yylineno: this.yylineno,
291
+ yylloc: {
292
+ first_line: this.yylloc.first_line,
293
+ last_line: this.last_line,
294
+ first_column: this.yylloc.first_column,
295
+ last_column: this.yylloc.last_column
296
+ },
297
+ yytext: this.yytext,
298
+ match: this.match,
299
+ matches: this.matches,
300
+ matched: this.matched,
301
+ yyleng: this.yyleng,
302
+ offset: this.offset,
303
+ _more: this._more,
304
+ _input: this._input,
305
+ yy: this.yy,
306
+ conditionStack: this.conditionStack.slice(0),
307
+ done: this.done
308
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), g = o[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
309
+ first_line: this.yylloc.last_line,
310
+ last_line: this.yylineno + 1,
311
+ first_column: this.yylloc.last_column,
312
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
313
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], n = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
314
+ return n;
315
+ if (this._backtrack) {
316
+ for (var r in E)
317
+ this[r] = E[r];
318
+ return !1;
319
+ }
320
+ return !1;
321
+ }, "test_match"),
322
+ // return next match in input
323
+ next: /* @__PURE__ */ f(function() {
324
+ if (this.done)
325
+ return this.EOF;
326
+ this._input || (this.done = !0);
327
+ var o, h, n, g;
328
+ this._more || (this.yytext = "", this.match = "");
329
+ for (var E = this._currentRules(), r = 0; r < E.length; r++)
330
+ if (n = this._input.match(this.rules[E[r]]), n && (!h || n[0].length > h[0].length)) {
331
+ if (h = n, g = r, this.options.backtrack_lexer) {
332
+ if (o = this.test_match(n, E[r]), o !== !1)
333
+ return o;
334
+ if (this._backtrack) {
335
+ h = !1;
336
+ continue;
337
+ } else
338
+ return !1;
339
+ } else if (!this.options.flex)
340
+ break;
341
+ }
342
+ return h ? (o = this.test_match(h, E[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
343
+ ` + this.showPosition(), {
344
+ text: "",
345
+ token: null,
346
+ line: this.yylineno
347
+ });
348
+ }, "next"),
349
+ // return next match that has a token
350
+ lex: /* @__PURE__ */ f(function() {
351
+ var h = this.next();
352
+ return h || this.lex();
353
+ }, "lex"),
354
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
355
+ begin: /* @__PURE__ */ f(function(h) {
356
+ this.conditionStack.push(h);
357
+ }, "begin"),
358
+ // pop the previously active lexer condition state off the condition stack
359
+ popState: /* @__PURE__ */ f(function() {
360
+ var h = this.conditionStack.length - 1;
361
+ return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
362
+ }, "popState"),
363
+ // produce the lexer rule set which is active for the currently active lexer condition state
364
+ _currentRules: /* @__PURE__ */ f(function() {
365
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
366
+ }, "_currentRules"),
367
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
368
+ topState: /* @__PURE__ */ f(function(h) {
369
+ return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
370
+ }, "topState"),
371
+ // alias for begin(condition)
372
+ pushState: /* @__PURE__ */ f(function(h) {
373
+ this.begin(h);
374
+ }, "pushState"),
375
+ // return the number of states currently on the stack
376
+ stateStackSize: /* @__PURE__ */ f(function() {
377
+ return this.conditionStack.length;
378
+ }, "stateStackSize"),
379
+ options: { "case-insensitive": !0 },
380
+ performAction: /* @__PURE__ */ f(function(h, n, g, E) {
381
+ switch (g) {
382
+ case 0:
383
+ return 38;
384
+ case 1:
385
+ return 40;
386
+ case 2:
387
+ return 39;
388
+ case 3:
389
+ return 44;
390
+ case 4:
391
+ return 51;
392
+ case 5:
393
+ return 52;
394
+ case 6:
395
+ return 53;
396
+ case 7:
397
+ return 54;
398
+ case 8:
399
+ break;
400
+ case 9:
401
+ break;
402
+ case 10:
403
+ return 5;
404
+ case 11:
405
+ break;
406
+ case 12:
407
+ break;
408
+ case 13:
409
+ break;
410
+ case 14:
411
+ break;
412
+ case 15:
413
+ return this.pushState("SCALE"), 17;
414
+ case 16:
415
+ return 18;
416
+ case 17:
417
+ this.popState();
418
+ break;
419
+ case 18:
420
+ return this.begin("acc_title"), 33;
421
+ case 19:
422
+ return this.popState(), "acc_title_value";
423
+ case 20:
424
+ return this.begin("acc_descr"), 35;
425
+ case 21:
426
+ return this.popState(), "acc_descr_value";
427
+ case 22:
428
+ this.begin("acc_descr_multiline");
429
+ break;
430
+ case 23:
431
+ this.popState();
432
+ break;
433
+ case 24:
434
+ return "acc_descr_multiline_value";
435
+ case 25:
436
+ return this.pushState("CLASSDEF"), 41;
437
+ case 26:
438
+ return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
439
+ case 27:
440
+ return this.popState(), this.pushState("CLASSDEFID"), 42;
441
+ case 28:
442
+ return this.popState(), 43;
443
+ case 29:
444
+ return this.pushState("CLASS"), 48;
445
+ case 30:
446
+ return this.popState(), this.pushState("CLASS_STYLE"), 49;
447
+ case 31:
448
+ return this.popState(), 50;
449
+ case 32:
450
+ return this.pushState("STYLE"), 45;
451
+ case 33:
452
+ return this.popState(), this.pushState("STYLEDEF_STYLES"), 46;
453
+ case 34:
454
+ return this.popState(), 47;
455
+ case 35:
456
+ return this.pushState("SCALE"), 17;
457
+ case 36:
458
+ return 18;
459
+ case 37:
460
+ this.popState();
461
+ break;
462
+ case 38:
463
+ this.pushState("STATE");
464
+ break;
465
+ case 39:
466
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
467
+ case 40:
468
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
469
+ case 41:
470
+ return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
471
+ case 42:
472
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
473
+ case 43:
474
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
475
+ case 44:
476
+ return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
477
+ case 45:
478
+ return 51;
479
+ case 46:
480
+ return 52;
481
+ case 47:
482
+ return 53;
483
+ case 48:
484
+ return 54;
485
+ case 49:
486
+ this.pushState("STATE_STRING");
487
+ break;
488
+ case 50:
489
+ return this.pushState("STATE_ID"), "AS";
490
+ case 51:
491
+ return this.popState(), "ID";
492
+ case 52:
493
+ this.popState();
494
+ break;
495
+ case 53:
496
+ return "STATE_DESCR";
497
+ case 54:
498
+ return 19;
499
+ case 55:
500
+ this.popState();
501
+ break;
502
+ case 56:
503
+ return this.popState(), this.pushState("struct"), 20;
504
+ case 57:
505
+ break;
506
+ case 58:
507
+ return this.popState(), 21;
508
+ case 59:
509
+ break;
510
+ case 60:
511
+ return this.begin("NOTE"), 29;
512
+ case 61:
513
+ return this.popState(), this.pushState("NOTE_ID"), 59;
514
+ case 62:
515
+ return this.popState(), this.pushState("NOTE_ID"), 60;
516
+ case 63:
517
+ this.popState(), this.pushState("FLOATING_NOTE");
518
+ break;
519
+ case 64:
520
+ return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
521
+ case 65:
522
+ break;
523
+ case 66:
524
+ return "NOTE_TEXT";
525
+ case 67:
526
+ return this.popState(), "ID";
527
+ case 68:
528
+ return this.popState(), this.pushState("NOTE_TEXT"), 24;
529
+ case 69:
530
+ return this.popState(), n.yytext = n.yytext.substr(2).trim(), 31;
531
+ case 70:
532
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 31;
533
+ case 71:
534
+ return 6;
535
+ case 72:
536
+ return 6;
537
+ case 73:
538
+ return 16;
539
+ case 74:
540
+ return 57;
541
+ case 75:
542
+ return 24;
543
+ case 76:
544
+ return n.yytext = n.yytext.trim(), 14;
545
+ case 77:
546
+ return 15;
547
+ case 78:
548
+ return 28;
549
+ case 79:
550
+ return 58;
551
+ case 80:
552
+ return 5;
553
+ case 81:
554
+ return "INVALID";
555
+ }
556
+ }, "anonymous"),
557
+ rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
558
+ conditions: { LINE: { rules: [12, 13], inclusive: !1 }, struct: { rules: [12, 13, 25, 29, 32, 38, 45, 46, 47, 48, 57, 58, 59, 60, 74, 75, 76, 77, 78], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [67], inclusive: !1 }, FLOATING_NOTE: { rules: [64, 65, 66], inclusive: !1 }, NOTE_TEXT: { rules: [69, 70], inclusive: !1 }, NOTE_ID: { rules: [68], inclusive: !1 }, NOTE: { rules: [61, 62, 63], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [34], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [33], inclusive: !1 }, CLASS_STYLE: { rules: [31], inclusive: !1 }, CLASS: { rules: [30], inclusive: !1 }, CLASSDEFID: { rules: [28], inclusive: !1 }, CLASSDEF: { rules: [26, 27], inclusive: !1 }, acc_descr_multiline: { rules: [23, 24], inclusive: !1 }, acc_descr: { rules: [21], inclusive: !1 }, acc_title: { rules: [19], inclusive: !1 }, SCALE: { rules: [16, 17, 36, 37], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [51], inclusive: !1 }, STATE_STRING: { rules: [52, 53], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [12, 13, 39, 40, 41, 42, 43, 44, 49, 50, 54, 55, 56], inclusive: !1 }, ID: { rules: [12, 13], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 18, 20, 22, 25, 29, 32, 35, 38, 56, 60, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81], inclusive: !0 } }
559
+ };
560
+ return V;
561
+ }();
562
+ gt.lexer = qt;
563
+ function ht() {
564
+ this.yy = {};
565
+ }
566
+ return f(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
567
+ }();
568
+ vt.parser = vt;
569
+ var Be = vt, de = "TB", Yt = "TB", Rt = "dir", Q = "state", q = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", it = "default", Gt = "divider", Bt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "text", jt = "normal", bt = "rect", kt = "rectWithTitle", ye = "stateStart", ge = "stateEnd", It = "divider", Nt = "roundedWithTitle", Te = "note", Ee = "noteGroup", rt = "statediagram", _e = "state", me = `${rt}-${_e}`, Ht = "transition", De = "note", be = "note-edge", ke = `${Ht} ${be}`, ve = `${rt}-${De}`, Ce = "cluster", Ae = `${rt}-${Ce}`, xe = "cluster-alt", Le = `${rt}-${xe}`, Wt = "parent", zt = "note", Oe = "state", At = "----", Re = `${At}${zt}`, wt = `${At}${Wt}`, Kt = /* @__PURE__ */ f((e, t = Yt) => {
570
+ if (!e.doc)
571
+ return t;
572
+ let s = t;
573
+ for (const a of e.doc)
574
+ a.stmt === "dir" && (s = a.value);
575
+ return s;
576
+ }, "getDir"), Ie = /* @__PURE__ */ f(function(e, t) {
577
+ return t.db.getClasses();
578
+ }, "getClasses"), Ne = /* @__PURE__ */ f(async function(e, t, s, a) {
579
+ D.info("REF0:"), D.info("Drawing state diagram (v2)", t);
580
+ const { securityLevel: i, state: l, layout: d } = F();
581
+ a.db.extract(a.db.getRootDocV2());
582
+ const S = a.db.getData(), p = te(t, i);
583
+ S.type = a.type, S.layoutAlgorithm = d, S.nodeSpacing = (l == null ? void 0 : l.nodeSpacing) || 50, S.rankSpacing = (l == null ? void 0 : l.rankSpacing) || 50, S.markers = ["barb"], S.diagramId = t, await se(S, p);
584
+ const T = 8;
585
+ try {
586
+ (typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((m, k) => {
587
+ var I;
588
+ const A = typeof k == "string" ? k : typeof (k == null ? void 0 : k.id) == "string" ? k.id : "";
589
+ if (!A) {
590
+ D.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(k));
591
+ return;
592
+ }
593
+ const $ = (I = p.node()) == null ? void 0 : I.querySelectorAll("g");
594
+ let x;
595
+ if ($ == null || $.forEach((N) => {
596
+ var P;
597
+ ((P = N.textContent) == null ? void 0 : P.trim()) === A && (x = N);
598
+ }), !x) {
599
+ D.warn("⚠️ Could not find node matching text:", A);
600
+ return;
601
+ }
602
+ const R = x.parentNode;
603
+ if (!R) {
604
+ D.warn("⚠️ Node has no parent, cannot wrap:", A);
605
+ return;
606
+ }
607
+ const u = document.createElementNS("http://www.w3.org/2000/svg", "a"), L = m.url.replace(/^"+|"+$/g, "");
608
+ if (u.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", L), u.setAttribute("target", "_blank"), m.tooltip) {
609
+ const N = m.tooltip.replace(/^"+|"+$/g, "");
610
+ u.setAttribute("title", N);
611
+ }
612
+ R.replaceChild(u, x), u.appendChild(x), D.info("🔗 Wrapped node in <a> tag for:", A, m.url);
613
+ });
614
+ } catch (_) {
615
+ D.error("❌ Error injecting clickable links:", _);
616
+ }
617
+ ie.insertTitle(
618
+ p,
619
+ "statediagramTitleText",
620
+ (l == null ? void 0 : l.titleTopMargin) ?? 25,
621
+ a.db.getDiagramTitle()
622
+ ), ee(p, T, rt, (l == null ? void 0 : l.useMaxWidth) ?? !0);
623
+ }, "draw"), Ve = {
624
+ getClasses: Ie,
625
+ draw: Ne,
626
+ getDir: Kt
627
+ }, St = /* @__PURE__ */ new Map(), M = 0;
628
+ function yt(e = "", t = 0, s = "", a = At) {
629
+ const i = s !== null && s.length > 0 ? `${a}${s}` : "";
630
+ return `${Oe}-${e}${i}-${t}`;
631
+ }
632
+ f(yt, "stateDomId");
633
+ var we = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
634
+ D.trace("items", t), t.forEach((p) => {
635
+ switch (p.stmt) {
636
+ case Q:
637
+ st(e, p, s, a, i, l, d, S);
638
+ break;
639
+ case it:
640
+ st(e, p, s, a, i, l, d, S);
641
+ break;
642
+ case Ct:
643
+ {
644
+ st(
645
+ e,
646
+ p.state1,
647
+ s,
648
+ a,
649
+ i,
650
+ l,
651
+ d,
652
+ S
653
+ ), st(
654
+ e,
655
+ p.state2,
656
+ s,
657
+ a,
658
+ i,
659
+ l,
660
+ d,
661
+ S
662
+ );
663
+ const T = {
664
+ id: "edge" + M,
665
+ start: p.state1.id,
666
+ end: p.state2.id,
667
+ arrowhead: "normal",
668
+ arrowTypeEnd: "arrow_barb",
669
+ style: Bt,
670
+ labelStyle: "",
671
+ label: W.sanitizeText(p.description ?? "", F()),
672
+ arrowheadStyle: Vt,
673
+ labelpos: Mt,
674
+ labelType: Ut,
675
+ thickness: jt,
676
+ classes: Ht,
677
+ look: d
678
+ };
679
+ i.push(T), M++;
680
+ }
681
+ break;
682
+ }
683
+ });
684
+ }, "setupDoc"), $t = /* @__PURE__ */ f((e, t = Yt) => {
685
+ let s = t;
686
+ if (e.doc)
687
+ for (const a of e.doc)
688
+ a.stmt === "dir" && (s = a.value);
689
+ return s;
690
+ }, "getDir");
691
+ function et(e, t, s) {
692
+ if (!t.id || t.id === "</join></fork>" || t.id === "</choice>")
693
+ return;
694
+ t.cssClasses && (Array.isArray(t.cssCompiledStyles) || (t.cssCompiledStyles = []), t.cssClasses.split(" ").forEach((i) => {
695
+ const l = s.get(i);
696
+ l && (t.cssCompiledStyles = [...t.cssCompiledStyles ?? [], ...l.styles]);
697
+ }));
698
+ const a = e.find((i) => i.id === t.id);
699
+ a ? Object.assign(a, t) : e.push(t);
700
+ }
701
+ f(et, "insertOrUpdateNode");
702
+ function Xt(e) {
703
+ var t;
704
+ return ((t = e == null ? void 0 : e.classes) == null ? void 0 : t.join(" ")) ?? "";
705
+ }
706
+ f(Xt, "getClassesFromDbInfo");
707
+ function Jt(e) {
708
+ return (e == null ? void 0 : e.styles) ?? [];
709
+ }
710
+ f(Jt, "getStylesFromDbInfo");
711
+ var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
712
+ var A, $, x;
713
+ const p = t.id, T = s.get(p), _ = Xt(T), m = Jt(T), k = F();
714
+ if (D.info("dataFetcher parsedItem", t, T, m), p !== "root") {
715
+ let R = bt;
716
+ t.start === !0 ? R = ye : t.start === !1 && (R = ge), t.type !== it && (R = t.type), St.get(p) || St.set(p, {
717
+ id: p,
718
+ shape: R,
719
+ description: W.sanitizeText(p, k),
720
+ cssClasses: `${_} ${me}`,
721
+ cssStyles: m
722
+ });
723
+ const u = St.get(p);
724
+ t.description && (Array.isArray(u.description) ? (u.shape = kt, u.description.push(t.description)) : (A = u.description) != null && A.length && u.description.length > 0 ? (u.shape = kt, u.description === p ? u.description = [t.description] : u.description = [u.description, t.description]) : (u.shape = bt, u.description = t.description), u.description = W.sanitizeTextOrArray(u.description, k)), (($ = u.description) == null ? void 0 : $.length) === 1 && u.shape === kt && (u.type === "group" ? u.shape = Nt : u.shape = bt), !u.type && t.doc && (D.info("Setting cluster for XCX", p, $t(t)), u.type = "group", u.isGroup = !0, u.dir = $t(t), u.shape = t.type === Gt ? It : Nt, u.cssClasses = `${u.cssClasses} ${Ae} ${l ? Le : ""}`);
725
+ const L = {
726
+ labelStyle: "",
727
+ shape: u.shape,
728
+ label: u.description,
729
+ cssClasses: u.cssClasses,
730
+ cssCompiledStyles: [],
731
+ cssStyles: u.cssStyles,
732
+ id: p,
733
+ dir: u.dir,
734
+ domId: yt(p, M),
735
+ type: u.type,
736
+ isGroup: u.type === "group",
737
+ padding: 8,
738
+ rx: 10,
739
+ ry: 10,
740
+ look: d
741
+ };
742
+ if (L.shape === It && (L.label = ""), e && e.id !== "root" && (D.trace("Setting node ", p, " to be child of its parent ", e.id), L.parentId = e.id), L.centerLabel = !0, t.note) {
743
+ const I = {
744
+ labelStyle: "",
745
+ shape: Te,
746
+ label: t.note.text,
747
+ cssClasses: ve,
748
+ // useHtmlLabels: false,
749
+ cssStyles: [],
750
+ cssCompiledStyles: [],
751
+ id: p + Re + "-" + M,
752
+ domId: yt(p, M, zt),
753
+ type: u.type,
754
+ isGroup: u.type === "group",
755
+ padding: (x = k.flowchart) == null ? void 0 : x.padding,
756
+ look: d,
757
+ position: t.note.position
758
+ }, N = p + wt, G = {
759
+ labelStyle: "",
760
+ shape: Ee,
761
+ label: t.note.text,
762
+ cssClasses: u.cssClasses,
763
+ cssStyles: [],
764
+ id: p + wt,
765
+ domId: yt(p, M, Wt),
766
+ type: "group",
767
+ isGroup: !0,
768
+ padding: 16,
769
+ //getConfig().flowchart.padding
770
+ look: d,
771
+ position: t.note.position
772
+ };
773
+ M++, G.id = N, I.parentId = N, et(a, G, S), et(a, I, S), et(a, L, S);
774
+ let P = p, B = I.id;
775
+ t.note.position === "left of" && (P = I.id, B = p), i.push({
776
+ id: P + "-" + B,
777
+ start: P,
778
+ end: B,
779
+ arrowhead: "none",
780
+ arrowTypeEnd: "",
781
+ style: Bt,
782
+ labelStyle: "",
783
+ classes: ke,
784
+ arrowheadStyle: Vt,
785
+ labelpos: Mt,
786
+ labelType: Ut,
787
+ thickness: jt,
788
+ look: d
789
+ });
790
+ } else
791
+ et(a, L, S);
792
+ }
793
+ t.doc && (D.trace("Adding nodes children "), we(t, t.doc, s, a, i, !l, d, S));
794
+ }, "dataFetcher"), $e = /* @__PURE__ */ f(() => {
795
+ St.clear(), M = 0;
796
+ }, "reset"), v = {
797
+ START_NODE: "[*]",
798
+ START_TYPE: "start",
799
+ END_NODE: "[*]",
800
+ END_TYPE: "end",
801
+ COLOR_KEYWORD: "color",
802
+ FILL_KEYWORD: "fill",
803
+ BG_FILL: "bgFill",
804
+ STYLECLASS_SEP: ","
805
+ }, Pt = /* @__PURE__ */ f(() => /* @__PURE__ */ new Map(), "newClassesList"), Ft = /* @__PURE__ */ f(() => ({
806
+ relations: [],
807
+ states: /* @__PURE__ */ new Map(),
808
+ documents: {}
809
+ }), "newDoc"), pt = /* @__PURE__ */ f((e) => JSON.parse(JSON.stringify(e)), "clone"), z, Me = (z = class {
810
+ constructor(t) {
811
+ this.version = t, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Pt(), this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this);
812
+ }
813
+ /**
814
+ * Convert all of the statements (stmts) that were parsed into states and relationships.
815
+ * This is done because a state diagram may have nested sections,
816
+ * where each section is a 'document' and has its own set of statements.
817
+ * Ex: the section within a fork has its own statements, and incoming and outgoing statements
818
+ * refer to the fork as a whole (document).
819
+ * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
820
+ * This will push the statement into the list of statements for the current document.
821
+ */
822
+ extract(t) {
823
+ this.clear(!0);
824
+ for (const i of Array.isArray(t) ? t : t.doc)
825
+ switch (i.stmt) {
826
+ case Q:
827
+ this.addState(i.id.trim(), i.type, i.doc, i.description, i.note);
828
+ break;
829
+ case Ct:
830
+ this.addRelation(i.state1, i.state2, i.description);
831
+ break;
832
+ case fe:
833
+ this.addStyleClass(i.id.trim(), i.classes);
834
+ break;
835
+ case pe:
836
+ this.handleStyleDef(i);
837
+ break;
838
+ case Se:
839
+ this.setCssClass(i.id.trim(), i.styleClass);
840
+ break;
841
+ case "click":
842
+ this.addLink(i.id, i.url, i.tooltip);
843
+ break;
844
+ }
845
+ const s = this.getStates(), a = F();
846
+ $e(), st(
847
+ void 0,
848
+ this.getRootDocV2(),
849
+ s,
850
+ this.nodes,
851
+ this.edges,
852
+ !0,
853
+ a.look,
854
+ this.classes
855
+ );
856
+ for (const i of this.nodes)
857
+ if (Array.isArray(i.label)) {
858
+ if (i.description = i.label.slice(1), i.isGroup && i.description.length > 0)
859
+ throw new Error(
860
+ `Group nodes can only have label. Remove the additional description for node [${i.id}]`
861
+ );
862
+ i.label = i.label[0];
863
+ }
864
+ }
865
+ handleStyleDef(t) {
866
+ const s = t.id.trim().split(","), a = t.styleClass.split(",");
867
+ for (const i of s) {
868
+ let l = this.getState(i);
869
+ if (!l) {
870
+ const d = i.trim();
871
+ this.addState(d), l = this.getState(d);
872
+ }
873
+ l && (l.styles = a.map((d) => {
874
+ var S;
875
+ return (S = d.replace(/;/g, "")) == null ? void 0 : S.trim();
876
+ }));
877
+ }
878
+ }
879
+ setRootDoc(t) {
880
+ D.info("Setting root doc", t), this.rootDoc = t, this.version === 1 ? this.extract(t) : this.extract(this.getRootDocV2());
881
+ }
882
+ docTranslator(t, s, a) {
883
+ if (s.stmt === Ct) {
884
+ this.docTranslator(t, s.state1, !0), this.docTranslator(t, s.state2, !1);
885
+ return;
886
+ }
887
+ if (s.stmt === Q && (s.id === v.START_NODE ? (s.id = t.id + (a ? "_start" : "_end"), s.start = a) : s.id = s.id.trim()), s.stmt !== q && s.stmt !== Q || !s.doc)
888
+ return;
889
+ const i = [];
890
+ let l = [];
891
+ for (const d of s.doc)
892
+ if (d.type === Gt) {
893
+ const S = pt(d);
894
+ S.doc = pt(l), i.push(S), l = [];
895
+ } else
896
+ l.push(d);
897
+ if (i.length > 0 && l.length > 0) {
898
+ const d = {
899
+ stmt: Q,
900
+ id: he(),
901
+ type: "divider",
902
+ doc: pt(l)
903
+ };
904
+ i.push(pt(d)), s.doc = i;
905
+ }
906
+ s.doc.forEach((d) => this.docTranslator(s, d, !0));
907
+ }
908
+ getRootDocV2() {
909
+ return this.docTranslator(
910
+ { id: q, stmt: q },
911
+ { id: q, stmt: q, doc: this.rootDoc },
912
+ !0
913
+ ), { id: q, doc: this.rootDoc };
914
+ }
915
+ /**
916
+ * Function called by parser when a node definition has been found.
917
+ *
918
+ * @param descr - description for the state. Can be a string or a list or strings
919
+ * @param classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.
920
+ * @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
921
+ * @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
922
+ */
923
+ addState(t, s = it, a = void 0, i = void 0, l = void 0, d = void 0, S = void 0, p = void 0) {
924
+ const T = t == null ? void 0 : t.trim();
925
+ if (!this.currentDocument.states.has(T))
926
+ D.info("Adding state ", T, i), this.currentDocument.states.set(T, {
927
+ stmt: Q,
928
+ id: T,
929
+ descriptions: [],
930
+ type: s,
931
+ doc: a,
932
+ note: l,
933
+ classes: [],
934
+ styles: [],
935
+ textStyles: []
936
+ });
937
+ else {
938
+ const _ = this.currentDocument.states.get(T);
939
+ if (!_)
940
+ throw new Error(`State not found: ${T}`);
941
+ _.doc || (_.doc = a), _.type || (_.type = s);
942
+ }
943
+ if (i && (D.info("Setting state description", T, i), (Array.isArray(i) ? i : [i]).forEach((m) => this.addDescription(T, m.trim()))), l) {
944
+ const _ = this.currentDocument.states.get(T);
945
+ if (!_)
946
+ throw new Error(`State not found: ${T}`);
947
+ _.note = l, _.note.text = W.sanitizeText(_.note.text, F());
948
+ }
949
+ d && (D.info("Setting state classes", T, d), (Array.isArray(d) ? d : [d]).forEach((m) => this.setCssClass(T, m.trim()))), S && (D.info("Setting state styles", T, S), (Array.isArray(S) ? S : [S]).forEach((m) => this.setStyle(T, m.trim()))), p && (D.info("Setting state styles", T, S), (Array.isArray(p) ? p : [p]).forEach((m) => this.setTextStyle(T, m.trim())));
950
+ }
951
+ clear(t) {
952
+ this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), t || (this.links = /* @__PURE__ */ new Map(), ue());
953
+ }
954
+ getState(t) {
955
+ return this.currentDocument.states.get(t);
956
+ }
957
+ getStates() {
958
+ return this.currentDocument.states;
959
+ }
960
+ logDocuments() {
961
+ D.info("Documents = ", this.documents);
962
+ }
963
+ getRelations() {
964
+ return this.currentDocument.relations;
965
+ }
966
+ /**
967
+ * Adds a clickable link to a state.
968
+ */
969
+ addLink(t, s, a) {
970
+ this.links.set(t, { url: s, tooltip: a }), D.warn("Adding link", t, s, a);
971
+ }
972
+ /**
973
+ * Get all registered links.
974
+ */
975
+ getLinks() {
976
+ return this.links;
977
+ }
978
+ /**
979
+ * If the id is a start node ( [*] ), then return a new id constructed from
980
+ * the start node name and the current start node count.
981
+ * else return the given id
982
+ */
983
+ startIdIfNeeded(t = "") {
984
+ return t === v.START_NODE ? (this.startEndCount++, `${v.START_TYPE}${this.startEndCount}`) : t;
985
+ }
986
+ /**
987
+ * If the id is a start node ( [*] ), then return the start type ('start')
988
+ * else return the given type
989
+ */
990
+ startTypeIfNeeded(t = "", s = it) {
991
+ return t === v.START_NODE ? v.START_TYPE : s;
992
+ }
993
+ /**
994
+ * If the id is an end node ( [*] ), then return a new id constructed from
995
+ * the end node name and the current start_end node count.
996
+ * else return the given id
997
+ */
998
+ endIdIfNeeded(t = "") {
999
+ return t === v.END_NODE ? (this.startEndCount++, `${v.END_TYPE}${this.startEndCount}`) : t;
1000
+ }
1001
+ /**
1002
+ * If the id is an end node ( [*] ), then return the end type
1003
+ * else return the given type
1004
+ *
1005
+ */
1006
+ endTypeIfNeeded(t = "", s = it) {
1007
+ return t === v.END_NODE ? v.END_TYPE : s;
1008
+ }
1009
+ addRelationObjs(t, s, a = "") {
1010
+ const i = this.startIdIfNeeded(t.id.trim()), l = this.startTypeIfNeeded(t.id.trim(), t.type), d = this.startIdIfNeeded(s.id.trim()), S = this.startTypeIfNeeded(s.id.trim(), s.type);
1011
+ this.addState(
1012
+ i,
1013
+ l,
1014
+ t.doc,
1015
+ t.description,
1016
+ t.note,
1017
+ t.classes,
1018
+ t.styles,
1019
+ t.textStyles
1020
+ ), this.addState(
1021
+ d,
1022
+ S,
1023
+ s.doc,
1024
+ s.description,
1025
+ s.note,
1026
+ s.classes,
1027
+ s.styles,
1028
+ s.textStyles
1029
+ ), this.currentDocument.relations.push({
1030
+ id1: i,
1031
+ id2: d,
1032
+ relationTitle: W.sanitizeText(a, F())
1033
+ });
1034
+ }
1035
+ /**
1036
+ * Add a relation between two items. The items may be full objects or just the string id of a state.
1037
+ */
1038
+ addRelation(t, s, a) {
1039
+ if (typeof t == "object" && typeof s == "object")
1040
+ this.addRelationObjs(t, s, a);
1041
+ else if (typeof t == "string" && typeof s == "string") {
1042
+ const i = this.startIdIfNeeded(t.trim()), l = this.startTypeIfNeeded(t), d = this.endIdIfNeeded(s.trim()), S = this.endTypeIfNeeded(s);
1043
+ this.addState(i, l), this.addState(d, S), this.currentDocument.relations.push({
1044
+ id1: i,
1045
+ id2: d,
1046
+ relationTitle: a ? W.sanitizeText(a, F()) : void 0
1047
+ });
1048
+ }
1049
+ }
1050
+ addDescription(t, s) {
1051
+ var l;
1052
+ const a = this.currentDocument.states.get(t), i = s.startsWith(":") ? s.replace(":", "").trim() : s;
1053
+ (l = a == null ? void 0 : a.descriptions) == null || l.push(W.sanitizeText(i, F()));
1054
+ }
1055
+ cleanupLabel(t) {
1056
+ return t.startsWith(":") ? t.slice(2).trim() : t.trim();
1057
+ }
1058
+ getDividerId() {
1059
+ return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
1060
+ }
1061
+ /**
1062
+ * Called when the parser comes across a (style) class definition
1063
+ * @example classDef my-style fill:#f96;
1064
+ *
1065
+ * @param id - the id of this (style) class
1066
+ * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
1067
+ */
1068
+ addStyleClass(t, s = "") {
1069
+ this.classes.has(t) || this.classes.set(t, { id: t, styles: [], textStyles: [] });
1070
+ const a = this.classes.get(t);
1071
+ s && a && s.split(v.STYLECLASS_SEP).forEach((i) => {
1072
+ const l = i.replace(/([^;]*);/, "$1").trim();
1073
+ if (RegExp(v.COLOR_KEYWORD).exec(i)) {
1074
+ const S = l.replace(v.FILL_KEYWORD, v.BG_FILL).replace(v.COLOR_KEYWORD, v.FILL_KEYWORD);
1075
+ a.textStyles.push(S);
1076
+ }
1077
+ a.styles.push(l);
1078
+ });
1079
+ }
1080
+ getClasses() {
1081
+ return this.classes;
1082
+ }
1083
+ /**
1084
+ * Add a (style) class or css class to a state with the given id.
1085
+ * If the state isn't already in the list of known states, add it.
1086
+ * Might be called by parser when a style class or CSS class should be applied to a state
1087
+ *
1088
+ * @param itemIds - The id or a list of ids of the item(s) to apply the css class to
1089
+ * @param cssClassName - CSS class name
1090
+ */
1091
+ setCssClass(t, s) {
1092
+ t.split(",").forEach((a) => {
1093
+ var l;
1094
+ let i = this.getState(a);
1095
+ if (!i) {
1096
+ const d = a.trim();
1097
+ this.addState(d), i = this.getState(d);
1098
+ }
1099
+ (l = i == null ? void 0 : i.classes) == null || l.push(s);
1100
+ });
1101
+ }
1102
+ /**
1103
+ * Add a style to a state with the given id.
1104
+ * @example style stateId fill:#f9f,stroke:#333,stroke-width:4px
1105
+ * where 'style' is the keyword
1106
+ * stateId is the id of a state
1107
+ * the rest of the string is the styleText (all of the attributes to be applied to the state)
1108
+ *
1109
+ * @param itemId - The id of item to apply the style to
1110
+ * @param styleText - the text of the attributes for the style
1111
+ */
1112
+ setStyle(t, s) {
1113
+ var a, i;
1114
+ (i = (a = this.getState(t)) == null ? void 0 : a.styles) == null || i.push(s);
1115
+ }
1116
+ /**
1117
+ * Add a text style to a state with the given id
1118
+ *
1119
+ * @param itemId - The id of item to apply the css class to
1120
+ * @param cssClassName - CSS class name
1121
+ */
1122
+ setTextStyle(t, s) {
1123
+ var a, i;
1124
+ (i = (a = this.getState(t)) == null ? void 0 : a.textStyles) == null || i.push(s);
1125
+ }
1126
+ /**
1127
+ * Finds the direction statement in the root document.
1128
+ * @returns the direction statement if present
1129
+ */
1130
+ getDirectionStatement() {
1131
+ return this.rootDoc.find((t) => t.stmt === Rt);
1132
+ }
1133
+ getDirection() {
1134
+ var t;
1135
+ return ((t = this.getDirectionStatement()) == null ? void 0 : t.value) ?? de;
1136
+ }
1137
+ setDirection(t) {
1138
+ const s = this.getDirectionStatement();
1139
+ s ? s.value = t : this.rootDoc.unshift({ stmt: Rt, value: t });
1140
+ }
1141
+ trimColon(t) {
1142
+ return t.startsWith(":") ? t.slice(1).trim() : t.trim();
1143
+ }
1144
+ getData() {
1145
+ const t = F();
1146
+ return {
1147
+ nodes: this.nodes,
1148
+ edges: this.edges,
1149
+ other: {},
1150
+ config: t,
1151
+ direction: Kt(this.getRootDocV2())
1152
+ };
1153
+ }
1154
+ getConfig() {
1155
+ return F().state;
1156
+ }
1157
+ }, f(z, "StateDB"), z.relationType = {
1158
+ AGGREGATION: 0,
1159
+ EXTENSION: 1,
1160
+ COMPOSITION: 2,
1161
+ DEPENDENCY: 3
1162
+ }, z), Pe = /* @__PURE__ */ f((e) => `
1163
+ defs #statediagram-barbEnd {
1164
+ fill: ${e.transitionColor};
1165
+ stroke: ${e.transitionColor};
1166
+ }
1167
+ g.stateGroup text {
1168
+ fill: ${e.nodeBorder};
1169
+ stroke: none;
1170
+ font-size: 10px;
1171
+ }
1172
+ g.stateGroup text {
1173
+ fill: ${e.textColor};
1174
+ stroke: none;
1175
+ font-size: 10px;
1176
+
1177
+ }
1178
+ g.stateGroup .state-title {
1179
+ font-weight: bolder;
1180
+ fill: ${e.stateLabelColor};
1181
+ }
1182
+
1183
+ g.stateGroup rect {
1184
+ fill: ${e.mainBkg};
1185
+ stroke: ${e.nodeBorder};
1186
+ }
1187
+
1188
+ g.stateGroup line {
1189
+ stroke: ${e.lineColor};
1190
+ stroke-width: 1;
1191
+ }
1192
+
1193
+ .transition {
1194
+ stroke: ${e.transitionColor};
1195
+ stroke-width: 1;
1196
+ fill: none;
1197
+ }
1198
+
1199
+ .stateGroup .composit {
1200
+ fill: ${e.background};
1201
+ border-bottom: 1px
1202
+ }
1203
+
1204
+ .stateGroup .alt-composit {
1205
+ fill: #e0e0e0;
1206
+ border-bottom: 1px
1207
+ }
1208
+
1209
+ .state-note {
1210
+ stroke: ${e.noteBorderColor};
1211
+ fill: ${e.noteBkgColor};
1212
+
1213
+ text {
1214
+ fill: ${e.noteTextColor};
1215
+ stroke: none;
1216
+ font-size: 10px;
1217
+ }
1218
+ }
1219
+
1220
+ .stateLabel .box {
1221
+ stroke: none;
1222
+ stroke-width: 0;
1223
+ fill: ${e.mainBkg};
1224
+ opacity: 0.5;
1225
+ }
1226
+
1227
+ .edgeLabel .label rect {
1228
+ fill: ${e.labelBackgroundColor};
1229
+ opacity: 0.5;
1230
+ }
1231
+ .edgeLabel {
1232
+ background-color: ${e.edgeLabelBackground};
1233
+ p {
1234
+ background-color: ${e.edgeLabelBackground};
1235
+ }
1236
+ rect {
1237
+ opacity: 0.5;
1238
+ background-color: ${e.edgeLabelBackground};
1239
+ fill: ${e.edgeLabelBackground};
1240
+ }
1241
+ text-align: center;
1242
+ }
1243
+ .edgeLabel .label text {
1244
+ fill: ${e.transitionLabelColor || e.tertiaryTextColor};
1245
+ }
1246
+ .label div .edgeLabel {
1247
+ color: ${e.transitionLabelColor || e.tertiaryTextColor};
1248
+ }
1249
+
1250
+ .stateLabel text {
1251
+ fill: ${e.stateLabelColor};
1252
+ font-size: 10px;
1253
+ font-weight: bold;
1254
+ }
1255
+
1256
+ .node circle.state-start {
1257
+ fill: ${e.specialStateColor};
1258
+ stroke: ${e.specialStateColor};
1259
+ }
1260
+
1261
+ .node .fork-join {
1262
+ fill: ${e.specialStateColor};
1263
+ stroke: ${e.specialStateColor};
1264
+ }
1265
+
1266
+ .node circle.state-end {
1267
+ fill: ${e.innerEndBackground};
1268
+ stroke: ${e.background};
1269
+ stroke-width: 1.5
1270
+ }
1271
+ .end-state-inner {
1272
+ fill: ${e.compositeBackground || e.background};
1273
+ // stroke: ${e.background};
1274
+ stroke-width: 1.5
1275
+ }
1276
+
1277
+ .node rect {
1278
+ fill: ${e.stateBkg || e.mainBkg};
1279
+ stroke: ${e.stateBorder || e.nodeBorder};
1280
+ stroke-width: 1px;
1281
+ }
1282
+ .node polygon {
1283
+ fill: ${e.mainBkg};
1284
+ stroke: ${e.stateBorder || e.nodeBorder};;
1285
+ stroke-width: 1px;
1286
+ }
1287
+ #statediagram-barbEnd {
1288
+ fill: ${e.lineColor};
1289
+ }
1290
+
1291
+ .statediagram-cluster rect {
1292
+ fill: ${e.compositeTitleBackground};
1293
+ stroke: ${e.stateBorder || e.nodeBorder};
1294
+ stroke-width: 1px;
1295
+ }
1296
+
1297
+ .cluster-label, .nodeLabel {
1298
+ color: ${e.stateLabelColor};
1299
+ // line-height: 1;
1300
+ }
1301
+
1302
+ .statediagram-cluster rect.outer {
1303
+ rx: 5px;
1304
+ ry: 5px;
1305
+ }
1306
+ .statediagram-state .divider {
1307
+ stroke: ${e.stateBorder || e.nodeBorder};
1308
+ }
1309
+
1310
+ .statediagram-state .title-state {
1311
+ rx: 5px;
1312
+ ry: 5px;
1313
+ }
1314
+ .statediagram-cluster.statediagram-cluster .inner {
1315
+ fill: ${e.compositeBackground || e.background};
1316
+ }
1317
+ .statediagram-cluster.statediagram-cluster-alt .inner {
1318
+ fill: ${e.altBackground ? e.altBackground : "#efefef"};
1319
+ }
1320
+
1321
+ .statediagram-cluster .inner {
1322
+ rx:0;
1323
+ ry:0;
1324
+ }
1325
+
1326
+ .statediagram-state rect.basic {
1327
+ rx: 5px;
1328
+ ry: 5px;
1329
+ }
1330
+ .statediagram-state rect.divider {
1331
+ stroke-dasharray: 10,10;
1332
+ fill: ${e.altBackground ? e.altBackground : "#efefef"};
1333
+ }
1334
+
1335
+ .note-edge {
1336
+ stroke-dasharray: 5;
1337
+ }
1338
+
1339
+ .statediagram-note rect {
1340
+ fill: ${e.noteBkgColor};
1341
+ stroke: ${e.noteBorderColor};
1342
+ stroke-width: 1px;
1343
+ rx: 0;
1344
+ ry: 0;
1345
+ }
1346
+ .statediagram-note rect {
1347
+ fill: ${e.noteBkgColor};
1348
+ stroke: ${e.noteBorderColor};
1349
+ stroke-width: 1px;
1350
+ rx: 0;
1351
+ ry: 0;
1352
+ }
1353
+
1354
+ .statediagram-note text {
1355
+ fill: ${e.noteTextColor};
1356
+ }
1357
+
1358
+ .statediagram-note .nodeLabel {
1359
+ color: ${e.noteTextColor};
1360
+ }
1361
+ .statediagram .edgeLabel {
1362
+ color: red; // ${e.noteTextColor};
1363
+ }
1364
+
1365
+ #dependencyStart, #dependencyEnd {
1366
+ fill: ${e.lineColor};
1367
+ stroke: ${e.lineColor};
1368
+ stroke-width: 1;
1369
+ }
1370
+
1371
+ .statediagramTitleText {
1372
+ text-anchor: middle;
1373
+ font-size: 18px;
1374
+ fill: ${e.textColor};
1375
+ }
1376
+ `, "getStyles"), Ue = Pe;
1377
+ export {
1378
+ Me as S,
1379
+ Be as a,
1380
+ Ve as b,
1381
+ Ue as s
1382
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-NRVI72HA-CQ3LV39f.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as a, e as w, l as x } from "./mermaid.core-DH6TRyjK.js";
2
+ var d = /* @__PURE__ */ a((e, t, i, o) => {
3
+ e.attr("class", i);
4
+ const { width: r, height: h, x: n, y: c } = u(e, t);
5
+ w(e, h, r, o);
6
+ const s = l(n, c, r, h, t);
7
+ e.attr("viewBox", s), x.debug(`viewBox configured: ${s} with padding: ${t}`);
8
+ }, "setupViewPortForSVG"), u = /* @__PURE__ */ a((e, t) => {
9
+ var o;
10
+ const i = ((o = e.node()) == null ? void 0 : o.getBBox()) || { width: 0, height: 0, x: 0, y: 0 };
11
+ return {
12
+ width: i.width + t * 2,
13
+ height: i.height + t * 2,
14
+ x: i.x,
15
+ y: i.y
16
+ };
17
+ }, "calculateDimensionsWithPadding"), l = /* @__PURE__ */ a((e, t, i, o, r) => `${e - r} ${t - r} ${i} ${o}`, "createViewBox");
18
+ export {
19
+ d as s
20
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-OMD6QJNC-DamKp1kC.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as n, U as c, j as l } from "./mermaid.core-DH6TRyjK.js";
2
+ var o = /* @__PURE__ */ n((a, t) => {
3
+ const e = a.append("rect");
4
+ if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx && e.attr("rx", t.rx), t.ry && e.attr("ry", t.ry), t.attrs !== void 0)
5
+ for (const r in t.attrs)
6
+ e.attr(r, t.attrs[r]);
7
+ return t.class && e.attr("class", t.class), e;
8
+ }, "drawRect"), d = /* @__PURE__ */ n((a, t) => {
9
+ const e = {
10
+ x: t.startx,
11
+ y: t.starty,
12
+ width: t.stopx - t.startx,
13
+ height: t.stopy - t.starty,
14
+ fill: t.fill,
15
+ stroke: t.stroke,
16
+ class: "rect"
17
+ };
18
+ o(a, e).lower();
19
+ }, "drawBackgroundRect"), g = /* @__PURE__ */ n((a, t) => {
20
+ const e = t.text.replace(c, " "), r = a.append("text");
21
+ r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class && r.attr("class", t.class);
22
+ const s = r.append("tspan");
23
+ return s.attr("x", t.x + t.textMargin * 2), s.text(e), r;
24
+ }, "drawText"), h = /* @__PURE__ */ n((a, t, e, r) => {
25
+ const s = a.append("image");
26
+ s.attr("x", t), s.attr("y", e);
27
+ const i = l(r);
28
+ s.attr("xlink:href", i);
29
+ }, "drawImage"), m = /* @__PURE__ */ n((a, t, e, r) => {
30
+ const s = a.append("use");
31
+ s.attr("x", t), s.attr("y", e);
32
+ const i = l(r);
33
+ s.attr("xlink:href", `#${i}`);
34
+ }, "drawEmbeddedImage"), y = /* @__PURE__ */ n(() => ({
35
+ x: 0,
36
+ y: 0,
37
+ width: 100,
38
+ height: 100,
39
+ fill: "#EDF2AE",
40
+ stroke: "#666",
41
+ anchor: "start",
42
+ rx: 0,
43
+ ry: 0
44
+ }), "getNoteRect"), p = /* @__PURE__ */ n(() => ({
45
+ x: 0,
46
+ y: 0,
47
+ width: 100,
48
+ height: 100,
49
+ "text-anchor": "start",
50
+ style: "#666",
51
+ textMargin: 0,
52
+ rx: 0,
53
+ ry: 0,
54
+ tspan: !0
55
+ }), "getTextObj");
56
+ export {
57
+ d as a,
58
+ p as b,
59
+ m as c,
60
+ o as d,
61
+ h as e,
62
+ g as f,
63
+ y as g
64
+ };
src/backend/gradio_dropdownplus/templates/component/chunk-WVR4S24B-Br22bM8P.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import { _ as a, d as o } from "./mermaid.core-DH6TRyjK.js";
2
+ var d = /* @__PURE__ */ a((t, e) => {
3
+ let n;
4
+ return e === "sandbox" && (n = o("#i" + t)), (e === "sandbox" ? o(n.nodes()[0].contentDocument.body) : o("body")).select(`[id="${t}"]`);
5
+ }, "getDiagramElement");
6
+ export {
7
+ d as g
8
+ };
src/backend/gradio_dropdownplus/templates/component/classDiagram-3BZAVTQC-D45Rg7HK.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { s as r, c as s, a as e, C as t } from "./chunk-JBRWN2VN-19qyBxpW.js";
2
+ import { _ as l } from "./mermaid.core-DH6TRyjK.js";
3
+ var d = {
4
+ parser: e,
5
+ get db() {
6
+ return new t();
7
+ },
8
+ renderer: s,
9
+ styles: r,
10
+ init: /* @__PURE__ */ l((a) => {
11
+ a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
12
+ }, "init")
13
+ };
14
+ export {
15
+ d as diagram
16
+ };
src/backend/gradio_dropdownplus/templates/component/classDiagram-v2-QTMF73CY-D45Rg7HK.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { s as r, c as s, a as e, C as t } from "./chunk-JBRWN2VN-19qyBxpW.js";
2
+ import { _ as l } from "./mermaid.core-DH6TRyjK.js";
3
+ var d = {
4
+ parser: e,
5
+ get db() {
6
+ return new t();
7
+ },
8
+ renderer: s,
9
+ styles: r,
10
+ init: /* @__PURE__ */ l((a) => {
11
+ a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
12
+ }, "init")
13
+ };
14
+ export {
15
+ d as diagram
16
+ };
src/backend/gradio_dropdownplus/templates/component/clone-CHsVXWow.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import { b as r } from "./_baseUniq-DFIPcCrY.js";
2
+ var e = 4;
3
+ function a(o) {
4
+ return r(o, e);
5
+ }
6
+ export {
7
+ a as c
8
+ };
src/backend/gradio_dropdownplus/templates/component/dagre-2BBEFEWP-C6CYCTFq.js ADDED
@@ -0,0 +1,447 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as X, ar as F, as as Y, at as _, au as H, l as i, c as V, av as z, aw as U, ag as $, al as q, ah as P, af as K, ax as Q, ay as W, az as Z } from "./mermaid.core-DH6TRyjK.js";
2
+ import { G as B } from "./graph-Ngrd9eu7.js";
3
+ import { l as I } from "./layout-C7Nz_rwh.js";
4
+ import { i as x } from "./_baseUniq-DFIPcCrY.js";
5
+ import { c as L } from "./clone-CHsVXWow.js";
6
+ import { m as A } from "./_basePickBy-LaQQ5Y1-.js";
7
+ function p(e) {
8
+ var t = {
9
+ options: {
10
+ directed: e.isDirected(),
11
+ multigraph: e.isMultigraph(),
12
+ compound: e.isCompound()
13
+ },
14
+ nodes: ee(e),
15
+ edges: ne(e)
16
+ };
17
+ return x(e.graph()) || (t.value = L(e.graph())), t;
18
+ }
19
+ function ee(e) {
20
+ return A(e.nodes(), function(t) {
21
+ var n = e.node(t), o = e.parent(t), c = { v: t };
22
+ return x(n) || (c.value = n), x(o) || (c.parent = o), c;
23
+ });
24
+ }
25
+ function ne(e) {
26
+ return A(e.edges(), function(t) {
27
+ var n = e.edge(t), o = { v: t.v, w: t.w };
28
+ return x(t.name) || (o.name = t.name), x(n) || (o.value = n), o;
29
+ });
30
+ }
31
+ var f = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ X(() => {
32
+ b.clear(), J.clear(), f.clear();
33
+ }, "clear"), O = /* @__PURE__ */ X((e, t) => {
34
+ const n = b.get(t) || [];
35
+ return i.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
36
+ }, "isDescendant"), se = /* @__PURE__ */ X((e, t) => {
37
+ const n = b.get(t) || [];
38
+ return i.info("Descendants of ", t, " is ", n), i.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || O(e.v, t) || O(e.w, t) || n.includes(e.w) : (i.debug("Tilt, ", t, ",not in descendants"), !1);
39
+ }, "edgeInCluster"), G = /* @__PURE__ */ X((e, t, n, o) => {
40
+ i.warn(
41
+ "Copying children of ",
42
+ e,
43
+ "root",
44
+ o,
45
+ "data",
46
+ t.node(e),
47
+ o
48
+ );
49
+ const c = t.children(e) || [];
50
+ e !== o && c.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", c), c.forEach((a) => {
51
+ if (t.children(a).length > 0)
52
+ G(a, t, n, o);
53
+ else {
54
+ const r = t.node(a);
55
+ i.info("cp ", a, " to ", o, " with parent ", e), n.setNode(a, r), o !== t.parent(a) && (i.warn("Setting parent", a, t.parent(a)), n.setParent(a, t.parent(a))), e !== o && a !== e ? (i.debug("Setting parent", a, e), n.setParent(a, e)) : (i.info("In copy ", e, "root", o, "data", t.node(e), o), i.debug(
56
+ "Not Setting parent for node=",
57
+ a,
58
+ "cluster!==rootId",
59
+ e !== o,
60
+ "node!==clusterId",
61
+ a !== e
62
+ ));
63
+ const u = t.edges(a);
64
+ i.debug("Copying Edges", u), u.forEach((l) => {
65
+ i.info("Edge", l);
66
+ const v = t.edge(l.v, l.w, l.name);
67
+ i.info("Edge data", v, o);
68
+ try {
69
+ se(l, o) ? (i.info("Copying as ", l.v, l.w, v, l.name), n.setEdge(l.v, l.w, v, l.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
70
+ "Skipping copy of edge ",
71
+ l.v,
72
+ "-->",
73
+ l.w,
74
+ " rootId: ",
75
+ o,
76
+ " clusterId:",
77
+ e
78
+ );
79
+ } catch (C) {
80
+ i.error(C);
81
+ }
82
+ });
83
+ }
84
+ i.debug("Removing node", a), t.removeNode(a);
85
+ });
86
+ }, "copy"), R = /* @__PURE__ */ X((e, t) => {
87
+ const n = t.children(e);
88
+ let o = [...n];
89
+ for (const c of n)
90
+ J.set(c, e), o = [...o, ...R(c, t)];
91
+ return o;
92
+ }, "extractDescendants"), ie = /* @__PURE__ */ X((e, t, n) => {
93
+ const o = e.edges().filter((l) => l.v === t || l.w === t), c = e.edges().filter((l) => l.v === n || l.w === n), a = o.map((l) => ({ v: l.v === t ? n : l.v, w: l.w === t ? t : l.w })), r = c.map((l) => ({ v: l.v, w: l.w }));
94
+ return a.filter((l) => r.some((v) => l.v === v.v && l.w === v.w));
95
+ }, "findCommonEdges"), D = /* @__PURE__ */ X((e, t, n) => {
96
+ const o = t.children(e);
97
+ if (i.trace("Searching children of id ", e, o), o.length < 1)
98
+ return e;
99
+ let c;
100
+ for (const a of o) {
101
+ const r = D(a, t, n), u = ie(t, n, r);
102
+ if (r)
103
+ if (u.length > 0)
104
+ c = r;
105
+ else
106
+ return r;
107
+ }
108
+ return c;
109
+ }, "findNonClusterChild"), k = /* @__PURE__ */ X((e) => !f.has(e) || !f.get(e).externalConnections ? e : f.has(e) ? f.get(e).id : e, "getAnchorId"), re = /* @__PURE__ */ X((e, t) => {
110
+ if (!e || t > 10) {
111
+ i.debug("Opting out, no graph ");
112
+ return;
113
+ } else
114
+ i.debug("Opting in, graph ");
115
+ e.nodes().forEach(function(n) {
116
+ e.children(n).length > 0 && (i.warn(
117
+ "Cluster identified",
118
+ n,
119
+ " Replacement id in edges: ",
120
+ D(n, e, n)
121
+ ), b.set(n, R(n, e)), f.set(n, { id: D(n, e, n), clusterData: e.node(n) }));
122
+ }), e.nodes().forEach(function(n) {
123
+ const o = e.children(n), c = e.edges();
124
+ o.length > 0 ? (i.debug("Cluster identified", n, b), c.forEach((a) => {
125
+ const r = O(a.v, n), u = O(a.w, n);
126
+ r ^ u && (i.warn("Edge: ", a, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", b.get(n)), f.get(n).externalConnections = !0);
127
+ })) : i.debug("Not a cluster ", n, b);
128
+ });
129
+ for (let n of f.keys()) {
130
+ const o = f.get(n).id, c = e.parent(o);
131
+ c !== n && f.has(c) && !f.get(c).externalConnections && (f.get(n).id = c);
132
+ }
133
+ e.edges().forEach(function(n) {
134
+ const o = e.edge(n);
135
+ i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
136
+ let c = n.v, a = n.w;
137
+ if (i.warn(
138
+ "Fix XXX",
139
+ f,
140
+ "ids:",
141
+ n.v,
142
+ n.w,
143
+ "Translating: ",
144
+ f.get(n.v),
145
+ " --- ",
146
+ f.get(n.w)
147
+ ), f.get(n.v) || f.get(n.w)) {
148
+ if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), c = k(n.v), a = k(n.w), e.removeEdge(n.v, n.w, n.name), c !== n.v) {
149
+ const r = e.parent(c);
150
+ f.get(r).externalConnections = !0, o.fromCluster = n.v;
151
+ }
152
+ if (a !== n.w) {
153
+ const r = e.parent(a);
154
+ f.get(r).externalConnections = !0, o.toCluster = n.w;
155
+ }
156
+ i.warn("Fix Replacing with XXX", c, a, n.name), e.setEdge(c, a, o, n.name);
157
+ }
158
+ }), i.warn("Adjusted Graph", p(e)), T(e, 0), i.trace(f);
159
+ }, "adjustClustersAndEdges"), T = /* @__PURE__ */ X((e, t) => {
160
+ var c, a;
161
+ if (i.warn("extractor - ", t, p(e), e.children("D")), t > 10) {
162
+ i.error("Bailing out");
163
+ return;
164
+ }
165
+ let n = e.nodes(), o = !1;
166
+ for (const r of n) {
167
+ const u = e.children(r);
168
+ o = o || u.length > 0;
169
+ }
170
+ if (!o) {
171
+ i.debug("Done, no node has children", e.nodes());
172
+ return;
173
+ }
174
+ i.debug("Nodes = ", n, t);
175
+ for (const r of n)
176
+ if (i.debug(
177
+ "Extracting node",
178
+ r,
179
+ f,
180
+ f.has(r) && !f.get(r).externalConnections,
181
+ !e.parent(r),
182
+ e.node(r),
183
+ e.children("D"),
184
+ " Depth ",
185
+ t
186
+ ), !f.has(r))
187
+ i.debug("Not a cluster", r, t);
188
+ else if (!f.get(r).externalConnections && e.children(r) && e.children(r).length > 0) {
189
+ i.warn(
190
+ "Cluster without external connections, without a parent and with children",
191
+ r,
192
+ t
193
+ );
194
+ let l = e.graph().rankdir === "TB" ? "LR" : "TB";
195
+ (a = (c = f.get(r)) == null ? void 0 : c.clusterData) != null && a.dir && (l = f.get(r).clusterData.dir, i.warn("Fixing dir", f.get(r).clusterData.dir, l));
196
+ const v = new B({
197
+ multigraph: !0,
198
+ compound: !0
199
+ }).setGraph({
200
+ rankdir: l,
201
+ nodesep: 50,
202
+ ranksep: 50,
203
+ marginx: 8,
204
+ marginy: 8
205
+ }).setDefaultEdgeLabel(function() {
206
+ return {};
207
+ });
208
+ i.warn("Old graph before copy", p(e)), G(r, e, v, r), e.setNode(r, {
209
+ clusterNode: !0,
210
+ id: r,
211
+ clusterData: f.get(r).clusterData,
212
+ label: f.get(r).label,
213
+ graph: v
214
+ }), i.warn("New graph after copy node: (", r, ")", p(v)), i.debug("Old graph after copy", p(e));
215
+ } else
216
+ i.warn(
217
+ "Cluster ** ",
218
+ r,
219
+ " **not meeting the criteria !externalConnections:",
220
+ !f.get(r).externalConnections,
221
+ " no parent: ",
222
+ !e.parent(r),
223
+ " children ",
224
+ e.children(r) && e.children(r).length > 0,
225
+ e.children("D"),
226
+ t
227
+ ), i.debug(f);
228
+ n = e.nodes(), i.warn("New list of nodes", n);
229
+ for (const r of n) {
230
+ const u = e.node(r);
231
+ i.warn(" Now next level", r, u), u != null && u.clusterNode && T(u.graph, t + 1);
232
+ }
233
+ }, "extractor"), M = /* @__PURE__ */ X((e, t) => {
234
+ if (t.length === 0)
235
+ return [];
236
+ let n = Object.assign([], t);
237
+ return t.forEach((o) => {
238
+ const c = e.children(o), a = M(e, c);
239
+ n = [...n, ...a];
240
+ }), n;
241
+ }, "sorter"), oe = /* @__PURE__ */ X((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ X(async (e, t, n, o, c, a) => {
242
+ i.warn("Graph in recursive render:XAX", p(t), c);
243
+ const r = t.graph().rankdir;
244
+ i.trace("Dir in recursive render - dir:", r);
245
+ const u = e.insert("g").attr("class", "root");
246
+ t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.info("Recursive edges", t.edge(t.edges()[0]));
247
+ const l = u.insert("g").attr("class", "clusters"), v = u.insert("g").attr("class", "edgePaths"), C = u.insert("g").attr("class", "edgeLabels"), g = u.insert("g").attr("class", "nodes");
248
+ await Promise.all(
249
+ t.nodes().map(async function(d) {
250
+ const s = t.node(d);
251
+ if (c !== void 0) {
252
+ const w = JSON.parse(JSON.stringify(c.clusterData));
253
+ i.trace(
254
+ `Setting data for parent cluster XXX
255
+ Node.id = `,
256
+ d,
257
+ `
258
+ data=`,
259
+ w.height,
260
+ `
261
+ Parent cluster`,
262
+ c.height
263
+ ), t.setNode(c.id, w), t.parent(d) || (i.trace("Setting parent", d, c.id), t.setParent(d, c.id, w));
264
+ }
265
+ if (i.info("(Insert) Node XXX" + d + ": " + JSON.stringify(t.node(d))), s != null && s.clusterNode) {
266
+ i.info("Cluster identified XBX", d, s.width, t.node(d));
267
+ const { ranksep: w, nodesep: m } = t.graph();
268
+ s.graph.setGraph({
269
+ ...s.graph.graph(),
270
+ ranksep: w + 25,
271
+ nodesep: m
272
+ });
273
+ const N = await j(
274
+ g,
275
+ s.graph,
276
+ n,
277
+ o,
278
+ t.node(d),
279
+ a
280
+ ), S = N.elem;
281
+ z(s, S), s.diff = N.diff || 0, i.info(
282
+ "New compound node after recursive render XAX",
283
+ d,
284
+ "width",
285
+ // node,
286
+ s.width,
287
+ "height",
288
+ s.height
289
+ // node.x,
290
+ // node.y
291
+ ), U(S, s);
292
+ } else
293
+ t.children(d).length > 0 ? (i.trace(
294
+ "Cluster - the non recursive path XBX",
295
+ d,
296
+ s.id,
297
+ s,
298
+ s.width,
299
+ "Graph:",
300
+ t
301
+ ), i.trace(D(s.id, t)), f.set(s.id, { id: D(s.id, t), node: s })) : (i.trace("Node - the non recursive path XAX", d, g, t.node(d), r), await $(g, t.node(d), { config: a, dir: r }));
302
+ })
303
+ ), await (/* @__PURE__ */ X(async () => {
304
+ const d = t.edges().map(async function(s) {
305
+ const w = t.edge(s.v, s.w, s.name);
306
+ i.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), i.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), i.info(
307
+ "Fix",
308
+ f,
309
+ "ids:",
310
+ s.v,
311
+ s.w,
312
+ "Translating: ",
313
+ f.get(s.v),
314
+ f.get(s.w)
315
+ ), await Z(C, w);
316
+ });
317
+ await Promise.all(d);
318
+ }, "processEdges"))(), i.info("Graph before layout:", JSON.stringify(p(t))), i.info("############################################# XXX"), i.info("### Layout ### XXX"), i.info("############################################# XXX"), I(t), i.info("Graph after layout:", JSON.stringify(p(t)));
319
+ let E = 0, { subGraphTitleTotalMargin: y } = q(a);
320
+ return await Promise.all(
321
+ oe(t).map(async function(d) {
322
+ var w;
323
+ const s = t.node(d);
324
+ if (i.info(
325
+ "Position XBX => " + d + ": (" + s.x,
326
+ "," + s.y,
327
+ ") width: ",
328
+ s.width,
329
+ " height: ",
330
+ s.height
331
+ ), s != null && s.clusterNode)
332
+ s.y += y, i.info(
333
+ "A tainted cluster node XBX1",
334
+ d,
335
+ s.id,
336
+ s.width,
337
+ s.height,
338
+ s.x,
339
+ s.y,
340
+ t.parent(d)
341
+ ), f.get(s.id).node = s, P(s);
342
+ else if (t.children(d).length > 0) {
343
+ i.info(
344
+ "A pure cluster node XBX1",
345
+ d,
346
+ s.id,
347
+ s.x,
348
+ s.y,
349
+ s.width,
350
+ s.height,
351
+ t.parent(d)
352
+ ), s.height += y, t.node(s.parentId);
353
+ const m = (s == null ? void 0 : s.padding) / 2 || 0, N = ((w = s == null ? void 0 : s.labelBBox) == null ? void 0 : w.height) || 0, S = N - m || 0;
354
+ i.debug("OffsetY", S, "labelHeight", N, "halfPadding", m), await K(l, s), f.get(s.id).node = s;
355
+ } else {
356
+ const m = t.node(s.parentId);
357
+ s.y += y / 2, i.info(
358
+ "A regular node XBX1 - using the padding",
359
+ s.id,
360
+ "parent",
361
+ s.parentId,
362
+ s.width,
363
+ s.height,
364
+ s.x,
365
+ s.y,
366
+ "offsetY",
367
+ s.offsetY,
368
+ "parent",
369
+ m,
370
+ m == null ? void 0 : m.offsetY,
371
+ s
372
+ ), P(s);
373
+ }
374
+ })
375
+ ), t.edges().forEach(function(d) {
376
+ const s = t.edge(d);
377
+ i.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(s), s), s.points.forEach((S) => S.y += y / 2);
378
+ const w = t.node(d.v);
379
+ var m = t.node(d.w);
380
+ const N = Q(v, s, f, n, w, m, o);
381
+ W(s, N);
382
+ }), t.nodes().forEach(function(d) {
383
+ const s = t.node(d);
384
+ i.info(d, s.type, s.diff), s.isGroup && (E = s.diff);
385
+ }), i.warn("Returning from recursive render XAX", u, E), { elem: u, diff: E };
386
+ }, "recursiveRender"), ge = /* @__PURE__ */ X(async (e, t) => {
387
+ var a, r, u, l, v, C;
388
+ const n = new B({
389
+ multigraph: !0,
390
+ compound: !0
391
+ }).setGraph({
392
+ rankdir: e.direction,
393
+ nodesep: ((a = e.config) == null ? void 0 : a.nodeSpacing) || ((u = (r = e.config) == null ? void 0 : r.flowchart) == null ? void 0 : u.nodeSpacing) || e.nodeSpacing,
394
+ ranksep: ((l = e.config) == null ? void 0 : l.rankSpacing) || ((C = (v = e.config) == null ? void 0 : v.flowchart) == null ? void 0 : C.rankSpacing) || e.rankSpacing,
395
+ marginx: 8,
396
+ marginy: 8
397
+ }).setDefaultEdgeLabel(function() {
398
+ return {};
399
+ }), o = t.select("g");
400
+ F(o, e.markers, e.type, e.diagramId), Y(), _(), H(), te(), e.nodes.forEach((g) => {
401
+ n.setNode(g.id, { ...g }), g.parentId && n.setParent(g.id, g.parentId);
402
+ }), i.debug("Edges:", e.edges), e.edges.forEach((g) => {
403
+ if (g.start === g.end) {
404
+ const h = g.start, E = h + "---" + h + "---1", y = h + "---" + h + "---2", d = n.node(h);
405
+ n.setNode(E, {
406
+ domId: E,
407
+ id: E,
408
+ parentId: d.parentId,
409
+ labelStyle: "",
410
+ label: "",
411
+ padding: 0,
412
+ shape: "labelRect",
413
+ // shape: 'rect',
414
+ style: "",
415
+ width: 10,
416
+ height: 10
417
+ }), n.setParent(E, d.parentId), n.setNode(y, {
418
+ domId: y,
419
+ id: y,
420
+ parentId: d.parentId,
421
+ labelStyle: "",
422
+ padding: 0,
423
+ // shape: 'rect',
424
+ shape: "labelRect",
425
+ label: "",
426
+ style: "",
427
+ width: 10,
428
+ height: 10
429
+ }), n.setParent(y, d.parentId);
430
+ const s = structuredClone(g), w = structuredClone(g), m = structuredClone(g);
431
+ s.label = "", s.arrowTypeEnd = "none", s.id = h + "-cyclic-special-1", w.arrowTypeStart = "none", w.arrowTypeEnd = "none", w.id = h + "-cyclic-special-mid", m.label = "", d.isGroup && (s.fromCluster = h, m.toCluster = h), m.id = h + "-cyclic-special-2", m.arrowTypeStart = "none", n.setEdge(h, E, s, h + "-cyclic-special-0"), n.setEdge(E, y, w, h + "-cyclic-special-1"), n.setEdge(y, h, m, h + "-cyc<lic-special-2");
432
+ } else
433
+ n.setEdge(g.start, g.end, { ...g }, g.id);
434
+ }), i.warn("Graph at first:", JSON.stringify(p(n))), re(n), i.warn("Graph after XAX:", JSON.stringify(p(n)));
435
+ const c = V();
436
+ await j(
437
+ o,
438
+ n,
439
+ e.type,
440
+ e.diagramId,
441
+ void 0,
442
+ c
443
+ );
444
+ }, "render");
445
+ export {
446
+ ge as render
447
+ };
src/backend/gradio_dropdownplus/templates/component/diagram-4IRLE6MV-_4f03rOr.js ADDED
@@ -0,0 +1,534 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { s as he } from "./chunk-NRVI72HA-CQ3LV39f.js";
2
+ import { _ as w, D as te, E as ae, H as ue, e as pe, l as K, aY as P, d as j, b as fe, a as ge, p as me, q as ye, g as Se, s as ve, F as xe, aZ as be, y as we } from "./mermaid.core-DH6TRyjK.js";
3
+ import { p as Ce } from "./chunk-ANTBXLJU-BwgTSljF.js";
4
+ import { p as Te } from "./treemap-75Q7IDZK-o7HSbXc7.js";
5
+ import { b as O } from "./defaultLocale-D7EN2tov.js";
6
+ import { o as J } from "./ordinal-DfAQgscy.js";
7
+ function Le(t) {
8
+ var a = 0, l = t.children, n = l && l.length;
9
+ if (!n) a = 1;
10
+ else for (; --n >= 0; ) a += l[n].value;
11
+ t.value = a;
12
+ }
13
+ function $e() {
14
+ return this.eachAfter(Le);
15
+ }
16
+ function Ae(t, a) {
17
+ let l = -1;
18
+ for (const n of this)
19
+ t.call(a, n, ++l, this);
20
+ return this;
21
+ }
22
+ function Fe(t, a) {
23
+ for (var l = this, n = [l], o, s, d = -1; l = n.pop(); )
24
+ if (t.call(a, l, ++d, this), o = l.children)
25
+ for (s = o.length - 1; s >= 0; --s)
26
+ n.push(o[s]);
27
+ return this;
28
+ }
29
+ function ke(t, a) {
30
+ for (var l = this, n = [l], o = [], s, d, h, g = -1; l = n.pop(); )
31
+ if (o.push(l), s = l.children)
32
+ for (d = 0, h = s.length; d < h; ++d)
33
+ n.push(s[d]);
34
+ for (; l = o.pop(); )
35
+ t.call(a, l, ++g, this);
36
+ return this;
37
+ }
38
+ function Ne(t, a) {
39
+ let l = -1;
40
+ for (const n of this)
41
+ if (t.call(a, n, ++l, this))
42
+ return n;
43
+ }
44
+ function Me(t) {
45
+ return this.eachAfter(function(a) {
46
+ for (var l = +t(a.data) || 0, n = a.children, o = n && n.length; --o >= 0; ) l += n[o].value;
47
+ a.value = l;
48
+ });
49
+ }
50
+ function _e(t) {
51
+ return this.eachBefore(function(a) {
52
+ a.children && a.children.sort(t);
53
+ });
54
+ }
55
+ function ze(t) {
56
+ for (var a = this, l = Ve(a, t), n = [a]; a !== l; )
57
+ a = a.parent, n.push(a);
58
+ for (var o = n.length; t !== l; )
59
+ n.splice(o, 0, t), t = t.parent;
60
+ return n;
61
+ }
62
+ function Ve(t, a) {
63
+ if (t === a) return t;
64
+ var l = t.ancestors(), n = a.ancestors(), o = null;
65
+ for (t = l.pop(), a = n.pop(); t === a; )
66
+ o = t, t = l.pop(), a = n.pop();
67
+ return o;
68
+ }
69
+ function De() {
70
+ for (var t = this, a = [t]; t = t.parent; )
71
+ a.push(t);
72
+ return a;
73
+ }
74
+ function Pe() {
75
+ return Array.from(this);
76
+ }
77
+ function Be() {
78
+ var t = [];
79
+ return this.eachBefore(function(a) {
80
+ a.children || t.push(a);
81
+ }), t;
82
+ }
83
+ function Ee() {
84
+ var t = this, a = [];
85
+ return t.each(function(l) {
86
+ l !== t && a.push({ source: l.parent, target: l });
87
+ }), a;
88
+ }
89
+ function* Re() {
90
+ var t = this, a, l = [t], n, o, s;
91
+ do
92
+ for (a = l.reverse(), l = []; t = a.pop(); )
93
+ if (yield t, n = t.children)
94
+ for (o = 0, s = n.length; o < s; ++o)
95
+ l.push(n[o]);
96
+ while (l.length);
97
+ }
98
+ function Q(t, a) {
99
+ t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ie)) : a === void 0 && (a = He);
100
+ for (var l = new Z(t), n, o = [l], s, d, h, g; n = o.pop(); )
101
+ if ((d = a(n.data)) && (g = (d = Array.from(d)).length))
102
+ for (n.children = d, h = g - 1; h >= 0; --h)
103
+ o.push(s = d[h] = new Z(d[h])), s.parent = n, s.depth = n.depth + 1;
104
+ return l.eachBefore(qe);
105
+ }
106
+ function We() {
107
+ return Q(this).eachBefore(Oe);
108
+ }
109
+ function He(t) {
110
+ return t.children;
111
+ }
112
+ function Ie(t) {
113
+ return Array.isArray(t) ? t[1] : null;
114
+ }
115
+ function Oe(t) {
116
+ t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
117
+ }
118
+ function qe(t) {
119
+ var a = 0;
120
+ do
121
+ t.height = a;
122
+ while ((t = t.parent) && t.height < ++a);
123
+ }
124
+ function Z(t) {
125
+ this.data = t, this.depth = this.height = 0, this.parent = null;
126
+ }
127
+ Z.prototype = Q.prototype = {
128
+ constructor: Z,
129
+ count: $e,
130
+ each: Ae,
131
+ eachAfter: ke,
132
+ eachBefore: Fe,
133
+ find: Ne,
134
+ sum: Me,
135
+ sort: _e,
136
+ path: ze,
137
+ ancestors: De,
138
+ descendants: Pe,
139
+ leaves: Be,
140
+ links: Ee,
141
+ copy: We,
142
+ [Symbol.iterator]: Re
143
+ };
144
+ function Ge(t) {
145
+ if (typeof t != "function") throw new Error();
146
+ return t;
147
+ }
148
+ function q() {
149
+ return 0;
150
+ }
151
+ function G(t) {
152
+ return function() {
153
+ return t;
154
+ };
155
+ }
156
+ function Xe(t) {
157
+ t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
158
+ }
159
+ function Ye(t, a, l, n, o) {
160
+ for (var s = t.children, d, h = -1, g = s.length, c = t.value && (n - a) / t.value; ++h < g; )
161
+ d = s[h], d.y0 = l, d.y1 = o, d.x0 = a, d.x1 = a += d.value * c;
162
+ }
163
+ function je(t, a, l, n, o) {
164
+ for (var s = t.children, d, h = -1, g = s.length, c = t.value && (o - l) / t.value; ++h < g; )
165
+ d = s[h], d.x0 = a, d.x1 = n, d.y0 = l, d.y1 = l += d.value * c;
166
+ }
167
+ var Ze = (1 + Math.sqrt(5)) / 2;
168
+ function Ue(t, a, l, n, o, s) {
169
+ for (var d = [], h = a.children, g, c, u = 0, b = 0, r = h.length, x, S, v = a.value, p, m, N, k, V, R, M; u < r; ) {
170
+ x = o - l, S = s - n;
171
+ do
172
+ p = h[b++].value;
173
+ while (!p && b < r);
174
+ for (m = N = p, R = Math.max(S / x, x / S) / (v * t), M = p * p * R, V = Math.max(N / M, M / m); b < r; ++b) {
175
+ if (p += c = h[b].value, c < m && (m = c), c > N && (N = c), M = p * p * R, k = Math.max(N / M, M / m), k > V) {
176
+ p -= c;
177
+ break;
178
+ }
179
+ V = k;
180
+ }
181
+ d.push(g = { value: p, dice: x < S, children: h.slice(u, b) }), g.dice ? Ye(g, l, n, o, v ? n += S * p / v : s) : je(g, l, n, v ? l += x * p / v : o, s), v -= p, u = b;
182
+ }
183
+ return d;
184
+ }
185
+ const Je = function t(a) {
186
+ function l(n, o, s, d, h) {
187
+ Ue(a, n, o, s, d, h);
188
+ }
189
+ return l.ratio = function(n) {
190
+ return t((n = +n) > 1 ? n : 1);
191
+ }, l;
192
+ }(Ze);
193
+ function Ke() {
194
+ var t = Je, a = !1, l = 1, n = 1, o = [0], s = q, d = q, h = q, g = q, c = q;
195
+ function u(r) {
196
+ return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), o = [0], a && r.eachBefore(Xe), r;
197
+ }
198
+ function b(r) {
199
+ var x = o[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, m = r.y1 - x;
200
+ p < S && (S = p = (S + p) / 2), m < v && (v = m = (v + m) / 2), r.x0 = S, r.y0 = v, r.x1 = p, r.y1 = m, r.children && (x = o[r.depth + 1] = s(r) / 2, S += c(r) - x, v += d(r) - x, p -= h(r) - x, m -= g(r) - x, p < S && (S = p = (S + p) / 2), m < v && (v = m = (v + m) / 2), t(r, S, v, p, m));
201
+ }
202
+ return u.round = function(r) {
203
+ return arguments.length ? (a = !!r, u) : a;
204
+ }, u.size = function(r) {
205
+ return arguments.length ? (l = +r[0], n = +r[1], u) : [l, n];
206
+ }, u.tile = function(r) {
207
+ return arguments.length ? (t = Ge(r), u) : t;
208
+ }, u.padding = function(r) {
209
+ return arguments.length ? u.paddingInner(r).paddingOuter(r) : u.paddingInner();
210
+ }, u.paddingInner = function(r) {
211
+ return arguments.length ? (s = typeof r == "function" ? r : G(+r), u) : s;
212
+ }, u.paddingOuter = function(r) {
213
+ return arguments.length ? u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r) : u.paddingTop();
214
+ }, u.paddingTop = function(r) {
215
+ return arguments.length ? (d = typeof r == "function" ? r : G(+r), u) : d;
216
+ }, u.paddingRight = function(r) {
217
+ return arguments.length ? (h = typeof r == "function" ? r : G(+r), u) : h;
218
+ }, u.paddingBottom = function(r) {
219
+ return arguments.length ? (g = typeof r == "function" ? r : G(+r), u) : g;
220
+ }, u.paddingLeft = function(r) {
221
+ return arguments.length ? (c = typeof r == "function" ? r : G(+r), u) : c;
222
+ }, u;
223
+ }
224
+ var E, ne = (E = class {
225
+ constructor() {
226
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = fe, this.getAccTitle = ge, this.setDiagramTitle = me, this.getDiagramTitle = ye, this.getAccDescription = Se, this.setAccDescription = ve;
227
+ }
228
+ getNodes() {
229
+ return this.nodes;
230
+ }
231
+ getConfig() {
232
+ const a = xe, l = ae();
233
+ return te({
234
+ ...a.treemap,
235
+ ...l.treemap ?? {}
236
+ });
237
+ }
238
+ addNode(a, l) {
239
+ this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ?? (this.root = a));
240
+ }
241
+ getRoot() {
242
+ return { name: "", children: this.outerNodes };
243
+ }
244
+ addClass(a, l) {
245
+ const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, o = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
246
+ o && o.forEach((s) => {
247
+ be(s) && (n != null && n.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n != null && n.styles ? n.styles.push(s) : n.styles = [s];
248
+ }), this.classes.set(a, n);
249
+ }
250
+ getClasses() {
251
+ return this.classes;
252
+ }
253
+ getStylesForClass(a) {
254
+ var l;
255
+ return ((l = this.classes.get(a)) == null ? void 0 : l.styles) ?? [];
256
+ }
257
+ clear() {
258
+ we(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
259
+ }
260
+ }, w(E, "TreeMapDB"), E);
261
+ function le(t) {
262
+ if (!t.length)
263
+ return [];
264
+ const a = [], l = [];
265
+ return t.forEach((n) => {
266
+ const o = {
267
+ name: n.name,
268
+ children: n.type === "Leaf" ? void 0 : []
269
+ };
270
+ for (o.classSelector = n == null ? void 0 : n.classSelector, n != null && n.cssCompiledStyles && (o.cssCompiledStyles = [n.cssCompiledStyles]), n.type === "Leaf" && n.value !== void 0 && (o.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
271
+ l.pop();
272
+ if (l.length === 0)
273
+ a.push(o);
274
+ else {
275
+ const s = l[l.length - 1].node;
276
+ s.children ? s.children.push(o) : s.children = [o];
277
+ }
278
+ n.type !== "Leaf" && l.push({ node: o, level: n.level });
279
+ }), a;
280
+ }
281
+ w(le, "buildHierarchy");
282
+ var Qe = /* @__PURE__ */ w((t, a) => {
283
+ Ce(t, a);
284
+ const l = [];
285
+ for (const s of t.TreemapRows ?? [])
286
+ s.$type === "ClassDefStatement" && a.addClass(s.className ?? "", s.styleText ?? "");
287
+ for (const s of t.TreemapRows ?? []) {
288
+ const d = s.item;
289
+ if (!d)
290
+ continue;
291
+ const h = s.indent ? parseInt(s.indent) : 0, g = et(d), c = d.classSelector ? a.getStylesForClass(d.classSelector) : [], u = c.length > 0 ? c.join(";") : void 0, b = {
292
+ level: h,
293
+ name: g,
294
+ type: d.$type,
295
+ value: d.value,
296
+ classSelector: d.classSelector,
297
+ cssCompiledStyles: u
298
+ };
299
+ l.push(b);
300
+ }
301
+ const n = le(l), o = /* @__PURE__ */ w((s, d) => {
302
+ for (const h of s)
303
+ a.addNode(h, d), h.children && h.children.length > 0 && o(h.children, d + 1);
304
+ }, "addNodesRecursively");
305
+ o(n, 0);
306
+ }, "populate"), et = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), re = {
307
+ // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
308
+ parser: { yy: void 0 },
309
+ parse: /* @__PURE__ */ w(async (t) => {
310
+ var a;
311
+ try {
312
+ const n = await Te("treemap", t);
313
+ K.debug("Treemap AST:", n);
314
+ const o = (a = re.parser) == null ? void 0 : a.yy;
315
+ if (!(o instanceof ne))
316
+ throw new Error(
317
+ "parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
318
+ );
319
+ Qe(n, o);
320
+ } catch (l) {
321
+ throw K.error("Error parsing treemap:", l), l;
322
+ }
323
+ }, "parse")
324
+ }, tt = 10, B = 10, X = 25, at = /* @__PURE__ */ w((t, a, l, n) => {
325
+ const o = n.db, s = o.getConfig(), d = s.padding ?? tt, h = o.getDiagramTitle(), g = o.getRoot(), { themeVariables: c } = ae();
326
+ if (!g)
327
+ return;
328
+ const u = h ? 30 : 0, b = ue(a), r = s.nodeWidth ? s.nodeWidth * B : 960, x = s.nodeHeight ? s.nodeHeight * B : 500, S = r, v = x + u;
329
+ b.attr("viewBox", `0 0 ${S} ${v}`), pe(b, v, S, s.useMaxWidth);
330
+ let p;
331
+ try {
332
+ const e = s.valueFormat || ",";
333
+ if (e === "$0,0")
334
+ p = /* @__PURE__ */ w((i) => "$" + O(",")(i), "valueFormat");
335
+ else if (e.startsWith("$") && e.includes(",")) {
336
+ const i = /\.\d+/.exec(e), f = i ? i[0] : "";
337
+ p = /* @__PURE__ */ w((C) => "$" + O("," + f)(C), "valueFormat");
338
+ } else if (e.startsWith("$")) {
339
+ const i = e.substring(1);
340
+ p = /* @__PURE__ */ w((f) => "$" + O(i || "")(f), "valueFormat");
341
+ } else
342
+ p = O(e);
343
+ } catch (e) {
344
+ K.error("Error creating format function:", e), p = O(",");
345
+ }
346
+ const m = J().range([
347
+ "transparent",
348
+ c.cScale0,
349
+ c.cScale1,
350
+ c.cScale2,
351
+ c.cScale3,
352
+ c.cScale4,
353
+ c.cScale5,
354
+ c.cScale6,
355
+ c.cScale7,
356
+ c.cScale8,
357
+ c.cScale9,
358
+ c.cScale10,
359
+ c.cScale11
360
+ ]), N = J().range([
361
+ "transparent",
362
+ c.cScalePeer0,
363
+ c.cScalePeer1,
364
+ c.cScalePeer2,
365
+ c.cScalePeer3,
366
+ c.cScalePeer4,
367
+ c.cScalePeer5,
368
+ c.cScalePeer6,
369
+ c.cScalePeer7,
370
+ c.cScalePeer8,
371
+ c.cScalePeer9,
372
+ c.cScalePeer10,
373
+ c.cScalePeer11
374
+ ]), k = J().range([
375
+ c.cScaleLabel0,
376
+ c.cScaleLabel1,
377
+ c.cScaleLabel2,
378
+ c.cScaleLabel3,
379
+ c.cScaleLabel4,
380
+ c.cScaleLabel5,
381
+ c.cScaleLabel6,
382
+ c.cScaleLabel7,
383
+ c.cScaleLabel8,
384
+ c.cScaleLabel9,
385
+ c.cScaleLabel10,
386
+ c.cScaleLabel11
387
+ ]);
388
+ h && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(h);
389
+ const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), R = Q(g).sum((e) => e.value ?? 0).sort((e, i) => (i.value ?? 0) - (e.value ?? 0)), ee = Ke().size([r, x]).paddingTop(
390
+ (e) => e.children && e.children.length > 0 ? X + B : 0
391
+ ).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? B : 0).paddingRight((e) => e.children && e.children.length > 0 ? B : 0).paddingBottom((e) => e.children && e.children.length > 0 ? B : 0).round(!0)(R), se = ee.descendants().filter((e) => e.children && e.children.length > 0), W = V.selectAll(".treemapSection").data(se).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
392
+ W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), W.append("clipPath").attr("id", (e, i) => `clip-section-${a}-${i}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), W.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, i) => `treemapSection section${i}`).attr("fill", (e) => m(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
393
+ if (e.depth === 0)
394
+ return "display: none;";
395
+ const i = P({ cssCompiledStyles: e.data.cssCompiledStyles });
396
+ return i.nodeStyles + ";" + i.borderStyles.join(";");
397
+ }), W.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", X / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
398
+ if (e.depth === 0)
399
+ return "display: none;";
400
+ const i = "dominant-baseline: middle; font-size: 12px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
401
+ return i + f.labelStyles.replace("color:", "fill:");
402
+ }).each(function(e) {
403
+ if (e.depth === 0)
404
+ return;
405
+ const i = j(this), f = e.data.name;
406
+ i.text(f);
407
+ const C = e.x1 - e.x0, $ = 6;
408
+ let A;
409
+ s.showValues !== !1 && e.value ? A = C - 10 - 30 - 10 - $ : A = C - $ - 6;
410
+ const F = Math.max(15, A), y = i.node();
411
+ if (y.getComputedTextLength() > F) {
412
+ const T = "...";
413
+ let L = f;
414
+ for (; L.length > 0; ) {
415
+ if (L = f.substring(0, L.length - 1), L.length === 0) {
416
+ i.text(T), y.getComputedTextLength() > F && i.text("");
417
+ break;
418
+ }
419
+ if (i.text(L + T), y.getComputedTextLength() <= F)
420
+ break;
421
+ }
422
+ }
423
+ }), s.showValues !== !1 && W.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", X / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? p(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
424
+ if (e.depth === 0)
425
+ return "display: none;";
426
+ const i = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
427
+ return i + f.labelStyles.replace("color:", "fill:");
428
+ });
429
+ const ie = ee.leaves(), Y = V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class", (e, i) => `treemapNode treemapLeafGroup leaf${i}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
430
+ Y.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("style", (e) => P({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("stroke-width", 3), Y.append("clipPath").attr("id", (e, i) => `clip-${a}-${i}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), Y.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
431
+ const i = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + k(e.data.name) + ";", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
432
+ return i + f.labelStyles.replace("color:", "fill:");
433
+ }).attr("clip-path", (e, i) => `url(#clip-${a}-${i})`).text((e) => e.data.name).each(function(e) {
434
+ const i = j(this), f = e.x1 - e.x0, C = e.y1 - e.y0, $ = i.node(), A = 4, D = f - 2 * A, F = C - 2 * A;
435
+ if (D < 10 || F < 10) {
436
+ i.style("display", "none");
437
+ return;
438
+ }
439
+ let y = parseInt(i.style("font-size"), 10);
440
+ const _ = 8, T = 28, L = 0.6, z = 6, H = 2;
441
+ for (; $.getComputedTextLength() > D && y > _; )
442
+ y--, i.style("font-size", `${y}px`);
443
+ let I = Math.max(
444
+ z,
445
+ Math.min(T, Math.round(y * L))
446
+ ), U = y + H + I;
447
+ for (; U > F && y > _ && (y--, I = Math.max(
448
+ z,
449
+ Math.min(T, Math.round(y * L))
450
+ ), !(I < z && y === _)); )
451
+ i.style("font-size", `${y}px`), U = y + H + I;
452
+ i.style("font-size", `${y}px`), ($.getComputedTextLength() > D || y < _ || F < y) && i.style("display", "none");
453
+ }), s.showValues !== !1 && Y.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
454
+ return (i.y1 - i.y0) / 2;
455
+ }).attr("style", (i) => {
456
+ const f = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + k(i.data.name) + ";", C = P({ cssCompiledStyles: i.data.cssCompiledStyles });
457
+ return f + C.labelStyles.replace("color:", "fill:");
458
+ }).attr("clip-path", (i, f) => `url(#clip-${a}-${f})`).text((i) => i.value ? p(i.value) : "").each(function(i) {
459
+ const f = j(this), C = this.parentNode;
460
+ if (!C) {
461
+ f.style("display", "none");
462
+ return;
463
+ }
464
+ const $ = j(C).select(".treemapLabel");
465
+ if ($.empty() || $.style("display") === "none") {
466
+ f.style("display", "none");
467
+ return;
468
+ }
469
+ const A = parseFloat($.style("font-size")), D = 28, F = 0.6, y = 6, _ = 2, T = Math.max(
470
+ y,
471
+ Math.min(D, Math.round(A * F))
472
+ );
473
+ f.style("font-size", `${T}px`);
474
+ const z = (i.y1 - i.y0) / 2 + A / 2 + _;
475
+ f.attr("y", z);
476
+ const H = i.x1 - i.x0, ce = i.y1 - i.y0 - 4, de = H - 2 * 4;
477
+ f.node().getComputedTextLength() > de || z + T > ce || T < y ? f.style("display", "none") : f.style("display", null);
478
+ });
479
+ const oe = s.diagramPadding ?? 8;
480
+ he(b, oe, "flowchart", (s == null ? void 0 : s.useMaxWidth) || !1);
481
+ }, "draw"), nt = /* @__PURE__ */ w(function(t, a) {
482
+ return a.db.getClasses();
483
+ }, "getClasses"), lt = { draw: at, getClasses: nt }, rt = {
484
+ sectionStrokeColor: "black",
485
+ sectionStrokeWidth: "1",
486
+ sectionFillColor: "#efefef",
487
+ leafStrokeColor: "black",
488
+ leafStrokeWidth: "1",
489
+ leafFillColor: "#efefef",
490
+ labelColor: "black",
491
+ labelFontSize: "12px",
492
+ valueFontSize: "10px",
493
+ valueColor: "black",
494
+ titleColor: "black",
495
+ titleFontSize: "14px"
496
+ }, st = /* @__PURE__ */ w(({
497
+ treemap: t
498
+ } = {}) => {
499
+ const a = te(rt, t);
500
+ return `
501
+ .treemapNode.section {
502
+ stroke: ${a.sectionStrokeColor};
503
+ stroke-width: ${a.sectionStrokeWidth};
504
+ fill: ${a.sectionFillColor};
505
+ }
506
+ .treemapNode.leaf {
507
+ stroke: ${a.leafStrokeColor};
508
+ stroke-width: ${a.leafStrokeWidth};
509
+ fill: ${a.leafFillColor};
510
+ }
511
+ .treemapLabel {
512
+ fill: ${a.labelColor};
513
+ font-size: ${a.labelFontSize};
514
+ }
515
+ .treemapValue {
516
+ fill: ${a.valueColor};
517
+ font-size: ${a.valueFontSize};
518
+ }
519
+ .treemapTitle {
520
+ fill: ${a.titleColor};
521
+ font-size: ${a.titleFontSize};
522
+ }
523
+ `;
524
+ }, "getStyles"), it = st, gt = {
525
+ parser: re,
526
+ get db() {
527
+ return new ne();
528
+ },
529
+ renderer: lt,
530
+ styles: it
531
+ };
532
+ export {
533
+ gt as diagram
534
+ };
src/backend/gradio_dropdownplus/templates/component/diagram-GUPCWM2R-C_OtVk8U.js ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { p as B } from "./chunk-ANTBXLJU-BwgTSljF.js";
2
+ import { _ as b, D as m, H as C, e as S, l as w, b as D, a as T, p as E, q as F, g as P, s as z, E as A, F as W, y as _ } from "./mermaid.core-DH6TRyjK.js";
3
+ import { p as N } from "./treemap-75Q7IDZK-o7HSbXc7.js";
4
+ var L = W.packet, u, v = (u = class {
5
+ constructor() {
6
+ this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = E, this.getDiagramTitle = F, this.getAccDescription = P, this.setAccDescription = z;
7
+ }
8
+ getConfig() {
9
+ const t = m({
10
+ ...L,
11
+ ...A().packet
12
+ });
13
+ return t.showBits && (t.paddingY += 10), t;
14
+ }
15
+ getPacket() {
16
+ return this.packet;
17
+ }
18
+ pushWord(t) {
19
+ t.length > 0 && this.packet.push(t);
20
+ }
21
+ clear() {
22
+ _(), this.packet = [];
23
+ }
24
+ }, b(u, "PacketDB"), u), M = 1e4, Y = /* @__PURE__ */ b((e, t) => {
25
+ B(e, t);
26
+ let s = -1, r = [], n = 1;
27
+ const { bitsPerRow: l } = t.getConfig();
28
+ for (let { start: a, end: i, bits: d, label: c } of e.blocks) {
29
+ if (a !== void 0 && i !== void 0 && i < a)
30
+ throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
31
+ if (a ?? (a = s + 1), a !== s + 1)
32
+ throw new Error(
33
+ `Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${s + 1}.`
34
+ );
35
+ if (d === 0)
36
+ throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
37
+ for (i ?? (i = a + (d ?? 1) - 1), d ?? (d = i - a + 1), s = i, w.debug(`Packet block ${a} - ${s} with label ${c}`); r.length <= l + 1 && t.getPacket().length < M; ) {
38
+ const [p, o] = H({ start: a, end: i, bits: d, label: c }, n, l);
39
+ if (r.push(p), p.end + 1 === n * l && (t.pushWord(r), r = [], n++), !o)
40
+ break;
41
+ ({ start: a, end: i, bits: d, label: c } = o);
42
+ }
43
+ }
44
+ t.pushWord(r);
45
+ }, "populate"), H = /* @__PURE__ */ b((e, t, s) => {
46
+ if (e.start === void 0)
47
+ throw new Error("start should have been set during first phase");
48
+ if (e.end === void 0)
49
+ throw new Error("end should have been set during first phase");
50
+ if (e.start > e.end)
51
+ throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);
52
+ if (e.end + 1 <= t * s)
53
+ return [e, void 0];
54
+ const r = t * s - 1, n = t * s;
55
+ return [
56
+ {
57
+ start: e.start,
58
+ end: r,
59
+ label: e.label,
60
+ bits: r - e.start
61
+ },
62
+ {
63
+ start: n,
64
+ end: e.end,
65
+ label: e.label,
66
+ bits: e.end - n
67
+ }
68
+ ];
69
+ }, "getNextFittingBlock"), x = {
70
+ // @ts-expect-error - PacketDB is not assignable to DiagramDB
71
+ parser: { yy: void 0 },
72
+ parse: /* @__PURE__ */ b(async (e) => {
73
+ var r;
74
+ const t = await N("packet", e), s = (r = x.parser) == null ? void 0 : r.yy;
75
+ if (!(s instanceof v))
76
+ throw new Error(
77
+ "parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
78
+ );
79
+ w.debug(t), Y(t, s);
80
+ }, "parse")
81
+ }, I = /* @__PURE__ */ b((e, t, s, r) => {
82
+ const n = r.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = C(t);
83
+ f.attr("viewbox", `0 0 ${k} ${g}`), S(f, g, k, l.useMaxWidth);
84
+ for (const [y, $] of p.entries())
85
+ O(f, $, y, l);
86
+ f.append("text").text(o).attr("x", k / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
87
+ }, "draw"), O = /* @__PURE__ */ b((e, t, s, { rowHeight: r, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
88
+ const c = e.append("g"), p = s * (r + l) + l;
89
+ for (const o of t) {
90
+ const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
91
+ if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", r).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + r / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
92
+ continue;
93
+ const k = o.end === o.start, f = p - 2;
94
+ c.append("text").attr("x", h + (k ? g / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
95
+ }
96
+ }, "drawWord"), j = { draw: I }, q = {
97
+ byteFontSize: "10px",
98
+ startByteColor: "black",
99
+ endByteColor: "black",
100
+ labelColor: "black",
101
+ labelFontSize: "12px",
102
+ titleColor: "black",
103
+ titleFontSize: "14px",
104
+ blockStrokeColor: "black",
105
+ blockStrokeWidth: "1",
106
+ blockFillColor: "#efefef"
107
+ }, G = /* @__PURE__ */ b(({ packet: e } = {}) => {
108
+ const t = m(q, e);
109
+ return `
110
+ .packetByte {
111
+ font-size: ${t.byteFontSize};
112
+ }
113
+ .packetByte.start {
114
+ fill: ${t.startByteColor};
115
+ }
116
+ .packetByte.end {
117
+ fill: ${t.endByteColor};
118
+ }
119
+ .packetLabel {
120
+ fill: ${t.labelColor};
121
+ font-size: ${t.labelFontSize};
122
+ }
123
+ .packetTitle {
124
+ fill: ${t.titleColor};
125
+ font-size: ${t.titleFontSize};
126
+ }
127
+ .packetBlock {
128
+ stroke: ${t.blockStrokeColor};
129
+ stroke-width: ${t.blockStrokeWidth};
130
+ fill: ${t.blockFillColor};
131
+ }
132
+ `;
133
+ }, "styles"), X = {
134
+ parser: x,
135
+ get db() {
136
+ return new v();
137
+ },
138
+ renderer: j,
139
+ styles: G
140
+ };
141
+ export {
142
+ X as diagram
143
+ };
src/backend/gradio_dropdownplus/templates/component/diagram-RP2FKANI-BH5Joxj1.js ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { p as k } from "./chunk-ANTBXLJU-BwgTSljF.js";
2
+ import { _ as l, s as R, g as E, q as F, p as I, a as _, b as D, H as G, y as P, D as f, E as C, F as z, l as H, K as V } from "./mermaid.core-DH6TRyjK.js";
3
+ import { p as W } from "./treemap-75Q7IDZK-o7HSbXc7.js";
4
+ var x = {
5
+ showLegend: !0,
6
+ ticks: 5,
7
+ max: null,
8
+ min: 0,
9
+ graticule: "circle"
10
+ }, w = {
11
+ axes: [],
12
+ curves: [],
13
+ options: x
14
+ }, h = structuredClone(w), B = z.radar, j = /* @__PURE__ */ l(() => f({
15
+ ...B,
16
+ ...C().radar
17
+ }), "getConfig"), b = /* @__PURE__ */ l(() => h.axes, "getAxes"), q = /* @__PURE__ */ l(() => h.curves, "getCurves"), K = /* @__PURE__ */ l(() => h.options, "getOptions"), N = /* @__PURE__ */ l((a) => {
18
+ h.axes = a.map((t) => ({
19
+ name: t.name,
20
+ label: t.label ?? t.name
21
+ }));
22
+ }, "setAxes"), U = /* @__PURE__ */ l((a) => {
23
+ h.curves = a.map((t) => ({
24
+ name: t.name,
25
+ label: t.label ?? t.name,
26
+ entries: X(t.entries)
27
+ }));
28
+ }, "setCurves"), X = /* @__PURE__ */ l((a) => {
29
+ if (a[0].axis == null)
30
+ return a.map((e) => e.value);
31
+ const t = b();
32
+ if (t.length === 0)
33
+ throw new Error("Axes must be populated before curves for reference entries");
34
+ return t.map((e) => {
35
+ const r = a.find((s) => {
36
+ var o;
37
+ return ((o = s.axis) == null ? void 0 : o.$refText) === e.name;
38
+ });
39
+ if (r === void 0)
40
+ throw new Error("Missing entry for axis " + e.label);
41
+ return r.value;
42
+ });
43
+ }, "computeCurveEntries"), Y = /* @__PURE__ */ l((a) => {
44
+ var e, r, s, o, i;
45
+ const t = a.reduce(
46
+ (n, c) => (n[c.name] = c, n),
47
+ {}
48
+ );
49
+ h.options = {
50
+ showLegend: ((e = t.showLegend) == null ? void 0 : e.value) ?? x.showLegend,
51
+ ticks: ((r = t.ticks) == null ? void 0 : r.value) ?? x.ticks,
52
+ max: ((s = t.max) == null ? void 0 : s.value) ?? x.max,
53
+ min: ((o = t.min) == null ? void 0 : o.value) ?? x.min,
54
+ graticule: ((i = t.graticule) == null ? void 0 : i.value) ?? x.graticule
55
+ };
56
+ }, "setOptions"), Z = /* @__PURE__ */ l(() => {
57
+ P(), h = structuredClone(w);
58
+ }, "clear"), $ = {
59
+ getAxes: b,
60
+ getCurves: q,
61
+ getOptions: K,
62
+ setAxes: N,
63
+ setCurves: U,
64
+ setOptions: Y,
65
+ getConfig: j,
66
+ clear: Z,
67
+ setAccTitle: D,
68
+ getAccTitle: _,
69
+ setDiagramTitle: I,
70
+ getDiagramTitle: F,
71
+ getAccDescription: E,
72
+ setAccDescription: R
73
+ }, J = /* @__PURE__ */ l((a) => {
74
+ k(a, $);
75
+ const { axes: t, curves: e, options: r } = a;
76
+ $.setAxes(t), $.setCurves(e), $.setOptions(r);
77
+ }, "populate"), Q = {
78
+ parse: /* @__PURE__ */ l(async (a) => {
79
+ const t = await W("radar", a);
80
+ H.debug(t), J(t);
81
+ }, "parse")
82
+ }, tt = /* @__PURE__ */ l((a, t, e, r) => {
83
+ const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = G(t), u = et(p, c), g = n.max ?? Math.max(...i.map((y) => Math.max(...y.entries))), m = n.min, v = Math.min(c.width, c.height) / 2;
84
+ at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i, m, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
85
+ }, "draw"), et = /* @__PURE__ */ l((a, t) => {
86
+ const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
87
+ x: t.marginLeft + t.width / 2,
88
+ y: t.marginTop + t.height / 2
89
+ };
90
+ return a.attr("viewbox", `0 0 ${e} ${r}`).attr("width", e).attr("height", r), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
91
+ }, "drawFrame"), at = /* @__PURE__ */ l((a, t, e, r, s) => {
92
+ if (s === "circle")
93
+ for (let o = 0; o < r; o++) {
94
+ const i = e * (o + 1) / r;
95
+ a.append("circle").attr("r", i).attr("class", "radarGraticule");
96
+ }
97
+ else if (s === "polygon") {
98
+ const o = t.length;
99
+ for (let i = 0; i < r; i++) {
100
+ const n = e * (i + 1) / r, c = t.map((d, p) => {
101
+ const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
102
+ return `${g},${m}`;
103
+ }).join(" ");
104
+ a.append("polygon").attr("points", c).attr("class", "radarGraticule");
105
+ }
106
+ }
107
+ }, "drawGraticule"), rt = /* @__PURE__ */ l((a, t, e, r) => {
108
+ const s = t.length;
109
+ for (let o = 0; o < s; o++) {
110
+ const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
111
+ a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * Math.cos(n)).attr("y2", e * r.axisScaleFactor * Math.sin(n)).attr("class", "radarAxisLine"), a.append("text").text(i).attr("x", e * r.axisLabelFactor * Math.cos(n)).attr("y", e * r.axisLabelFactor * Math.sin(n)).attr("class", "radarAxisLabel");
112
+ }
113
+ }, "drawAxes");
114
+ function M(a, t, e, r, s, o, i) {
115
+ const n = t.length, c = Math.min(i.width, i.height) / 2;
116
+ e.forEach((d, p) => {
117
+ if (d.entries.length !== n)
118
+ return;
119
+ const u = d.entries.map((g, m) => {
120
+ const v = 2 * Math.PI * m / n - Math.PI / 2, y = A(g, r, s, c), O = y * Math.cos(v), S = y * Math.sin(v);
121
+ return { x: O, y: S };
122
+ });
123
+ o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
124
+ });
125
+ }
126
+ l(M, "drawCurves");
127
+ function A(a, t, e, r) {
128
+ const s = Math.min(Math.max(a, t), e);
129
+ return r * (s - t) / (e - t);
130
+ }
131
+ l(A, "relativeRadius");
132
+ function L(a, t) {
133
+ const e = a.length;
134
+ let r = `M${a[0].x},${a[0].y}`;
135
+ for (let s = 0; s < e; s++) {
136
+ const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
137
+ x: i.x + (n.x - o.x) * t,
138
+ y: i.y + (n.y - o.y) * t
139
+ }, p = {
140
+ x: n.x - (c.x - i.x) * t,
141
+ y: n.y - (c.y - i.y) * t
142
+ };
143
+ r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
144
+ }
145
+ return `${r} Z`;
146
+ }
147
+ l(L, "closedRoundCurve");
148
+ function T(a, t, e, r) {
149
+ if (!e)
150
+ return;
151
+ const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
152
+ t.forEach((n, c) => {
153
+ const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
154
+ d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${c}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
155
+ });
156
+ }
157
+ l(T, "drawLegend");
158
+ var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
159
+ let e = "";
160
+ for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
161
+ const s = a[`cScale${r}`];
162
+ e += `
163
+ .radarCurve-${r} {
164
+ color: ${s};
165
+ fill: ${s};
166
+ fill-opacity: ${t.curveOpacity};
167
+ stroke: ${s};
168
+ stroke-width: ${t.curveStrokeWidth};
169
+ }
170
+ .radarLegendBox-${r} {
171
+ fill: ${s};
172
+ fill-opacity: ${t.curveOpacity};
173
+ stroke: ${s};
174
+ }
175
+ `;
176
+ }
177
+ return e;
178
+ }, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
179
+ const t = V(), e = C(), r = f(t, e.themeVariables), s = f(r.radar, a);
180
+ return { themeVariables: r, radarOptions: s };
181
+ }, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
182
+ const { themeVariables: t, radarOptions: e } = ot(a);
183
+ return `
184
+ .radarTitle {
185
+ font-size: ${t.fontSize};
186
+ color: ${t.titleColor};
187
+ dominant-baseline: hanging;
188
+ text-anchor: middle;
189
+ }
190
+ .radarAxisLine {
191
+ stroke: ${e.axisColor};
192
+ stroke-width: ${e.axisStrokeWidth};
193
+ }
194
+ .radarAxisLabel {
195
+ dominant-baseline: middle;
196
+ text-anchor: middle;
197
+ font-size: ${e.axisLabelFontSize}px;
198
+ color: ${e.axisColor};
199
+ }
200
+ .radarGraticule {
201
+ fill: ${e.graticuleColor};
202
+ fill-opacity: ${e.graticuleOpacity};
203
+ stroke: ${e.graticuleColor};
204
+ stroke-width: ${e.graticuleStrokeWidth};
205
+ }
206
+ .radarLegendText {
207
+ text-anchor: start;
208
+ font-size: ${e.legendFontSize}px;
209
+ dominant-baseline: hanging;
210
+ }
211
+ ${nt(t, e)}
212
+ `;
213
+ }, "styles"), ut = {
214
+ parser: Q,
215
+ db: $,
216
+ renderer: st,
217
+ styles: it
218
+ };
219
+ export {
220
+ ut as diagram
221
+ };
src/backend/gradio_dropdownplus/templates/component/erDiagram-HZWUO2LU-DULMf-mN.js ADDED
@@ -0,0 +1,842 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { g as Dt } from "./chunk-WVR4S24B-Br22bM8P.js";
2
+ import { s as wt } from "./chunk-NRVI72HA-CQ3LV39f.js";
3
+ import { _ as u, b as Vt, a as Lt, s as Mt, g as Bt, p as Ft, q as Yt, c as tt, l as D, y as Pt, x as zt, A as Gt, B as Kt, o as Zt, r as Ut, d as jt, u as Wt } from "./mermaid.core-DH6TRyjK.js";
4
+ import { c as Qt } from "./channel-Ab7oN4Gk.js";
5
+ var dt = function() {
6
+ var s = /* @__PURE__ */ u(function(R, n, a, c) {
7
+ for (a = a || {}, c = R.length; c--; a[R[c]] = n) ;
8
+ return a;
9
+ }, "o"), i = [6, 8, 10, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50], h = [1, 10], d = [1, 11], o = [1, 12], l = [1, 13], f = [1, 20], _ = [1, 21], E = [1, 22], V = [1, 23], Z = [1, 24], S = [1, 19], et = [1, 25], U = [1, 26], T = [1, 18], L = [1, 33], st = [1, 34], it = [1, 35], rt = [1, 36], nt = [1, 37], pt = [6, 8, 10, 13, 15, 17, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50, 63, 64, 65, 66, 67], O = [1, 42], A = [1, 43], M = [1, 52], B = [40, 50, 68, 69], F = [1, 63], Y = [1, 61], N = [1, 58], P = [1, 62], z = [1, 64], j = [6, 8, 10, 13, 17, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 63, 64, 65, 66, 67], yt = [63, 64, 65, 66, 67], ft = [1, 81], _t = [1, 80], gt = [1, 78], bt = [1, 79], mt = [6, 10, 42, 47], v = [6, 10, 13, 41, 42, 47, 48, 49], W = [1, 89], Q = [1, 88], X = [1, 87], G = [19, 56], Et = [1, 98], kt = [1, 97], at = [19, 56, 58, 60], ct = {
10
+ trace: /* @__PURE__ */ u(function() {
11
+ }, "trace"),
12
+ yy: {},
13
+ symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, entityName: 11, relSpec: 12, COLON: 13, role: 14, STYLE_SEPARATOR: 15, idList: 16, BLOCK_START: 17, attributes: 18, BLOCK_STOP: 19, SQS: 20, SQE: 21, title: 22, title_value: 23, acc_title: 24, acc_title_value: 25, acc_descr: 26, acc_descr_value: 27, acc_descr_multiline_value: 28, direction: 29, classDefStatement: 30, classStatement: 31, styleStatement: 32, direction_tb: 33, direction_bt: 34, direction_rl: 35, direction_lr: 36, CLASSDEF: 37, stylesOpt: 38, separator: 39, UNICODE_TEXT: 40, STYLE_TEXT: 41, COMMA: 42, CLASS: 43, STYLE: 44, style: 45, styleComponent: 46, SEMI: 47, NUM: 48, BRKT: 49, ENTITY_NAME: 50, attribute: 51, attributeType: 52, attributeName: 53, attributeKeyTypeList: 54, attributeComment: 55, ATTRIBUTE_WORD: 56, attributeKeyType: 57, ",": 58, ATTRIBUTE_KEY: 59, COMMENT: 60, cardinality: 61, relType: 62, ZERO_OR_ONE: 63, ZERO_OR_MORE: 64, ONE_OR_MORE: 65, ONLY_ONE: 66, MD_PARENT: 67, NON_IDENTIFYING: 68, IDENTIFYING: 69, WORD: 70, $accept: 0, $end: 1 },
14
+ terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: "COLON", 15: "STYLE_SEPARATOR", 17: "BLOCK_START", 19: "BLOCK_STOP", 20: "SQS", 21: "SQE", 22: "title", 23: "title_value", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "direction_tb", 34: "direction_bt", 35: "direction_rl", 36: "direction_lr", 37: "CLASSDEF", 40: "UNICODE_TEXT", 41: "STYLE_TEXT", 42: "COMMA", 43: "CLASS", 44: "STYLE", 47: "SEMI", 48: "NUM", 49: "BRKT", 50: "ENTITY_NAME", 56: "ATTRIBUTE_WORD", 58: ",", 59: "ATTRIBUTE_KEY", 60: "COMMENT", 63: "ZERO_OR_ONE", 64: "ZERO_OR_MORE", 65: "ONE_OR_MORE", 66: "ONLY_ONE", 67: "MD_PARENT", 68: "NON_IDENTIFYING", 69: "IDENTIFYING", 70: "WORD" },
15
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 9], [9, 7], [9, 7], [9, 4], [9, 6], [9, 3], [9, 5], [9, 1], [9, 3], [9, 7], [9, 9], [9, 6], [9, 8], [9, 4], [9, 6], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [29, 1], [29, 1], [29, 1], [29, 1], [30, 4], [16, 1], [16, 1], [16, 3], [16, 3], [31, 3], [32, 4], [38, 1], [38, 3], [45, 1], [45, 2], [39, 1], [39, 1], [39, 1], [46, 1], [46, 1], [46, 1], [46, 1], [11, 1], [11, 1], [18, 1], [18, 2], [51, 2], [51, 3], [51, 3], [51, 4], [52, 1], [53, 1], [54, 1], [54, 3], [57, 1], [55, 1], [12, 3], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [62, 1], [62, 1], [14, 1], [14, 1], [14, 1]],
16
+ performAction: /* @__PURE__ */ u(function(n, a, c, r, p, t, K) {
17
+ var e = t.length - 1;
18
+ switch (p) {
19
+ case 1:
20
+ break;
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ t[e - 1].push(t[e]), this.$ = t[e - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = t[e];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ r.addEntity(t[e - 4]), r.addEntity(t[e - 2]), r.addRelationship(t[e - 4], t[e], t[e - 2], t[e - 3]);
37
+ break;
38
+ case 9:
39
+ r.addEntity(t[e - 8]), r.addEntity(t[e - 4]), r.addRelationship(t[e - 8], t[e], t[e - 4], t[e - 5]), r.setClass([t[e - 8]], t[e - 6]), r.setClass([t[e - 4]], t[e - 2]);
40
+ break;
41
+ case 10:
42
+ r.addEntity(t[e - 6]), r.addEntity(t[e - 2]), r.addRelationship(t[e - 6], t[e], t[e - 2], t[e - 3]), r.setClass([t[e - 6]], t[e - 4]);
43
+ break;
44
+ case 11:
45
+ r.addEntity(t[e - 6]), r.addEntity(t[e - 4]), r.addRelationship(t[e - 6], t[e], t[e - 4], t[e - 5]), r.setClass([t[e - 4]], t[e - 2]);
46
+ break;
47
+ case 12:
48
+ r.addEntity(t[e - 3]), r.addAttributes(t[e - 3], t[e - 1]);
49
+ break;
50
+ case 13:
51
+ r.addEntity(t[e - 5]), r.addAttributes(t[e - 5], t[e - 1]), r.setClass([t[e - 5]], t[e - 3]);
52
+ break;
53
+ case 14:
54
+ r.addEntity(t[e - 2]);
55
+ break;
56
+ case 15:
57
+ r.addEntity(t[e - 4]), r.setClass([t[e - 4]], t[e - 2]);
58
+ break;
59
+ case 16:
60
+ r.addEntity(t[e]);
61
+ break;
62
+ case 17:
63
+ r.addEntity(t[e - 2]), r.setClass([t[e - 2]], t[e]);
64
+ break;
65
+ case 18:
66
+ r.addEntity(t[e - 6], t[e - 4]), r.addAttributes(t[e - 6], t[e - 1]);
67
+ break;
68
+ case 19:
69
+ r.addEntity(t[e - 8], t[e - 6]), r.addAttributes(t[e - 8], t[e - 1]), r.setClass([t[e - 8]], t[e - 3]);
70
+ break;
71
+ case 20:
72
+ r.addEntity(t[e - 5], t[e - 3]);
73
+ break;
74
+ case 21:
75
+ r.addEntity(t[e - 7], t[e - 5]), r.setClass([t[e - 7]], t[e - 2]);
76
+ break;
77
+ case 22:
78
+ r.addEntity(t[e - 3], t[e - 1]);
79
+ break;
80
+ case 23:
81
+ r.addEntity(t[e - 5], t[e - 3]), r.setClass([t[e - 5]], t[e]);
82
+ break;
83
+ case 24:
84
+ case 25:
85
+ this.$ = t[e].trim(), r.setAccTitle(this.$);
86
+ break;
87
+ case 26:
88
+ case 27:
89
+ this.$ = t[e].trim(), r.setAccDescription(this.$);
90
+ break;
91
+ case 32:
92
+ r.setDirection("TB");
93
+ break;
94
+ case 33:
95
+ r.setDirection("BT");
96
+ break;
97
+ case 34:
98
+ r.setDirection("RL");
99
+ break;
100
+ case 35:
101
+ r.setDirection("LR");
102
+ break;
103
+ case 36:
104
+ this.$ = t[e - 3], r.addClass(t[e - 2], t[e - 1]);
105
+ break;
106
+ case 37:
107
+ case 38:
108
+ case 56:
109
+ case 64:
110
+ this.$ = [t[e]];
111
+ break;
112
+ case 39:
113
+ case 40:
114
+ this.$ = t[e - 2].concat([t[e]]);
115
+ break;
116
+ case 41:
117
+ this.$ = t[e - 2], r.setClass(t[e - 1], t[e]);
118
+ break;
119
+ case 42:
120
+ this.$ = t[e - 3], r.addCssStyles(t[e - 2], t[e - 1]);
121
+ break;
122
+ case 43:
123
+ this.$ = [t[e]];
124
+ break;
125
+ case 44:
126
+ t[e - 2].push(t[e]), this.$ = t[e - 2];
127
+ break;
128
+ case 46:
129
+ this.$ = t[e - 1] + t[e];
130
+ break;
131
+ case 54:
132
+ case 76:
133
+ case 77:
134
+ this.$ = t[e].replace(/"/g, "");
135
+ break;
136
+ case 55:
137
+ case 78:
138
+ this.$ = t[e];
139
+ break;
140
+ case 57:
141
+ t[e].push(t[e - 1]), this.$ = t[e];
142
+ break;
143
+ case 58:
144
+ this.$ = { type: t[e - 1], name: t[e] };
145
+ break;
146
+ case 59:
147
+ this.$ = { type: t[e - 2], name: t[e - 1], keys: t[e] };
148
+ break;
149
+ case 60:
150
+ this.$ = { type: t[e - 2], name: t[e - 1], comment: t[e] };
151
+ break;
152
+ case 61:
153
+ this.$ = { type: t[e - 3], name: t[e - 2], keys: t[e - 1], comment: t[e] };
154
+ break;
155
+ case 62:
156
+ case 63:
157
+ case 66:
158
+ this.$ = t[e];
159
+ break;
160
+ case 65:
161
+ t[e - 2].push(t[e]), this.$ = t[e - 2];
162
+ break;
163
+ case 67:
164
+ this.$ = t[e].replace(/"/g, "");
165
+ break;
166
+ case 68:
167
+ this.$ = { cardA: t[e], relType: t[e - 1], cardB: t[e - 2] };
168
+ break;
169
+ case 69:
170
+ this.$ = r.Cardinality.ZERO_OR_ONE;
171
+ break;
172
+ case 70:
173
+ this.$ = r.Cardinality.ZERO_OR_MORE;
174
+ break;
175
+ case 71:
176
+ this.$ = r.Cardinality.ONE_OR_MORE;
177
+ break;
178
+ case 72:
179
+ this.$ = r.Cardinality.ONLY_ONE;
180
+ break;
181
+ case 73:
182
+ this.$ = r.Cardinality.MD_PARENT;
183
+ break;
184
+ case 74:
185
+ this.$ = r.Identification.NON_IDENTIFYING;
186
+ break;
187
+ case 75:
188
+ this.$ = r.Identification.IDENTIFYING;
189
+ break;
190
+ }
191
+ }, "anonymous"),
192
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, s(i, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 22: h, 24: d, 26: o, 28: l, 29: 14, 30: 15, 31: 16, 32: 17, 33: f, 34: _, 35: E, 36: V, 37: Z, 40: S, 43: et, 44: U, 50: T }, s(i, [2, 7], { 1: [2, 1] }), s(i, [2, 3]), { 9: 27, 11: 9, 22: h, 24: d, 26: o, 28: l, 29: 14, 30: 15, 31: 16, 32: 17, 33: f, 34: _, 35: E, 36: V, 37: Z, 40: S, 43: et, 44: U, 50: T }, s(i, [2, 5]), s(i, [2, 6]), s(i, [2, 16], { 12: 28, 61: 32, 15: [1, 29], 17: [1, 30], 20: [1, 31], 63: L, 64: st, 65: it, 66: rt, 67: nt }), { 23: [1, 38] }, { 25: [1, 39] }, { 27: [1, 40] }, s(i, [2, 27]), s(i, [2, 28]), s(i, [2, 29]), s(i, [2, 30]), s(i, [2, 31]), s(pt, [2, 54]), s(pt, [2, 55]), s(i, [2, 32]), s(i, [2, 33]), s(i, [2, 34]), s(i, [2, 35]), { 16: 41, 40: O, 41: A }, { 16: 44, 40: O, 41: A }, { 16: 45, 40: O, 41: A }, s(i, [2, 4]), { 11: 46, 40: S, 50: T }, { 16: 47, 40: O, 41: A }, { 18: 48, 19: [1, 49], 51: 50, 52: 51, 56: M }, { 11: 53, 40: S, 50: T }, { 62: 54, 68: [1, 55], 69: [1, 56] }, s(B, [2, 69]), s(B, [2, 70]), s(B, [2, 71]), s(B, [2, 72]), s(B, [2, 73]), s(i, [2, 24]), s(i, [2, 25]), s(i, [2, 26]), { 13: F, 38: 57, 41: Y, 42: N, 45: 59, 46: 60, 48: P, 49: z }, s(j, [2, 37]), s(j, [2, 38]), { 16: 65, 40: O, 41: A, 42: N }, { 13: F, 38: 66, 41: Y, 42: N, 45: 59, 46: 60, 48: P, 49: z }, { 13: [1, 67], 15: [1, 68] }, s(i, [2, 17], { 61: 32, 12: 69, 17: [1, 70], 42: N, 63: L, 64: st, 65: it, 66: rt, 67: nt }), { 19: [1, 71] }, s(i, [2, 14]), { 18: 72, 19: [2, 56], 51: 50, 52: 51, 56: M }, { 53: 73, 56: [1, 74] }, { 56: [2, 62] }, { 21: [1, 75] }, { 61: 76, 63: L, 64: st, 65: it, 66: rt, 67: nt }, s(yt, [2, 74]), s(yt, [2, 75]), { 6: ft, 10: _t, 39: 77, 42: gt, 47: bt }, { 40: [1, 82], 41: [1, 83] }, s(mt, [2, 43], { 46: 84, 13: F, 41: Y, 48: P, 49: z }), s(v, [2, 45]), s(v, [2, 50]), s(v, [2, 51]), s(v, [2, 52]), s(v, [2, 53]), s(i, [2, 41], { 42: N }), { 6: ft, 10: _t, 39: 85, 42: gt, 47: bt }, { 14: 86, 40: W, 50: Q, 70: X }, { 16: 90, 40: O, 41: A }, { 11: 91, 40: S, 50: T }, { 18: 92, 19: [1, 93], 51: 50, 52: 51, 56: M }, s(i, [2, 12]), { 19: [2, 57] }, s(G, [2, 58], { 54: 94, 55: 95, 57: 96, 59: Et, 60: kt }), s([19, 56, 59, 60], [2, 63]), s(i, [2, 22], { 15: [1, 100], 17: [1, 99] }), s([40, 50], [2, 68]), s(i, [2, 36]), { 13: F, 41: Y, 45: 101, 46: 60, 48: P, 49: z }, s(i, [2, 47]), s(i, [2, 48]), s(i, [2, 49]), s(j, [2, 39]), s(j, [2, 40]), s(v, [2, 46]), s(i, [2, 42]), s(i, [2, 8]), s(i, [2, 76]), s(i, [2, 77]), s(i, [2, 78]), { 13: [1, 102], 42: N }, { 13: [1, 104], 15: [1, 103] }, { 19: [1, 105] }, s(i, [2, 15]), s(G, [2, 59], { 55: 106, 58: [1, 107], 60: kt }), s(G, [2, 60]), s(at, [2, 64]), s(G, [2, 67]), s(at, [2, 66]), { 18: 108, 19: [1, 109], 51: 50, 52: 51, 56: M }, { 16: 110, 40: O, 41: A }, s(mt, [2, 44], { 46: 84, 13: F, 41: Y, 48: P, 49: z }), { 14: 111, 40: W, 50: Q, 70: X }, { 16: 112, 40: O, 41: A }, { 14: 113, 40: W, 50: Q, 70: X }, s(i, [2, 13]), s(G, [2, 61]), { 57: 114, 59: Et }, { 19: [1, 115] }, s(i, [2, 20]), s(i, [2, 23], { 17: [1, 116], 42: N }), s(i, [2, 11]), { 13: [1, 117], 42: N }, s(i, [2, 10]), s(at, [2, 65]), s(i, [2, 18]), { 18: 118, 19: [1, 119], 51: 50, 52: 51, 56: M }, { 14: 120, 40: W, 50: Q, 70: X }, { 19: [1, 121] }, s(i, [2, 21]), s(i, [2, 9]), s(i, [2, 19])],
193
+ defaultActions: { 52: [2, 62], 72: [2, 57] },
194
+ parseError: /* @__PURE__ */ u(function(n, a) {
195
+ if (a.recoverable)
196
+ this.trace(n);
197
+ else {
198
+ var c = new Error(n);
199
+ throw c.hash = a, c;
200
+ }
201
+ }, "parseError"),
202
+ parse: /* @__PURE__ */ u(function(n) {
203
+ var a = this, c = [0], r = [], p = [null], t = [], K = this.table, e = "", H = 0, St = 0, xt = 2, Tt = 1, It = t.slice.call(arguments, 1), y = Object.create(this.lexer), x = { yy: {} };
204
+ for (var lt in this.yy)
205
+ Object.prototype.hasOwnProperty.call(this.yy, lt) && (x.yy[lt] = this.yy[lt]);
206
+ y.setInput(n, x.yy), x.yy.lexer = y, x.yy.parser = this, typeof y.yylloc > "u" && (y.yylloc = {});
207
+ var ot = y.yylloc;
208
+ t.push(ot);
209
+ var vt = y.options && y.options.ranges;
210
+ typeof x.yy.parseError == "function" ? this.parseError = x.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
211
+ function Ct(b) {
212
+ c.length = c.length - 2 * b, p.length = p.length - b, t.length = t.length - b;
213
+ }
214
+ u(Ct, "popStack");
215
+ function Ot() {
216
+ var b;
217
+ return b = r.pop() || y.lex() || Tt, typeof b != "number" && (b instanceof Array && (r = b, b = r.pop()), b = a.symbols_[b] || b), b;
218
+ }
219
+ u(Ot, "lex");
220
+ for (var g, I, m, ht, C = {}, J, k, At, $; ; ) {
221
+ if (I = c[c.length - 1], this.defaultActions[I] ? m = this.defaultActions[I] : ((g === null || typeof g > "u") && (g = Ot()), m = K[I] && K[I][g]), typeof m > "u" || !m.length || !m[0]) {
222
+ var ut = "";
223
+ $ = [];
224
+ for (J in K[I])
225
+ this.terminals_[J] && J > xt && $.push("'" + this.terminals_[J] + "'");
226
+ y.showPosition ? ut = "Parse error on line " + (H + 1) + `:
227
+ ` + y.showPosition() + `
228
+ Expecting ` + $.join(", ") + ", got '" + (this.terminals_[g] || g) + "'" : ut = "Parse error on line " + (H + 1) + ": Unexpected " + (g == Tt ? "end of input" : "'" + (this.terminals_[g] || g) + "'"), this.parseError(ut, {
229
+ text: y.match,
230
+ token: this.terminals_[g] || g,
231
+ line: y.yylineno,
232
+ loc: ot,
233
+ expected: $
234
+ });
235
+ }
236
+ if (m[0] instanceof Array && m.length > 1)
237
+ throw new Error("Parse Error: multiple actions possible at state: " + I + ", token: " + g);
238
+ switch (m[0]) {
239
+ case 1:
240
+ c.push(g), p.push(y.yytext), t.push(y.yylloc), c.push(m[1]), g = null, St = y.yyleng, e = y.yytext, H = y.yylineno, ot = y.yylloc;
241
+ break;
242
+ case 2:
243
+ if (k = this.productions_[m[1]][1], C.$ = p[p.length - k], C._$ = {
244
+ first_line: t[t.length - (k || 1)].first_line,
245
+ last_line: t[t.length - 1].last_line,
246
+ first_column: t[t.length - (k || 1)].first_column,
247
+ last_column: t[t.length - 1].last_column
248
+ }, vt && (C._$.range = [
249
+ t[t.length - (k || 1)].range[0],
250
+ t[t.length - 1].range[1]
251
+ ]), ht = this.performAction.apply(C, [
252
+ e,
253
+ St,
254
+ H,
255
+ x.yy,
256
+ m[1],
257
+ p,
258
+ t
259
+ ].concat(It)), typeof ht < "u")
260
+ return ht;
261
+ k && (c = c.slice(0, -1 * k * 2), p = p.slice(0, -1 * k), t = t.slice(0, -1 * k)), c.push(this.productions_[m[1]][0]), p.push(C.$), t.push(C._$), At = K[c[c.length - 2]][c[c.length - 1]], c.push(At);
262
+ break;
263
+ case 3:
264
+ return !0;
265
+ }
266
+ }
267
+ return !0;
268
+ }, "parse")
269
+ }, Rt = /* @__PURE__ */ function() {
270
+ var R = {
271
+ EOF: 1,
272
+ parseError: /* @__PURE__ */ u(function(a, c) {
273
+ if (this.yy.parser)
274
+ this.yy.parser.parseError(a, c);
275
+ else
276
+ throw new Error(a);
277
+ }, "parseError"),
278
+ // resets the lexer, sets new input
279
+ setInput: /* @__PURE__ */ u(function(n, a) {
280
+ return this.yy = a || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
281
+ first_line: 1,
282
+ first_column: 0,
283
+ last_line: 1,
284
+ last_column: 0
285
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
286
+ }, "setInput"),
287
+ // consumes and returns one char from the input
288
+ input: /* @__PURE__ */ u(function() {
289
+ var n = this._input[0];
290
+ this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n;
291
+ var a = n.match(/(?:\r\n?|\n).*/g);
292
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n;
293
+ }, "input"),
294
+ // unshifts one char (or a string) into the input
295
+ unput: /* @__PURE__ */ u(function(n) {
296
+ var a = n.length, c = n.split(/(?:\r\n?|\n)/g);
297
+ this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
298
+ var r = this.match.split(/(?:\r\n?|\n)/g);
299
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
300
+ var p = this.yylloc.range;
301
+ return this.yylloc = {
302
+ first_line: this.yylloc.first_line,
303
+ last_line: this.yylineno + 1,
304
+ first_column: this.yylloc.first_column,
305
+ last_column: c ? (c.length === r.length ? this.yylloc.first_column : 0) + r[r.length - c.length].length - c[0].length : this.yylloc.first_column - a
306
+ }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
307
+ }, "unput"),
308
+ // When called from action, caches matched text and appends it on next action
309
+ more: /* @__PURE__ */ u(function() {
310
+ return this._more = !0, this;
311
+ }, "more"),
312
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
313
+ reject: /* @__PURE__ */ u(function() {
314
+ if (this.options.backtrack_lexer)
315
+ this._backtrack = !0;
316
+ else
317
+ return 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).
318
+ ` + this.showPosition(), {
319
+ text: "",
320
+ token: null,
321
+ line: this.yylineno
322
+ });
323
+ return this;
324
+ }, "reject"),
325
+ // retain first n characters of the match
326
+ less: /* @__PURE__ */ u(function(n) {
327
+ this.unput(this.match.slice(n));
328
+ }, "less"),
329
+ // displays already matched input, i.e. for error messages
330
+ pastInput: /* @__PURE__ */ u(function() {
331
+ var n = this.matched.substr(0, this.matched.length - this.match.length);
332
+ return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
333
+ }, "pastInput"),
334
+ // displays upcoming input, i.e. for error messages
335
+ upcomingInput: /* @__PURE__ */ u(function() {
336
+ var n = this.match;
337
+ return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
338
+ }, "upcomingInput"),
339
+ // displays the character position where the lexing error occurred, i.e. for error messages
340
+ showPosition: /* @__PURE__ */ u(function() {
341
+ var n = this.pastInput(), a = new Array(n.length + 1).join("-");
342
+ return n + this.upcomingInput() + `
343
+ ` + a + "^";
344
+ }, "showPosition"),
345
+ // test the lexed token: return FALSE when not a match, otherwise return token
346
+ test_match: /* @__PURE__ */ u(function(n, a) {
347
+ var c, r, p;
348
+ if (this.options.backtrack_lexer && (p = {
349
+ yylineno: this.yylineno,
350
+ yylloc: {
351
+ first_line: this.yylloc.first_line,
352
+ last_line: this.last_line,
353
+ first_column: this.yylloc.first_column,
354
+ last_column: this.yylloc.last_column
355
+ },
356
+ yytext: this.yytext,
357
+ match: this.match,
358
+ matches: this.matches,
359
+ matched: this.matched,
360
+ yyleng: this.yyleng,
361
+ offset: this.offset,
362
+ _more: this._more,
363
+ _input: this._input,
364
+ yy: this.yy,
365
+ conditionStack: this.conditionStack.slice(0),
366
+ done: this.done
367
+ }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), r = n[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
368
+ first_line: this.yylloc.last_line,
369
+ last_line: this.yylineno + 1,
370
+ first_column: this.yylloc.last_column,
371
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
372
+ }, this.yytext += n[0], this.match += n[0], this.matches = n, 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(n[0].length), this.matched += n[0], c = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
373
+ return c;
374
+ if (this._backtrack) {
375
+ for (var t in p)
376
+ this[t] = p[t];
377
+ return !1;
378
+ }
379
+ return !1;
380
+ }, "test_match"),
381
+ // return next match in input
382
+ next: /* @__PURE__ */ u(function() {
383
+ if (this.done)
384
+ return this.EOF;
385
+ this._input || (this.done = !0);
386
+ var n, a, c, r;
387
+ this._more || (this.yytext = "", this.match = "");
388
+ for (var p = this._currentRules(), t = 0; t < p.length; t++)
389
+ if (c = this._input.match(this.rules[p[t]]), c && (!a || c[0].length > a[0].length)) {
390
+ if (a = c, r = t, this.options.backtrack_lexer) {
391
+ if (n = this.test_match(c, p[t]), n !== !1)
392
+ return n;
393
+ if (this._backtrack) {
394
+ a = !1;
395
+ continue;
396
+ } else
397
+ return !1;
398
+ } else if (!this.options.flex)
399
+ break;
400
+ }
401
+ return a ? (n = this.test_match(a, p[r]), n !== !1 ? n : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
402
+ ` + this.showPosition(), {
403
+ text: "",
404
+ token: null,
405
+ line: this.yylineno
406
+ });
407
+ }, "next"),
408
+ // return next match that has a token
409
+ lex: /* @__PURE__ */ u(function() {
410
+ var a = this.next();
411
+ return a || this.lex();
412
+ }, "lex"),
413
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
414
+ begin: /* @__PURE__ */ u(function(a) {
415
+ this.conditionStack.push(a);
416
+ }, "begin"),
417
+ // pop the previously active lexer condition state off the condition stack
418
+ popState: /* @__PURE__ */ u(function() {
419
+ var a = this.conditionStack.length - 1;
420
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
421
+ }, "popState"),
422
+ // produce the lexer rule set which is active for the currently active lexer condition state
423
+ _currentRules: /* @__PURE__ */ u(function() {
424
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
425
+ }, "_currentRules"),
426
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
427
+ topState: /* @__PURE__ */ u(function(a) {
428
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
429
+ }, "topState"),
430
+ // alias for begin(condition)
431
+ pushState: /* @__PURE__ */ u(function(a) {
432
+ this.begin(a);
433
+ }, "pushState"),
434
+ // return the number of states currently on the stack
435
+ stateStackSize: /* @__PURE__ */ u(function() {
436
+ return this.conditionStack.length;
437
+ }, "stateStackSize"),
438
+ options: { "case-insensitive": !0 },
439
+ performAction: /* @__PURE__ */ u(function(a, c, r, p) {
440
+ switch (r) {
441
+ case 0:
442
+ return this.begin("acc_title"), 24;
443
+ case 1:
444
+ return this.popState(), "acc_title_value";
445
+ case 2:
446
+ return this.begin("acc_descr"), 26;
447
+ case 3:
448
+ return this.popState(), "acc_descr_value";
449
+ case 4:
450
+ this.begin("acc_descr_multiline");
451
+ break;
452
+ case 5:
453
+ this.popState();
454
+ break;
455
+ case 6:
456
+ return "acc_descr_multiline_value";
457
+ case 7:
458
+ return 33;
459
+ case 8:
460
+ return 34;
461
+ case 9:
462
+ return 35;
463
+ case 10:
464
+ return 36;
465
+ case 11:
466
+ return 10;
467
+ case 12:
468
+ break;
469
+ case 13:
470
+ return 8;
471
+ case 14:
472
+ return 50;
473
+ case 15:
474
+ return 70;
475
+ case 16:
476
+ return 4;
477
+ case 17:
478
+ return this.begin("block"), 17;
479
+ case 18:
480
+ return 49;
481
+ case 19:
482
+ return 49;
483
+ case 20:
484
+ return 42;
485
+ case 21:
486
+ return 15;
487
+ case 22:
488
+ return 13;
489
+ case 23:
490
+ break;
491
+ case 24:
492
+ return 59;
493
+ case 25:
494
+ return 56;
495
+ case 26:
496
+ return 56;
497
+ case 27:
498
+ return 60;
499
+ case 28:
500
+ break;
501
+ case 29:
502
+ return this.popState(), 19;
503
+ case 30:
504
+ return c.yytext[0];
505
+ case 31:
506
+ return 20;
507
+ case 32:
508
+ return 21;
509
+ case 33:
510
+ return this.begin("style"), 44;
511
+ case 34:
512
+ return this.popState(), 10;
513
+ case 35:
514
+ break;
515
+ case 36:
516
+ return 13;
517
+ case 37:
518
+ return 42;
519
+ case 38:
520
+ return 49;
521
+ case 39:
522
+ return this.begin("style"), 37;
523
+ case 40:
524
+ return 43;
525
+ case 41:
526
+ return 63;
527
+ case 42:
528
+ return 65;
529
+ case 43:
530
+ return 65;
531
+ case 44:
532
+ return 65;
533
+ case 45:
534
+ return 63;
535
+ case 46:
536
+ return 63;
537
+ case 47:
538
+ return 64;
539
+ case 48:
540
+ return 64;
541
+ case 49:
542
+ return 64;
543
+ case 50:
544
+ return 64;
545
+ case 51:
546
+ return 64;
547
+ case 52:
548
+ return 65;
549
+ case 53:
550
+ return 64;
551
+ case 54:
552
+ return 65;
553
+ case 55:
554
+ return 66;
555
+ case 56:
556
+ return 66;
557
+ case 57:
558
+ return 66;
559
+ case 58:
560
+ return 66;
561
+ case 59:
562
+ return 63;
563
+ case 60:
564
+ return 64;
565
+ case 61:
566
+ return 65;
567
+ case 62:
568
+ return 67;
569
+ case 63:
570
+ return 68;
571
+ case 64:
572
+ return 69;
573
+ case 65:
574
+ return 69;
575
+ case 66:
576
+ return 68;
577
+ case 67:
578
+ return 68;
579
+ case 68:
580
+ return 68;
581
+ case 69:
582
+ return 41;
583
+ case 70:
584
+ return 47;
585
+ case 71:
586
+ return 40;
587
+ case 72:
588
+ return 48;
589
+ case 73:
590
+ return c.yytext[0];
591
+ case 74:
592
+ return 6;
593
+ }
594
+ }, "anonymous"),
595
+ rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:#)/i, /^(?:#)/i, /^(?:,)/i, /^(?::::)/i, /^(?::)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:([^\s]*)[~].*[~]([^\s]*))/i, /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:style\b)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?::)/i, /^(?:,)/i, /^(?:#)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:;)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:[0-9])/i, /^(?:.)/i, /^(?:$)/i],
596
+ conditions: { style: { rules: [34, 35, 36, 37, 38, 69, 70], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block: { rules: [23, 24, 25, 26, 27, 28, 29, 30], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 31, 32, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74], inclusive: !0 } }
597
+ };
598
+ return R;
599
+ }();
600
+ ct.lexer = Rt;
601
+ function q() {
602
+ this.yy = {};
603
+ }
604
+ return u(q, "Parser"), q.prototype = ct, ct.Parser = q, new q();
605
+ }();
606
+ dt.parser = dt;
607
+ var Xt = dt, w, qt = (w = class {
608
+ constructor() {
609
+ this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.Cardinality = {
610
+ ZERO_OR_ONE: "ZERO_OR_ONE",
611
+ ZERO_OR_MORE: "ZERO_OR_MORE",
612
+ ONE_OR_MORE: "ONE_OR_MORE",
613
+ ONLY_ONE: "ONLY_ONE",
614
+ MD_PARENT: "MD_PARENT"
615
+ }, this.Identification = {
616
+ NON_IDENTIFYING: "NON_IDENTIFYING",
617
+ IDENTIFYING: "IDENTIFYING"
618
+ }, this.setAccTitle = Vt, this.getAccTitle = Lt, this.setAccDescription = Mt, this.getAccDescription = Bt, this.setDiagramTitle = Ft, this.getDiagramTitle = Yt, this.getConfig = /* @__PURE__ */ u(() => tt().er, "getConfig"), this.clear(), this.addEntity = this.addEntity.bind(this), this.addAttributes = this.addAttributes.bind(this), this.addRelationship = this.addRelationship.bind(this), this.setDirection = this.setDirection.bind(this), this.addCssStyles = this.addCssStyles.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.setAccTitle = this.setAccTitle.bind(this), this.setAccDescription = this.setAccDescription.bind(this);
619
+ }
620
+ /**
621
+ * Add entity
622
+ * @param name - The name of the entity
623
+ * @param alias - The alias of the entity
624
+ */
625
+ addEntity(i, h = "") {
626
+ var d;
627
+ return this.entities.has(i) ? !((d = this.entities.get(i)) != null && d.alias) && h && (this.entities.get(i).alias = h, D.info(`Add alias '${h}' to entity '${i}'`)) : (this.entities.set(i, {
628
+ id: `entity-${i}-${this.entities.size}`,
629
+ label: i,
630
+ attributes: [],
631
+ alias: h,
632
+ shape: "erBox",
633
+ look: tt().look ?? "default",
634
+ cssClasses: "default",
635
+ cssStyles: []
636
+ }), D.info("Added new entity :", i)), this.entities.get(i);
637
+ }
638
+ getEntity(i) {
639
+ return this.entities.get(i);
640
+ }
641
+ getEntities() {
642
+ return this.entities;
643
+ }
644
+ getClasses() {
645
+ return this.classes;
646
+ }
647
+ addAttributes(i, h) {
648
+ const d = this.addEntity(i);
649
+ let o;
650
+ for (o = h.length - 1; o >= 0; o--)
651
+ h[o].keys || (h[o].keys = []), h[o].comment || (h[o].comment = ""), d.attributes.push(h[o]), D.debug("Added attribute ", h[o].name);
652
+ }
653
+ /**
654
+ * Add a relationship
655
+ *
656
+ * @param entA - The first entity in the relationship
657
+ * @param rolA - The role played by the first entity in relation to the second
658
+ * @param entB - The second entity in the relationship
659
+ * @param rSpec - The details of the relationship between the two entities
660
+ */
661
+ addRelationship(i, h, d, o) {
662
+ const l = this.entities.get(i), f = this.entities.get(d);
663
+ if (!l || !f)
664
+ return;
665
+ const _ = {
666
+ entityA: l.id,
667
+ roleA: h,
668
+ entityB: f.id,
669
+ relSpec: o
670
+ };
671
+ this.relationships.push(_), D.debug("Added new relationship :", _);
672
+ }
673
+ getRelationships() {
674
+ return this.relationships;
675
+ }
676
+ getDirection() {
677
+ return this.direction;
678
+ }
679
+ setDirection(i) {
680
+ this.direction = i;
681
+ }
682
+ getCompiledStyles(i) {
683
+ let h = [];
684
+ for (const d of i) {
685
+ const o = this.classes.get(d);
686
+ o != null && o.styles && (h = [...h, ...o.styles ?? []].map((l) => l.trim())), o != null && o.textStyles && (h = [...h, ...o.textStyles ?? []].map((l) => l.trim()));
687
+ }
688
+ return h;
689
+ }
690
+ addCssStyles(i, h) {
691
+ for (const d of i) {
692
+ const o = this.entities.get(d);
693
+ if (!h || !o)
694
+ return;
695
+ for (const l of h)
696
+ o.cssStyles.push(l);
697
+ }
698
+ }
699
+ addClass(i, h) {
700
+ i.forEach((d) => {
701
+ let o = this.classes.get(d);
702
+ o === void 0 && (o = { id: d, styles: [], textStyles: [] }, this.classes.set(d, o)), h && h.forEach(function(l) {
703
+ if (/color/.exec(l)) {
704
+ const f = l.replace("fill", "bgFill");
705
+ o.textStyles.push(f);
706
+ }
707
+ o.styles.push(l);
708
+ });
709
+ });
710
+ }
711
+ setClass(i, h) {
712
+ for (const d of i) {
713
+ const o = this.entities.get(d);
714
+ if (o)
715
+ for (const l of h)
716
+ o.cssClasses += " " + l;
717
+ }
718
+ }
719
+ clear() {
720
+ this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], Pt();
721
+ }
722
+ getData() {
723
+ const i = [], h = [], d = tt();
724
+ for (const l of this.entities.keys()) {
725
+ const f = this.entities.get(l);
726
+ f && (f.cssCompiledStyles = this.getCompiledStyles(f.cssClasses.split(" ")), i.push(f));
727
+ }
728
+ let o = 0;
729
+ for (const l of this.relationships) {
730
+ const f = {
731
+ id: zt(l.entityA, l.entityB, {
732
+ prefix: "id",
733
+ counter: o++
734
+ }),
735
+ type: "normal",
736
+ curve: "basis",
737
+ start: l.entityA,
738
+ end: l.entityB,
739
+ label: l.roleA,
740
+ labelpos: "c",
741
+ thickness: "normal",
742
+ classes: "relationshipLine",
743
+ arrowTypeStart: l.relSpec.cardB.toLowerCase(),
744
+ arrowTypeEnd: l.relSpec.cardA.toLowerCase(),
745
+ pattern: l.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
746
+ look: d.look
747
+ };
748
+ h.push(f);
749
+ }
750
+ return { nodes: i, edges: h, other: {}, config: d, direction: "TB" };
751
+ }
752
+ }, u(w, "ErDB"), w), Nt = {};
753
+ Kt(Nt, {
754
+ draw: () => Ht
755
+ });
756
+ var Ht = /* @__PURE__ */ u(async function(s, i, h, d) {
757
+ D.info("REF0:"), D.info("Drawing er diagram (unified)", i);
758
+ const { securityLevel: o, er: l, layout: f } = tt(), _ = d.db.getData(), E = Dt(i, o);
759
+ _.type = d.type, _.layoutAlgorithm = Zt(f), _.config.flowchart.nodeSpacing = (l == null ? void 0 : l.nodeSpacing) || 140, _.config.flowchart.rankSpacing = (l == null ? void 0 : l.rankSpacing) || 80, _.direction = d.db.getDirection(), _.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"], _.diagramId = i, await Ut(_, E), _.layoutAlgorithm === "elk" && E.select(".edges").lower();
760
+ const V = E.selectAll('[id*="-background"]');
761
+ Array.from(V).length > 0 && V.each(function() {
762
+ const S = jt(this), U = S.attr("id").replace("-background", ""), T = E.select(`#${CSS.escape(U)}`);
763
+ if (!T.empty()) {
764
+ const L = T.attr("transform");
765
+ S.attr("transform", L);
766
+ }
767
+ });
768
+ const Z = 8;
769
+ Wt.insertTitle(
770
+ E,
771
+ "erDiagramTitleText",
772
+ (l == null ? void 0 : l.titleTopMargin) ?? 25,
773
+ d.db.getDiagramTitle()
774
+ ), wt(E, Z, "erDiagram", (l == null ? void 0 : l.useMaxWidth) ?? !0);
775
+ }, "draw"), Jt = /* @__PURE__ */ u((s, i) => {
776
+ const h = Qt, d = h(s, "r"), o = h(s, "g"), l = h(s, "b");
777
+ return Gt(d, o, l, i);
778
+ }, "fade"), $t = /* @__PURE__ */ u((s) => `
779
+ .entityBox {
780
+ fill: ${s.mainBkg};
781
+ stroke: ${s.nodeBorder};
782
+ }
783
+
784
+ .relationshipLabelBox {
785
+ fill: ${s.tertiaryColor};
786
+ opacity: 0.7;
787
+ background-color: ${s.tertiaryColor};
788
+ rect {
789
+ opacity: 0.5;
790
+ }
791
+ }
792
+
793
+ .labelBkg {
794
+ background-color: ${Jt(s.tertiaryColor, 0.5)};
795
+ }
796
+
797
+ .edgeLabel .label {
798
+ fill: ${s.nodeBorder};
799
+ font-size: 14px;
800
+ }
801
+
802
+ .label {
803
+ font-family: ${s.fontFamily};
804
+ color: ${s.nodeTextColor || s.textColor};
805
+ }
806
+
807
+ .edge-pattern-dashed {
808
+ stroke-dasharray: 8,8;
809
+ }
810
+
811
+ .node rect,
812
+ .node circle,
813
+ .node ellipse,
814
+ .node polygon
815
+ {
816
+ fill: ${s.mainBkg};
817
+ stroke: ${s.nodeBorder};
818
+ stroke-width: 1px;
819
+ }
820
+
821
+ .relationshipLine {
822
+ stroke: ${s.lineColor};
823
+ stroke-width: 1;
824
+ fill: none;
825
+ }
826
+
827
+ .marker {
828
+ fill: none !important;
829
+ stroke: ${s.lineColor} !important;
830
+ stroke-width: 1;
831
+ }
832
+ `, "getStyles"), te = $t, ne = {
833
+ parser: Xt,
834
+ get db() {
835
+ return new qt();
836
+ },
837
+ renderer: Nt,
838
+ styles: te
839
+ };
840
+ export {
841
+ ne as diagram
842
+ };
src/backend/gradio_dropdownplus/templates/component/flowDiagram-THRYKUMA-C17Ahd-H.js ADDED
@@ -0,0 +1,1627 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { g as qt } from "./chunk-GLLZNHP4-DAmLcc0i.js";
2
+ import { _ as m, n as Ot, l as t1, c as b1, d as S1, o as Ht, r as Xt, u as it, b as Qt, s as Jt, p as Zt, a as $t, g as te, q as ee, k as se, t as ie, J as re, v as ae, x as st, y as ne, z as ue, A as oe } from "./mermaid.core-DH6TRyjK.js";
3
+ import { g as le } from "./chunk-WVR4S24B-Br22bM8P.js";
4
+ import { s as ce } from "./chunk-NRVI72HA-CQ3LV39f.js";
5
+ import { c as he } from "./channel-Ab7oN4Gk.js";
6
+ var de = "flowchart-", P1, pe = (P1 = class {
7
+ // cspell:ignore funs
8
+ constructor() {
9
+ this.vertexCounter = 0, this.config = b1(), this.vertices = /* @__PURE__ */ new Map(), this.edges = [], this.classes = /* @__PURE__ */ new Map(), this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.tooltips = /* @__PURE__ */ new Map(), this.subCount = 0, this.firstGraphFlag = !0, this.secCount = -1, this.posCrossRef = [], this.funs = [], this.setAccTitle = Qt, this.setAccDescription = Jt, this.setDiagramTitle = Zt, this.getAccTitle = $t, this.getAccDescription = te, this.getDiagramTitle = ee, this.funs.push(this.setupToolTips.bind(this)), this.addVertex = this.addVertex.bind(this), this.firstGraph = this.firstGraph.bind(this), this.setDirection = this.setDirection.bind(this), this.addSubGraph = this.addSubGraph.bind(this), this.addLink = this.addLink.bind(this), this.setLink = this.setLink.bind(this), this.updateLink = this.updateLink.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.destructLink = this.destructLink.bind(this), this.setClickEvent = this.setClickEvent.bind(this), this.setTooltip = this.setTooltip.bind(this), this.updateLinkInterpolate = this.updateLinkInterpolate.bind(this), this.setClickFun = this.setClickFun.bind(this), this.bindFunctions = this.bindFunctions.bind(this), this.lex = {
10
+ firstGraph: this.firstGraph.bind(this)
11
+ }, this.clear(), this.setGen("gen-2");
12
+ }
13
+ sanitizeText(i) {
14
+ return se.sanitizeText(i, this.config);
15
+ }
16
+ /**
17
+ * Function to lookup domId from id in the graph definition.
18
+ *
19
+ * @param id - id of the node
20
+ */
21
+ lookUpDomId(i) {
22
+ for (const a of this.vertices.values())
23
+ if (a.id === i)
24
+ return a.domId;
25
+ return i;
26
+ }
27
+ /**
28
+ * Function called by parser when a node definition has been found
29
+ */
30
+ addVertex(i, a, n, u, o, f, c = {}, A) {
31
+ var L, C;
32
+ if (!i || i.trim().length === 0)
33
+ return;
34
+ let r;
35
+ if (A !== void 0) {
36
+ let d;
37
+ A.includes(`
38
+ `) ? d = A + `
39
+ ` : d = `{
40
+ ` + A + `
41
+ }`, r = ie(d, { schema: re });
42
+ }
43
+ const k = this.edges.find((d) => d.id === i);
44
+ if (k) {
45
+ const d = r;
46
+ (d == null ? void 0 : d.animate) !== void 0 && (k.animate = d.animate), (d == null ? void 0 : d.animation) !== void 0 && (k.animation = d.animation), (d == null ? void 0 : d.curve) !== void 0 && (k.interpolate = d.curve);
47
+ return;
48
+ }
49
+ let E, b = this.vertices.get(i);
50
+ if (b === void 0 && (b = {
51
+ id: i,
52
+ labelType: "text",
53
+ domId: de + i + "-" + this.vertexCounter,
54
+ styles: [],
55
+ classes: []
56
+ }, this.vertices.set(i, b)), this.vertexCounter++, a !== void 0 ? (this.config = b1(), E = this.sanitizeText(a.text.trim()), b.labelType = a.type, E.startsWith('"') && E.endsWith('"') && (E = E.substring(1, E.length - 1)), b.text = E) : b.text === void 0 && (b.text = i), n !== void 0 && (b.type = n), u != null && u.forEach((d) => {
57
+ b.styles.push(d);
58
+ }), o != null && o.forEach((d) => {
59
+ b.classes.push(d);
60
+ }), f !== void 0 && (b.dir = f), b.props === void 0 ? b.props = c : c !== void 0 && Object.assign(b.props, c), r !== void 0) {
61
+ if (r.shape) {
62
+ if (r.shape !== r.shape.toLowerCase() || r.shape.includes("_"))
63
+ throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);
64
+ if (!ae(r.shape))
65
+ throw new Error(`No such shape: ${r.shape}.`);
66
+ b.type = r == null ? void 0 : r.shape;
67
+ }
68
+ r != null && r.label && (b.text = r == null ? void 0 : r.label), r != null && r.icon && (b.icon = r == null ? void 0 : r.icon, !((L = r.label) != null && L.trim()) && b.text === i && (b.text = "")), r != null && r.form && (b.form = r == null ? void 0 : r.form), r != null && r.pos && (b.pos = r == null ? void 0 : r.pos), r != null && r.img && (b.img = r == null ? void 0 : r.img, !((C = r.label) != null && C.trim()) && b.text === i && (b.text = "")), r != null && r.constraint && (b.constraint = r.constraint), r.w && (b.assetWidth = Number(r.w)), r.h && (b.assetHeight = Number(r.h));
69
+ }
70
+ }
71
+ /**
72
+ * Function called by parser when a link/edge definition has been found
73
+ *
74
+ */
75
+ addSingleLink(i, a, n, u) {
76
+ const c = {
77
+ start: i,
78
+ end: a,
79
+ type: void 0,
80
+ text: "",
81
+ labelType: "text",
82
+ classes: [],
83
+ isUserDefinedId: !1,
84
+ interpolate: this.edges.defaultInterpolate
85
+ };
86
+ t1.info("abc78 Got edge...", c);
87
+ const A = n.text;
88
+ if (A !== void 0 && (c.text = this.sanitizeText(A.text.trim()), c.text.startsWith('"') && c.text.endsWith('"') && (c.text = c.text.substring(1, c.text.length - 1)), c.labelType = A.type), n !== void 0 && (c.type = n.type, c.stroke = n.stroke, c.length = n.length > 10 ? 10 : n.length), u && !this.edges.some((r) => r.id === u))
89
+ c.id = u, c.isUserDefinedId = !0;
90
+ else {
91
+ const r = this.edges.filter((k) => k.start === c.start && k.end === c.end);
92
+ r.length === 0 ? c.id = st(c.start, c.end, { counter: 0, prefix: "L" }) : c.id = st(c.start, c.end, {
93
+ counter: r.length + 1,
94
+ prefix: "L"
95
+ });
96
+ }
97
+ if (this.edges.length < (this.config.maxEdges ?? 500))
98
+ t1.info("Pushing edge..."), this.edges.push(c);
99
+ else
100
+ throw new Error(
101
+ `Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
102
+
103
+ Initialize mermaid with maxEdges set to a higher number to allow more edges.
104
+ You cannot set this config via configuration inside the diagram as it is a secure config.
105
+ You have to call mermaid.initialize.`
106
+ );
107
+ }
108
+ isLinkData(i) {
109
+ return i !== null && typeof i == "object" && "id" in i && typeof i.id == "string";
110
+ }
111
+ addLink(i, a, n) {
112
+ const u = this.isLinkData(n) ? n.id.replace("@", "") : void 0;
113
+ t1.info("addLink", i, a, u);
114
+ for (const o of i)
115
+ for (const f of a) {
116
+ const c = o === i[i.length - 1], A = f === a[0];
117
+ c && A ? this.addSingleLink(o, f, n, u) : this.addSingleLink(o, f, n, void 0);
118
+ }
119
+ }
120
+ /**
121
+ * Updates a link's line interpolation algorithm
122
+ */
123
+ updateLinkInterpolate(i, a) {
124
+ i.forEach((n) => {
125
+ n === "default" ? this.edges.defaultInterpolate = a : this.edges[n].interpolate = a;
126
+ });
127
+ }
128
+ /**
129
+ * Updates a link with a style
130
+ *
131
+ */
132
+ updateLink(i, a) {
133
+ i.forEach((n) => {
134
+ var u, o, f, c, A, r;
135
+ if (typeof n == "number" && n >= this.edges.length)
136
+ throw new Error(
137
+ `The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)`
138
+ );
139
+ n === "default" ? this.edges.defaultStyle = a : (this.edges[n].style = a, (((o = (u = this.edges[n]) == null ? void 0 : u.style) == null ? void 0 : o.length) ?? 0) > 0 && !((c = (f = this.edges[n]) == null ? void 0 : f.style) != null && c.some((k) => k == null ? void 0 : k.startsWith("fill"))) && ((r = (A = this.edges[n]) == null ? void 0 : A.style) == null || r.push("fill:none")));
140
+ });
141
+ }
142
+ addClass(i, a) {
143
+ const n = a.join().replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
144
+ i.split(",").forEach((u) => {
145
+ let o = this.classes.get(u);
146
+ o === void 0 && (o = { id: u, styles: [], textStyles: [] }, this.classes.set(u, o)), n != null && n.forEach((f) => {
147
+ if (/color/.exec(f)) {
148
+ const c = f.replace("fill", "bgFill");
149
+ o.textStyles.push(c);
150
+ }
151
+ o.styles.push(f);
152
+ });
153
+ });
154
+ }
155
+ /**
156
+ * Called by parser when a graph definition is found, stores the direction of the chart.
157
+ *
158
+ */
159
+ setDirection(i) {
160
+ this.direction = i.trim(), /.*</.exec(this.direction) && (this.direction = "RL"), /.*\^/.exec(this.direction) && (this.direction = "BT"), /.*>/.exec(this.direction) && (this.direction = "LR"), /.*v/.exec(this.direction) && (this.direction = "TB"), this.direction === "TD" && (this.direction = "TB");
161
+ }
162
+ /**
163
+ * Called by parser when a special node is found, e.g. a clickable element.
164
+ *
165
+ * @param ids - Comma separated list of ids
166
+ * @param className - Class to add
167
+ */
168
+ setClass(i, a) {
169
+ for (const n of i.split(",")) {
170
+ const u = this.vertices.get(n);
171
+ u && u.classes.push(a);
172
+ const o = this.edges.find((c) => c.id === n);
173
+ o && o.classes.push(a);
174
+ const f = this.subGraphLookup.get(n);
175
+ f && f.classes.push(a);
176
+ }
177
+ }
178
+ setTooltip(i, a) {
179
+ if (a !== void 0) {
180
+ a = this.sanitizeText(a);
181
+ for (const n of i.split(","))
182
+ this.tooltips.set(this.version === "gen-1" ? this.lookUpDomId(n) : n, a);
183
+ }
184
+ }
185
+ setClickFun(i, a, n) {
186
+ const u = this.lookUpDomId(i);
187
+ if (b1().securityLevel !== "loose" || a === void 0)
188
+ return;
189
+ let o = [];
190
+ if (typeof n == "string") {
191
+ o = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
192
+ for (let c = 0; c < o.length; c++) {
193
+ let A = o[c].trim();
194
+ A.startsWith('"') && A.endsWith('"') && (A = A.substr(1, A.length - 2)), o[c] = A;
195
+ }
196
+ }
197
+ o.length === 0 && o.push(i);
198
+ const f = this.vertices.get(i);
199
+ f && (f.haveCallback = !0, this.funs.push(() => {
200
+ const c = document.querySelector(`[id="${u}"]`);
201
+ c !== null && c.addEventListener(
202
+ "click",
203
+ () => {
204
+ it.runFunc(a, ...o);
205
+ },
206
+ !1
207
+ );
208
+ }));
209
+ }
210
+ /**
211
+ * Called by parser when a link is found. Adds the URL to the vertex data.
212
+ *
213
+ * @param ids - Comma separated list of ids
214
+ * @param linkStr - URL to create a link for
215
+ * @param target - Target attribute for the link
216
+ */
217
+ setLink(i, a, n) {
218
+ i.split(",").forEach((u) => {
219
+ const o = this.vertices.get(u);
220
+ o !== void 0 && (o.link = it.formatUrl(a, this.config), o.linkTarget = n);
221
+ }), this.setClass(i, "clickable");
222
+ }
223
+ getTooltip(i) {
224
+ return this.tooltips.get(i);
225
+ }
226
+ /**
227
+ * Called by parser when a click definition is found. Registers an event handler.
228
+ *
229
+ * @param ids - Comma separated list of ids
230
+ * @param functionName - Function to be called on click
231
+ * @param functionArgs - Arguments to be passed to the function
232
+ */
233
+ setClickEvent(i, a, n) {
234
+ i.split(",").forEach((u) => {
235
+ this.setClickFun(u, a, n);
236
+ }), this.setClass(i, "clickable");
237
+ }
238
+ bindFunctions(i) {
239
+ this.funs.forEach((a) => {
240
+ a(i);
241
+ });
242
+ }
243
+ getDirection() {
244
+ var i;
245
+ return (i = this.direction) == null ? void 0 : i.trim();
246
+ }
247
+ /**
248
+ * Retrieval function for fetching the found nodes after parsing has completed.
249
+ *
250
+ */
251
+ getVertices() {
252
+ return this.vertices;
253
+ }
254
+ /**
255
+ * Retrieval function for fetching the found links after parsing has completed.
256
+ *
257
+ */
258
+ getEdges() {
259
+ return this.edges;
260
+ }
261
+ /**
262
+ * Retrieval function for fetching the found class definitions after parsing has completed.
263
+ *
264
+ */
265
+ getClasses() {
266
+ return this.classes;
267
+ }
268
+ setupToolTips(i) {
269
+ let a = S1(".mermaidTooltip");
270
+ (a._groups || a)[0][0] === null && (a = S1("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), S1(i).select("svg").selectAll("g.node").on("mouseover", (o) => {
271
+ var r;
272
+ const f = S1(o.currentTarget);
273
+ if (f.attr("title") === null)
274
+ return;
275
+ const A = (r = o.currentTarget) == null ? void 0 : r.getBoundingClientRect();
276
+ a.transition().duration(200).style("opacity", ".9"), a.text(f.attr("title")).style("left", window.scrollX + A.left + (A.right - A.left) / 2 + "px").style("top", window.scrollY + A.bottom + "px"), a.html(a.html().replace(/&lt;br\/&gt;/g, "<br/>")), f.classed("hover", !0);
277
+ }).on("mouseout", (o) => {
278
+ a.transition().duration(500).style("opacity", 0), S1(o.currentTarget).classed("hover", !1);
279
+ });
280
+ }
281
+ /**
282
+ * Clears the internal graph db so that a new graph can be parsed.
283
+ *
284
+ */
285
+ clear(i = "gen-2") {
286
+ this.vertices = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.subCount = 0, this.tooltips = /* @__PURE__ */ new Map(), this.firstGraphFlag = !0, this.version = i, this.config = b1(), ne();
287
+ }
288
+ setGen(i) {
289
+ this.version = i || "gen-2";
290
+ }
291
+ defaultStyle() {
292
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
293
+ }
294
+ addSubGraph(i, a, n) {
295
+ let u = i.text.trim(), o = n.text;
296
+ i === n && /\s/.exec(n.text) && (u = void 0);
297
+ const c = (/* @__PURE__ */ m((b) => {
298
+ const L = { boolean: {}, number: {}, string: {} }, C = [];
299
+ let d;
300
+ return { nodeList: b.filter(function(W) {
301
+ const Z = typeof W;
302
+ return W.stmt && W.stmt === "dir" ? (d = W.value, !1) : W.trim() === "" ? !1 : Z in L ? L[Z].hasOwnProperty(W) ? !1 : L[Z][W] = !0 : C.includes(W) ? !1 : C.push(W);
303
+ }), dir: d };
304
+ }, "uniq"))(a.flat()), A = c.nodeList;
305
+ let r = c.dir;
306
+ const k = b1().flowchart ?? {};
307
+ if (r = r ?? (k.inheritDir ? this.getDirection() ?? b1().direction ?? void 0 : void 0), this.version === "gen-1")
308
+ for (let b = 0; b < A.length; b++)
309
+ A[b] = this.lookUpDomId(A[b]);
310
+ u = u ?? "subGraph" + this.subCount, o = o || "", o = this.sanitizeText(o), this.subCount = this.subCount + 1;
311
+ const E = {
312
+ id: u,
313
+ nodes: A,
314
+ title: o.trim(),
315
+ classes: [],
316
+ dir: r,
317
+ labelType: n.type
318
+ };
319
+ return t1.info("Adding", E.id, E.nodes, E.dir), E.nodes = this.makeUniq(E, this.subGraphs).nodes, this.subGraphs.push(E), this.subGraphLookup.set(u, E), u;
320
+ }
321
+ getPosForId(i) {
322
+ for (const [a, n] of this.subGraphs.entries())
323
+ if (n.id === i)
324
+ return a;
325
+ return -1;
326
+ }
327
+ indexNodes2(i, a) {
328
+ const n = this.subGraphs[a].nodes;
329
+ if (this.secCount = this.secCount + 1, this.secCount > 2e3)
330
+ return {
331
+ result: !1,
332
+ count: 0
333
+ };
334
+ if (this.posCrossRef[this.secCount] = a, this.subGraphs[a].id === i)
335
+ return {
336
+ result: !0,
337
+ count: 0
338
+ };
339
+ let u = 0, o = 1;
340
+ for (; u < n.length; ) {
341
+ const f = this.getPosForId(n[u]);
342
+ if (f >= 0) {
343
+ const c = this.indexNodes2(i, f);
344
+ if (c.result)
345
+ return {
346
+ result: !0,
347
+ count: o + c.count
348
+ };
349
+ o = o + c.count;
350
+ }
351
+ u = u + 1;
352
+ }
353
+ return {
354
+ result: !1,
355
+ count: o
356
+ };
357
+ }
358
+ getDepthFirstPos(i) {
359
+ return this.posCrossRef[i];
360
+ }
361
+ indexNodes() {
362
+ this.secCount = -1, this.subGraphs.length > 0 && this.indexNodes2("none", this.subGraphs.length - 1);
363
+ }
364
+ getSubGraphs() {
365
+ return this.subGraphs;
366
+ }
367
+ firstGraph() {
368
+ return this.firstGraphFlag ? (this.firstGraphFlag = !1, !0) : !1;
369
+ }
370
+ destructStartLink(i) {
371
+ let a = i.trim(), n = "arrow_open";
372
+ switch (a[0]) {
373
+ case "<":
374
+ n = "arrow_point", a = a.slice(1);
375
+ break;
376
+ case "x":
377
+ n = "arrow_cross", a = a.slice(1);
378
+ break;
379
+ case "o":
380
+ n = "arrow_circle", a = a.slice(1);
381
+ break;
382
+ }
383
+ let u = "normal";
384
+ return a.includes("=") && (u = "thick"), a.includes(".") && (u = "dotted"), { type: n, stroke: u };
385
+ }
386
+ countChar(i, a) {
387
+ const n = a.length;
388
+ let u = 0;
389
+ for (let o = 0; o < n; ++o)
390
+ a[o] === i && ++u;
391
+ return u;
392
+ }
393
+ destructEndLink(i) {
394
+ const a = i.trim();
395
+ let n = a.slice(0, -1), u = "arrow_open";
396
+ switch (a.slice(-1)) {
397
+ case "x":
398
+ u = "arrow_cross", a.startsWith("x") && (u = "double_" + u, n = n.slice(1));
399
+ break;
400
+ case ">":
401
+ u = "arrow_point", a.startsWith("<") && (u = "double_" + u, n = n.slice(1));
402
+ break;
403
+ case "o":
404
+ u = "arrow_circle", a.startsWith("o") && (u = "double_" + u, n = n.slice(1));
405
+ break;
406
+ }
407
+ let o = "normal", f = n.length - 1;
408
+ n.startsWith("=") && (o = "thick"), n.startsWith("~") && (o = "invisible");
409
+ const c = this.countChar(".", n);
410
+ return c && (o = "dotted", f = c), { type: u, stroke: o, length: f };
411
+ }
412
+ destructLink(i, a) {
413
+ const n = this.destructEndLink(i);
414
+ let u;
415
+ if (a) {
416
+ if (u = this.destructStartLink(a), u.stroke !== n.stroke)
417
+ return { type: "INVALID", stroke: "INVALID" };
418
+ if (u.type === "arrow_open")
419
+ u.type = n.type;
420
+ else {
421
+ if (u.type !== n.type)
422
+ return { type: "INVALID", stroke: "INVALID" };
423
+ u.type = "double_" + u.type;
424
+ }
425
+ return u.type === "double_arrow" && (u.type = "double_arrow_point"), u.length = n.length, u;
426
+ }
427
+ return n;
428
+ }
429
+ // Todo optimizer this by caching existing nodes
430
+ exists(i, a) {
431
+ for (const n of i)
432
+ if (n.nodes.includes(a))
433
+ return !0;
434
+ return !1;
435
+ }
436
+ /**
437
+ * Deletes an id from all subgraphs
438
+ *
439
+ */
440
+ makeUniq(i, a) {
441
+ const n = [];
442
+ return i.nodes.forEach((u, o) => {
443
+ this.exists(a, u) || n.push(i.nodes[o]);
444
+ }), { nodes: n };
445
+ }
446
+ getTypeFromVertex(i) {
447
+ if (i.img)
448
+ return "imageSquare";
449
+ if (i.icon)
450
+ return i.form === "circle" ? "iconCircle" : i.form === "square" ? "iconSquare" : i.form === "rounded" ? "iconRounded" : "icon";
451
+ switch (i.type) {
452
+ case "square":
453
+ case void 0:
454
+ return "squareRect";
455
+ case "round":
456
+ return "roundedRect";
457
+ case "ellipse":
458
+ return "ellipse";
459
+ default:
460
+ return i.type;
461
+ }
462
+ }
463
+ findNode(i, a) {
464
+ return i.find((n) => n.id === a);
465
+ }
466
+ destructEdgeType(i) {
467
+ let a = "none", n = "arrow_point";
468
+ switch (i) {
469
+ case "arrow_point":
470
+ case "arrow_circle":
471
+ case "arrow_cross":
472
+ n = i;
473
+ break;
474
+ case "double_arrow_point":
475
+ case "double_arrow_circle":
476
+ case "double_arrow_cross":
477
+ a = i.replace("double_", ""), n = a;
478
+ break;
479
+ }
480
+ return { arrowTypeStart: a, arrowTypeEnd: n };
481
+ }
482
+ addNodeFromVertex(i, a, n, u, o, f) {
483
+ var k;
484
+ const c = n.get(i.id), A = u.get(i.id) ?? !1, r = this.findNode(a, i.id);
485
+ if (r)
486
+ r.cssStyles = i.styles, r.cssCompiledStyles = this.getCompiledStyles(i.classes), r.cssClasses = i.classes.join(" ");
487
+ else {
488
+ const E = {
489
+ id: i.id,
490
+ label: i.text,
491
+ labelStyle: "",
492
+ parentId: c,
493
+ padding: ((k = o.flowchart) == null ? void 0 : k.padding) || 8,
494
+ cssStyles: i.styles,
495
+ cssCompiledStyles: this.getCompiledStyles(["default", "node", ...i.classes]),
496
+ cssClasses: "default " + i.classes.join(" "),
497
+ dir: i.dir,
498
+ domId: i.domId,
499
+ look: f,
500
+ link: i.link,
501
+ linkTarget: i.linkTarget,
502
+ tooltip: this.getTooltip(i.id),
503
+ icon: i.icon,
504
+ pos: i.pos,
505
+ img: i.img,
506
+ assetWidth: i.assetWidth,
507
+ assetHeight: i.assetHeight,
508
+ constraint: i.constraint
509
+ };
510
+ A ? a.push({
511
+ ...E,
512
+ isGroup: !0,
513
+ shape: "rect"
514
+ }) : a.push({
515
+ ...E,
516
+ isGroup: !1,
517
+ shape: this.getTypeFromVertex(i)
518
+ });
519
+ }
520
+ }
521
+ getCompiledStyles(i) {
522
+ let a = [];
523
+ for (const n of i) {
524
+ const u = this.classes.get(n);
525
+ u != null && u.styles && (a = [...a, ...u.styles ?? []].map((o) => o.trim())), u != null && u.textStyles && (a = [...a, ...u.textStyles ?? []].map((o) => o.trim()));
526
+ }
527
+ return a;
528
+ }
529
+ getData() {
530
+ const i = b1(), a = [], n = [], u = this.getSubGraphs(), o = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
531
+ for (let r = u.length - 1; r >= 0; r--) {
532
+ const k = u[r];
533
+ k.nodes.length > 0 && f.set(k.id, !0);
534
+ for (const E of k.nodes)
535
+ o.set(E, k.id);
536
+ }
537
+ for (let r = u.length - 1; r >= 0; r--) {
538
+ const k = u[r];
539
+ a.push({
540
+ id: k.id,
541
+ label: k.title,
542
+ labelStyle: "",
543
+ parentId: o.get(k.id),
544
+ padding: 8,
545
+ cssCompiledStyles: this.getCompiledStyles(k.classes),
546
+ cssClasses: k.classes.join(" "),
547
+ shape: "rect",
548
+ dir: k.dir,
549
+ isGroup: !0,
550
+ look: i.look
551
+ });
552
+ }
553
+ this.getVertices().forEach((r) => {
554
+ this.addNodeFromVertex(r, a, o, f, i, i.look || "classic");
555
+ });
556
+ const A = this.getEdges();
557
+ return A.forEach((r, k) => {
558
+ var d;
559
+ const { arrowTypeStart: E, arrowTypeEnd: b } = this.destructEdgeType(r.type), L = [...A.defaultStyle ?? []];
560
+ r.style && L.push(...r.style);
561
+ const C = {
562
+ id: st(r.start, r.end, { counter: k, prefix: "L" }, r.id),
563
+ isUserDefinedId: r.isUserDefinedId,
564
+ start: r.start,
565
+ end: r.end,
566
+ type: r.type ?? "normal",
567
+ label: r.text,
568
+ labelpos: "c",
569
+ thickness: r.stroke,
570
+ minlen: r.length,
571
+ classes: (r == null ? void 0 : r.stroke) === "invisible" ? "" : "edge-thickness-normal edge-pattern-solid flowchart-link",
572
+ arrowTypeStart: (r == null ? void 0 : r.stroke) === "invisible" || (r == null ? void 0 : r.type) === "arrow_open" ? "none" : E,
573
+ arrowTypeEnd: (r == null ? void 0 : r.stroke) === "invisible" || (r == null ? void 0 : r.type) === "arrow_open" ? "none" : b,
574
+ arrowheadStyle: "fill: #333",
575
+ cssCompiledStyles: this.getCompiledStyles(r.classes),
576
+ labelStyle: L,
577
+ style: L,
578
+ pattern: r.stroke,
579
+ look: i.look,
580
+ animate: r.animate,
581
+ animation: r.animation,
582
+ curve: r.interpolate || this.edges.defaultInterpolate || ((d = i.flowchart) == null ? void 0 : d.curve)
583
+ };
584
+ n.push(C);
585
+ }), { nodes: a, edges: n, other: {}, config: i };
586
+ }
587
+ defaultConfig() {
588
+ return ue.flowchart;
589
+ }
590
+ }, m(P1, "FlowDB"), P1), fe = /* @__PURE__ */ m(function(s, i) {
591
+ return i.db.getClasses();
592
+ }, "getClasses"), ge = /* @__PURE__ */ m(async function(s, i, a, n) {
593
+ var L;
594
+ t1.info("REF0:"), t1.info("Drawing state diagram (v2)", i);
595
+ const { securityLevel: u, flowchart: o, layout: f } = b1();
596
+ let c;
597
+ u === "sandbox" && (c = S1("#i" + i));
598
+ const A = u === "sandbox" ? c.nodes()[0].contentDocument : document;
599
+ t1.debug("Before getData: ");
600
+ const r = n.db.getData();
601
+ t1.debug("Data: ", r);
602
+ const k = le(i, u), E = n.db.getDirection();
603
+ r.type = n.type, r.layoutAlgorithm = Ht(f), r.layoutAlgorithm === "dagre" && f === "elk" && t1.warn(
604
+ "flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."
605
+ ), r.direction = E, r.nodeSpacing = (o == null ? void 0 : o.nodeSpacing) || 50, r.rankSpacing = (o == null ? void 0 : o.rankSpacing) || 50, r.markers = ["point", "circle", "cross"], r.diagramId = i, t1.debug("REF1:", r), await Xt(r, k);
606
+ const b = ((L = r.config.flowchart) == null ? void 0 : L.diagramPadding) ?? 8;
607
+ it.insertTitle(
608
+ k,
609
+ "flowchartTitleText",
610
+ (o == null ? void 0 : o.titleTopMargin) || 0,
611
+ n.db.getDiagramTitle()
612
+ ), ce(k, b, "flowchart", (o == null ? void 0 : o.useMaxWidth) || !1);
613
+ for (const C of r.nodes) {
614
+ const d = S1(`#${i} [id="${C.id}"]`);
615
+ if (!d || !C.link)
616
+ continue;
617
+ const J = A.createElementNS("http://www.w3.org/2000/svg", "a");
618
+ J.setAttributeNS("http://www.w3.org/2000/svg", "class", C.cssClasses), J.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), u === "sandbox" ? J.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : C.linkTarget && J.setAttributeNS("http://www.w3.org/2000/svg", "target", C.linkTarget);
619
+ const W = d.insert(function() {
620
+ return J;
621
+ }, ":first-child"), Z = d.select(".label-container");
622
+ Z && W.append(function() {
623
+ return Z.node();
624
+ });
625
+ const A1 = d.select(".label");
626
+ A1 && W.append(function() {
627
+ return A1.node();
628
+ });
629
+ }
630
+ }, "draw"), be = {
631
+ getClasses: fe,
632
+ draw: ge
633
+ }, rt = function() {
634
+ var s = /* @__PURE__ */ m(function(g1, h, p, g) {
635
+ for (p = p || {}, g = g1.length; g--; p[g1[g]] = h) ;
636
+ return p;
637
+ }, "o"), i = [1, 4], a = [1, 3], n = [1, 5], u = [1, 8, 9, 10, 11, 27, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], o = [2, 2], f = [1, 13], c = [1, 14], A = [1, 15], r = [1, 16], k = [1, 23], E = [1, 25], b = [1, 26], L = [1, 27], C = [1, 49], d = [1, 48], J = [1, 29], W = [1, 30], Z = [1, 31], A1 = [1, 32], M1 = [1, 33], V = [1, 44], I = [1, 46], w = [1, 42], R = [1, 47], N = [1, 43], G = [1, 50], P = [1, 45], O = [1, 51], M = [1, 52], U1 = [1, 34], W1 = [1, 35], z1 = [1, 36], j1 = [1, 37], p1 = [1, 57], y = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], e1 = [1, 61], s1 = [1, 60], i1 = [1, 62], D1 = [8, 9, 11, 75, 77, 78], at = [1, 78], x1 = [1, 91], T1 = [1, 96], E1 = [1, 95], y1 = [1, 92], F1 = [1, 88], _1 = [1, 94], B1 = [1, 90], v1 = [1, 97], L1 = [1, 93], V1 = [1, 98], I1 = [1, 89], k1 = [8, 9, 10, 11, 40, 75, 77, 78], z = [8, 9, 10, 11, 40, 46, 75, 77, 78], q = [8, 9, 10, 11, 29, 40, 44, 46, 48, 50, 52, 54, 56, 58, 60, 63, 65, 67, 68, 70, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], nt = [8, 9, 11, 44, 60, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], w1 = [44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], ut = [1, 121], ot = [1, 122], K1 = [1, 124], Y1 = [1, 123], lt = [44, 60, 62, 74, 89, 102, 105, 106, 109, 111, 114, 115, 116], ct = [1, 133], ht = [1, 147], dt = [1, 148], pt = [1, 149], ft = [1, 150], gt = [1, 135], bt = [1, 137], At = [1, 141], kt = [1, 142], mt = [1, 143], Ct = [1, 144], St = [1, 145], Dt = [1, 146], xt = [1, 151], Tt = [1, 152], Et = [1, 131], yt = [1, 132], Ft = [1, 139], _t = [1, 134], Bt = [1, 138], vt = [1, 136], Q1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], Lt = [1, 154], Vt = [1, 156], B = [8, 9, 11], H = [8, 9, 10, 11, 14, 44, 60, 89, 105, 106, 109, 111, 114, 115, 116], S = [1, 176], j = [1, 172], K = [1, 173], D = [1, 177], x = [1, 174], T = [1, 175], R1 = [77, 116, 119], F = [8, 9, 10, 11, 12, 14, 27, 29, 32, 44, 60, 75, 84, 85, 86, 87, 88, 89, 90, 105, 109, 111, 114, 115, 116], It = [10, 106], f1 = [31, 49, 51, 53, 55, 57, 62, 64, 66, 67, 69, 71, 116, 117, 118], r1 = [1, 247], a1 = [1, 245], n1 = [1, 249], u1 = [1, 243], o1 = [1, 244], l1 = [1, 246], c1 = [1, 248], h1 = [1, 250], N1 = [1, 268], wt = [8, 9, 11, 106], $ = [8, 9, 10, 11, 60, 84, 105, 106, 109, 110, 111, 112], J1 = {
638
+ trace: /* @__PURE__ */ m(function() {
639
+ }, "trace"),
640
+ yy: {},
641
+ symbols_: { error: 2, start: 3, graphConfig: 4, document: 5, line: 6, statement: 7, SEMI: 8, NEWLINE: 9, SPACE: 10, EOF: 11, GRAPH: 12, NODIR: 13, DIR: 14, FirstStmtSeparator: 15, ending: 16, endToken: 17, spaceList: 18, spaceListNewline: 19, vertexStatement: 20, separator: 21, styleStatement: 22, linkStyleStatement: 23, classDefStatement: 24, classStatement: 25, clickStatement: 26, subgraph: 27, textNoTags: 28, SQS: 29, text: 30, SQE: 31, end: 32, direction: 33, acc_title: 34, acc_title_value: 35, acc_descr: 36, acc_descr_value: 37, acc_descr_multiline_value: 38, shapeData: 39, SHAPE_DATA: 40, link: 41, node: 42, styledVertex: 43, AMP: 44, vertex: 45, STYLE_SEPARATOR: 46, idString: 47, DOUBLECIRCLESTART: 48, DOUBLECIRCLEEND: 49, PS: 50, PE: 51, "(-": 52, "-)": 53, STADIUMSTART: 54, STADIUMEND: 55, SUBROUTINESTART: 56, SUBROUTINEEND: 57, VERTEX_WITH_PROPS_START: 58, "NODE_STRING[field]": 59, COLON: 60, "NODE_STRING[value]": 61, PIPE: 62, CYLINDERSTART: 63, CYLINDEREND: 64, DIAMOND_START: 65, DIAMOND_STOP: 66, TAGEND: 67, TRAPSTART: 68, TRAPEND: 69, INVTRAPSTART: 70, INVTRAPEND: 71, linkStatement: 72, arrowText: 73, TESTSTR: 74, START_LINK: 75, edgeText: 76, LINK: 77, LINK_ID: 78, edgeTextToken: 79, STR: 80, MD_STR: 81, textToken: 82, keywords: 83, STYLE: 84, LINKSTYLE: 85, CLASSDEF: 86, CLASS: 87, CLICK: 88, DOWN: 89, UP: 90, textNoTagsToken: 91, stylesOpt: 92, "idString[vertex]": 93, "idString[class]": 94, CALLBACKNAME: 95, CALLBACKARGS: 96, HREF: 97, LINK_TARGET: 98, "STR[link]": 99, "STR[tooltip]": 100, alphaNum: 101, DEFAULT: 102, numList: 103, INTERPOLATE: 104, NUM: 105, COMMA: 106, style: 107, styleComponent: 108, NODE_STRING: 109, UNIT: 110, BRKT: 111, PCT: 112, idStringToken: 113, MINUS: 114, MULT: 115, UNICODE_TEXT: 116, TEXT: 117, TAGSTART: 118, EDGE_TEXT: 119, alphaNumToken: 120, direction_tb: 121, direction_bt: 122, direction_rl: 123, direction_lr: 124, $accept: 0, $end: 1 },
642
+ terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 40: "SHAPE_DATA", 44: "AMP", 46: "STYLE_SEPARATOR", 48: "DOUBLECIRCLESTART", 49: "DOUBLECIRCLEEND", 50: "PS", 51: "PE", 52: "(-", 53: "-)", 54: "STADIUMSTART", 55: "STADIUMEND", 56: "SUBROUTINESTART", 57: "SUBROUTINEEND", 58: "VERTEX_WITH_PROPS_START", 59: "NODE_STRING[field]", 60: "COLON", 61: "NODE_STRING[value]", 62: "PIPE", 63: "CYLINDERSTART", 64: "CYLINDEREND", 65: "DIAMOND_START", 66: "DIAMOND_STOP", 67: "TAGEND", 68: "TRAPSTART", 69: "TRAPEND", 70: "INVTRAPSTART", 71: "INVTRAPEND", 74: "TESTSTR", 75: "START_LINK", 77: "LINK", 78: "LINK_ID", 80: "STR", 81: "MD_STR", 84: "STYLE", 85: "LINKSTYLE", 86: "CLASSDEF", 87: "CLASS", 88: "CLICK", 89: "DOWN", 90: "UP", 93: "idString[vertex]", 94: "idString[class]", 95: "CALLBACKNAME", 96: "CALLBACKARGS", 97: "HREF", 98: "LINK_TARGET", 99: "STR[link]", 100: "STR[tooltip]", 102: "DEFAULT", 104: "INTERPOLATE", 105: "NUM", 106: "COMMA", 109: "NODE_STRING", 110: "UNIT", 111: "BRKT", 112: "PCT", 114: "MINUS", 115: "MULT", 116: "UNICODE_TEXT", 117: "TEXT", 118: "TAGSTART", 119: "EDGE_TEXT", 121: "direction_tb", 122: "direction_bt", 123: "direction_rl", 124: "direction_lr" },
643
+ productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [39, 2], [39, 1], [20, 4], [20, 3], [20, 4], [20, 2], [20, 2], [20, 1], [42, 1], [42, 6], [42, 5], [43, 1], [43, 3], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 8], [45, 4], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 1], [41, 2], [41, 3], [41, 3], [41, 1], [41, 3], [41, 4], [76, 1], [76, 2], [76, 1], [76, 1], [72, 1], [72, 2], [73, 3], [30, 1], [30, 2], [30, 1], [30, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [103, 1], [103, 3], [92, 1], [92, 3], [107, 1], [107, 2], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [82, 1], [82, 1], [82, 1], [82, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [79, 1], [79, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [47, 1], [47, 2], [101, 1], [101, 2], [33, 1], [33, 1], [33, 1], [33, 1]],
644
+ performAction: /* @__PURE__ */ m(function(h, p, g, l, _, t, O1) {
645
+ var e = t.length - 1;
646
+ switch (_) {
647
+ case 2:
648
+ this.$ = [];
649
+ break;
650
+ case 3:
651
+ (!Array.isArray(t[e]) || t[e].length > 0) && t[e - 1].push(t[e]), this.$ = t[e - 1];
652
+ break;
653
+ case 4:
654
+ case 183:
655
+ this.$ = t[e];
656
+ break;
657
+ case 11:
658
+ l.setDirection("TB"), this.$ = "TB";
659
+ break;
660
+ case 12:
661
+ l.setDirection(t[e - 1]), this.$ = t[e - 1];
662
+ break;
663
+ case 27:
664
+ this.$ = t[e - 1].nodes;
665
+ break;
666
+ case 28:
667
+ case 29:
668
+ case 30:
669
+ case 31:
670
+ case 32:
671
+ this.$ = [];
672
+ break;
673
+ case 33:
674
+ this.$ = l.addSubGraph(t[e - 6], t[e - 1], t[e - 4]);
675
+ break;
676
+ case 34:
677
+ this.$ = l.addSubGraph(t[e - 3], t[e - 1], t[e - 3]);
678
+ break;
679
+ case 35:
680
+ this.$ = l.addSubGraph(void 0, t[e - 1], void 0);
681
+ break;
682
+ case 37:
683
+ this.$ = t[e].trim(), l.setAccTitle(this.$);
684
+ break;
685
+ case 38:
686
+ case 39:
687
+ this.$ = t[e].trim(), l.setAccDescription(this.$);
688
+ break;
689
+ case 43:
690
+ this.$ = t[e - 1] + t[e];
691
+ break;
692
+ case 44:
693
+ this.$ = t[e];
694
+ break;
695
+ case 45:
696
+ l.addVertex(t[e - 1][t[e - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[e]), l.addLink(t[e - 3].stmt, t[e - 1], t[e - 2]), this.$ = { stmt: t[e - 1], nodes: t[e - 1].concat(t[e - 3].nodes) };
697
+ break;
698
+ case 46:
699
+ l.addLink(t[e - 2].stmt, t[e], t[e - 1]), this.$ = { stmt: t[e], nodes: t[e].concat(t[e - 2].nodes) };
700
+ break;
701
+ case 47:
702
+ l.addLink(t[e - 3].stmt, t[e - 1], t[e - 2]), this.$ = { stmt: t[e - 1], nodes: t[e - 1].concat(t[e - 3].nodes) };
703
+ break;
704
+ case 48:
705
+ this.$ = { stmt: t[e - 1], nodes: t[e - 1] };
706
+ break;
707
+ case 49:
708
+ l.addVertex(t[e - 1][t[e - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[e]), this.$ = { stmt: t[e - 1], nodes: t[e - 1], shapeData: t[e] };
709
+ break;
710
+ case 50:
711
+ this.$ = { stmt: t[e], nodes: t[e] };
712
+ break;
713
+ case 51:
714
+ this.$ = [t[e]];
715
+ break;
716
+ case 52:
717
+ l.addVertex(t[e - 5][t[e - 5].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[e - 4]), this.$ = t[e - 5].concat(t[e]);
718
+ break;
719
+ case 53:
720
+ this.$ = t[e - 4].concat(t[e]);
721
+ break;
722
+ case 54:
723
+ this.$ = t[e];
724
+ break;
725
+ case 55:
726
+ this.$ = t[e - 2], l.setClass(t[e - 2], t[e]);
727
+ break;
728
+ case 56:
729
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "square");
730
+ break;
731
+ case 57:
732
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "doublecircle");
733
+ break;
734
+ case 58:
735
+ this.$ = t[e - 5], l.addVertex(t[e - 5], t[e - 2], "circle");
736
+ break;
737
+ case 59:
738
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "ellipse");
739
+ break;
740
+ case 60:
741
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "stadium");
742
+ break;
743
+ case 61:
744
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "subroutine");
745
+ break;
746
+ case 62:
747
+ this.$ = t[e - 7], l.addVertex(t[e - 7], t[e - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[t[e - 5], t[e - 3]]]));
748
+ break;
749
+ case 63:
750
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "cylinder");
751
+ break;
752
+ case 64:
753
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "round");
754
+ break;
755
+ case 65:
756
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "diamond");
757
+ break;
758
+ case 66:
759
+ this.$ = t[e - 5], l.addVertex(t[e - 5], t[e - 2], "hexagon");
760
+ break;
761
+ case 67:
762
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "odd");
763
+ break;
764
+ case 68:
765
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "trapezoid");
766
+ break;
767
+ case 69:
768
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "inv_trapezoid");
769
+ break;
770
+ case 70:
771
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "lean_right");
772
+ break;
773
+ case 71:
774
+ this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "lean_left");
775
+ break;
776
+ case 72:
777
+ this.$ = t[e], l.addVertex(t[e]);
778
+ break;
779
+ case 73:
780
+ t[e - 1].text = t[e], this.$ = t[e - 1];
781
+ break;
782
+ case 74:
783
+ case 75:
784
+ t[e - 2].text = t[e - 1], this.$ = t[e - 2];
785
+ break;
786
+ case 76:
787
+ this.$ = t[e];
788
+ break;
789
+ case 77:
790
+ var v = l.destructLink(t[e], t[e - 2]);
791
+ this.$ = { type: v.type, stroke: v.stroke, length: v.length, text: t[e - 1] };
792
+ break;
793
+ case 78:
794
+ var v = l.destructLink(t[e], t[e - 2]);
795
+ this.$ = { type: v.type, stroke: v.stroke, length: v.length, text: t[e - 1], id: t[e - 3] };
796
+ break;
797
+ case 79:
798
+ this.$ = { text: t[e], type: "text" };
799
+ break;
800
+ case 80:
801
+ this.$ = { text: t[e - 1].text + "" + t[e], type: t[e - 1].type };
802
+ break;
803
+ case 81:
804
+ this.$ = { text: t[e], type: "string" };
805
+ break;
806
+ case 82:
807
+ this.$ = { text: t[e], type: "markdown" };
808
+ break;
809
+ case 83:
810
+ var v = l.destructLink(t[e]);
811
+ this.$ = { type: v.type, stroke: v.stroke, length: v.length };
812
+ break;
813
+ case 84:
814
+ var v = l.destructLink(t[e]);
815
+ this.$ = { type: v.type, stroke: v.stroke, length: v.length, id: t[e - 1] };
816
+ break;
817
+ case 85:
818
+ this.$ = t[e - 1];
819
+ break;
820
+ case 86:
821
+ this.$ = { text: t[e], type: "text" };
822
+ break;
823
+ case 87:
824
+ this.$ = { text: t[e - 1].text + "" + t[e], type: t[e - 1].type };
825
+ break;
826
+ case 88:
827
+ this.$ = { text: t[e], type: "string" };
828
+ break;
829
+ case 89:
830
+ case 104:
831
+ this.$ = { text: t[e], type: "markdown" };
832
+ break;
833
+ case 101:
834
+ this.$ = { text: t[e], type: "text" };
835
+ break;
836
+ case 102:
837
+ this.$ = { text: t[e - 1].text + "" + t[e], type: t[e - 1].type };
838
+ break;
839
+ case 103:
840
+ this.$ = { text: t[e], type: "text" };
841
+ break;
842
+ case 105:
843
+ this.$ = t[e - 4], l.addClass(t[e - 2], t[e]);
844
+ break;
845
+ case 106:
846
+ this.$ = t[e - 4], l.setClass(t[e - 2], t[e]);
847
+ break;
848
+ case 107:
849
+ case 115:
850
+ this.$ = t[e - 1], l.setClickEvent(t[e - 1], t[e]);
851
+ break;
852
+ case 108:
853
+ case 116:
854
+ this.$ = t[e - 3], l.setClickEvent(t[e - 3], t[e - 2]), l.setTooltip(t[e - 3], t[e]);
855
+ break;
856
+ case 109:
857
+ this.$ = t[e - 2], l.setClickEvent(t[e - 2], t[e - 1], t[e]);
858
+ break;
859
+ case 110:
860
+ this.$ = t[e - 4], l.setClickEvent(t[e - 4], t[e - 3], t[e - 2]), l.setTooltip(t[e - 4], t[e]);
861
+ break;
862
+ case 111:
863
+ this.$ = t[e - 2], l.setLink(t[e - 2], t[e]);
864
+ break;
865
+ case 112:
866
+ this.$ = t[e - 4], l.setLink(t[e - 4], t[e - 2]), l.setTooltip(t[e - 4], t[e]);
867
+ break;
868
+ case 113:
869
+ this.$ = t[e - 4], l.setLink(t[e - 4], t[e - 2], t[e]);
870
+ break;
871
+ case 114:
872
+ this.$ = t[e - 6], l.setLink(t[e - 6], t[e - 4], t[e]), l.setTooltip(t[e - 6], t[e - 2]);
873
+ break;
874
+ case 117:
875
+ this.$ = t[e - 1], l.setLink(t[e - 1], t[e]);
876
+ break;
877
+ case 118:
878
+ this.$ = t[e - 3], l.setLink(t[e - 3], t[e - 2]), l.setTooltip(t[e - 3], t[e]);
879
+ break;
880
+ case 119:
881
+ this.$ = t[e - 3], l.setLink(t[e - 3], t[e - 2], t[e]);
882
+ break;
883
+ case 120:
884
+ this.$ = t[e - 5], l.setLink(t[e - 5], t[e - 4], t[e]), l.setTooltip(t[e - 5], t[e - 2]);
885
+ break;
886
+ case 121:
887
+ this.$ = t[e - 4], l.addVertex(t[e - 2], void 0, void 0, t[e]);
888
+ break;
889
+ case 122:
890
+ this.$ = t[e - 4], l.updateLink([t[e - 2]], t[e]);
891
+ break;
892
+ case 123:
893
+ this.$ = t[e - 4], l.updateLink(t[e - 2], t[e]);
894
+ break;
895
+ case 124:
896
+ this.$ = t[e - 8], l.updateLinkInterpolate([t[e - 6]], t[e - 2]), l.updateLink([t[e - 6]], t[e]);
897
+ break;
898
+ case 125:
899
+ this.$ = t[e - 8], l.updateLinkInterpolate(t[e - 6], t[e - 2]), l.updateLink(t[e - 6], t[e]);
900
+ break;
901
+ case 126:
902
+ this.$ = t[e - 6], l.updateLinkInterpolate([t[e - 4]], t[e]);
903
+ break;
904
+ case 127:
905
+ this.$ = t[e - 6], l.updateLinkInterpolate(t[e - 4], t[e]);
906
+ break;
907
+ case 128:
908
+ case 130:
909
+ this.$ = [t[e]];
910
+ break;
911
+ case 129:
912
+ case 131:
913
+ t[e - 2].push(t[e]), this.$ = t[e - 2];
914
+ break;
915
+ case 133:
916
+ this.$ = t[e - 1] + t[e];
917
+ break;
918
+ case 181:
919
+ this.$ = t[e];
920
+ break;
921
+ case 182:
922
+ this.$ = t[e - 1] + "" + t[e];
923
+ break;
924
+ case 184:
925
+ this.$ = t[e - 1] + "" + t[e];
926
+ break;
927
+ case 185:
928
+ this.$ = { stmt: "dir", value: "TB" };
929
+ break;
930
+ case 186:
931
+ this.$ = { stmt: "dir", value: "BT" };
932
+ break;
933
+ case 187:
934
+ this.$ = { stmt: "dir", value: "RL" };
935
+ break;
936
+ case 188:
937
+ this.$ = { stmt: "dir", value: "LR" };
938
+ break;
939
+ }
940
+ }, "anonymous"),
941
+ table: [{ 3: 1, 4: 2, 9: i, 10: a, 12: n }, { 1: [3] }, s(u, o, { 5: 6 }), { 4: 7, 9: i, 10: a, 12: n }, { 4: 8, 9: i, 10: a, 12: n }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: d, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, s(u, [2, 9]), s(u, [2, 10]), s(u, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: p1, 15: 53, 18: 56 }, s(y, [2, 3]), s(y, [2, 4]), s(y, [2, 5]), s(y, [2, 6]), s(y, [2, 7]), s(y, [2, 8]), { 8: e1, 9: s1, 11: i1, 21: 58, 41: 59, 72: 63, 75: [1, 64], 77: [1, 66], 78: [1, 65] }, { 8: e1, 9: s1, 11: i1, 21: 67 }, { 8: e1, 9: s1, 11: i1, 21: 68 }, { 8: e1, 9: s1, 11: i1, 21: 69 }, { 8: e1, 9: s1, 11: i1, 21: 70 }, { 8: e1, 9: s1, 11: i1, 21: 71 }, { 8: e1, 9: s1, 10: [1, 72], 11: i1, 21: 73 }, s(y, [2, 36]), { 35: [1, 74] }, { 37: [1, 75] }, s(y, [2, 39]), s(D1, [2, 50], { 18: 76, 39: 77, 10: p1, 40: at }), { 10: [1, 79] }, { 10: [1, 80] }, { 10: [1, 81] }, { 10: [1, 82] }, { 14: x1, 44: T1, 60: E1, 80: [1, 86], 89: y1, 95: [1, 83], 97: [1, 84], 101: 85, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1, 120: 87 }, s(y, [2, 185]), s(y, [2, 186]), s(y, [2, 187]), s(y, [2, 188]), s(k1, [2, 51]), s(k1, [2, 54], { 46: [1, 99] }), s(z, [2, 72], { 113: 112, 29: [1, 100], 44: C, 48: [1, 101], 50: [1, 102], 52: [1, 103], 54: [1, 104], 56: [1, 105], 58: [1, 106], 60: d, 63: [1, 107], 65: [1, 108], 67: [1, 109], 68: [1, 110], 70: [1, 111], 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 114: P, 115: O, 116: M }), s(q, [2, 181]), s(q, [2, 142]), s(q, [2, 143]), s(q, [2, 144]), s(q, [2, 145]), s(q, [2, 146]), s(q, [2, 147]), s(q, [2, 148]), s(q, [2, 149]), s(q, [2, 150]), s(q, [2, 151]), s(q, [2, 152]), s(u, [2, 12]), s(u, [2, 18]), s(u, [2, 19]), { 9: [1, 113] }, s(nt, [2, 26], { 18: 114, 10: p1 }), s(y, [2, 27]), { 42: 115, 43: 38, 44: C, 45: 39, 47: 40, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(y, [2, 40]), s(y, [2, 41]), s(y, [2, 42]), s(w1, [2, 76], { 73: 116, 62: [1, 118], 74: [1, 117] }), { 76: 119, 79: 120, 80: ut, 81: ot, 116: K1, 119: Y1 }, { 75: [1, 125], 77: [1, 126] }, s(lt, [2, 83]), s(y, [2, 28]), s(y, [2, 29]), s(y, [2, 30]), s(y, [2, 31]), s(y, [2, 32]), { 10: ct, 12: ht, 14: dt, 27: pt, 28: 127, 32: ft, 44: gt, 60: bt, 75: At, 80: [1, 129], 81: [1, 130], 83: 140, 84: kt, 85: mt, 86: Ct, 87: St, 88: Dt, 89: xt, 90: Tt, 91: 128, 105: Et, 109: yt, 111: Ft, 114: _t, 115: Bt, 116: vt }, s(Q1, o, { 5: 153 }), s(y, [2, 37]), s(y, [2, 38]), s(D1, [2, 48], { 44: Lt }), s(D1, [2, 49], { 18: 155, 10: p1, 40: Vt }), s(k1, [2, 44]), { 44: C, 47: 157, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 102: [1, 158], 103: 159, 105: [1, 160] }, { 44: C, 47: 161, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 44: C, 47: 162, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(B, [2, 107], { 10: [1, 163], 96: [1, 164] }), { 80: [1, 165] }, s(B, [2, 115], { 120: 167, 10: [1, 166], 14: x1, 44: T1, 60: E1, 89: y1, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1 }), s(B, [2, 117], { 10: [1, 168] }), s(H, [2, 183]), s(H, [2, 170]), s(H, [2, 171]), s(H, [2, 172]), s(H, [2, 173]), s(H, [2, 174]), s(H, [2, 175]), s(H, [2, 176]), s(H, [2, 177]), s(H, [2, 178]), s(H, [2, 179]), s(H, [2, 180]), { 44: C, 47: 169, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 30: 170, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 178, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 180, 50: [1, 179], 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 181, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 182, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 183, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 109: [1, 184] }, { 30: 185, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 186, 65: [1, 187], 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 188, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 189, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 190, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, s(q, [2, 182]), s(u, [2, 20]), s(nt, [2, 25]), s(D1, [2, 46], { 39: 191, 18: 192, 10: p1, 40: at }), s(w1, [2, 73], { 10: [1, 193] }), { 10: [1, 194] }, { 30: 195, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 77: [1, 196], 79: 197, 116: K1, 119: Y1 }, s(R1, [2, 79]), s(R1, [2, 81]), s(R1, [2, 82]), s(R1, [2, 168]), s(R1, [2, 169]), { 76: 198, 79: 120, 80: ut, 81: ot, 116: K1, 119: Y1 }, s(lt, [2, 84]), { 8: e1, 9: s1, 10: ct, 11: i1, 12: ht, 14: dt, 21: 200, 27: pt, 29: [1, 199], 32: ft, 44: gt, 60: bt, 75: At, 83: 140, 84: kt, 85: mt, 86: Ct, 87: St, 88: Dt, 89: xt, 90: Tt, 91: 201, 105: Et, 109: yt, 111: Ft, 114: _t, 115: Bt, 116: vt }, s(F, [2, 101]), s(F, [2, 103]), s(F, [2, 104]), s(F, [2, 157]), s(F, [2, 158]), s(F, [2, 159]), s(F, [2, 160]), s(F, [2, 161]), s(F, [2, 162]), s(F, [2, 163]), s(F, [2, 164]), s(F, [2, 165]), s(F, [2, 166]), s(F, [2, 167]), s(F, [2, 90]), s(F, [2, 91]), s(F, [2, 92]), s(F, [2, 93]), s(F, [2, 94]), s(F, [2, 95]), s(F, [2, 96]), s(F, [2, 97]), s(F, [2, 98]), s(F, [2, 99]), s(F, [2, 100]), { 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 32: [1, 202], 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: d, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, { 10: p1, 18: 203 }, { 44: [1, 204] }, s(k1, [2, 43]), { 10: [1, 205], 44: C, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 112, 114: P, 115: O, 116: M }, { 10: [1, 206] }, { 10: [1, 207], 106: [1, 208] }, s(It, [2, 128]), { 10: [1, 209], 44: C, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 112, 114: P, 115: O, 116: M }, { 10: [1, 210], 44: C, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 112, 114: P, 115: O, 116: M }, { 80: [1, 211] }, s(B, [2, 109], { 10: [1, 212] }), s(B, [2, 111], { 10: [1, 213] }), { 80: [1, 214] }, s(H, [2, 184]), { 80: [1, 215], 98: [1, 216] }, s(k1, [2, 55], { 113: 112, 44: C, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 114: P, 115: O, 116: M }), { 31: [1, 217], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(f1, [2, 86]), s(f1, [2, 88]), s(f1, [2, 89]), s(f1, [2, 153]), s(f1, [2, 154]), s(f1, [2, 155]), s(f1, [2, 156]), { 49: [1, 219], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 30: 220, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 51: [1, 221], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 53: [1, 222], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 55: [1, 223], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 57: [1, 224], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 60: [1, 225] }, { 64: [1, 226], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 66: [1, 227], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 30: 228, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 31: [1, 229], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 67: S, 69: [1, 230], 71: [1, 231], 82: 218, 116: D, 117: x, 118: T }, { 67: S, 69: [1, 233], 71: [1, 232], 82: 218, 116: D, 117: x, 118: T }, s(D1, [2, 45], { 18: 155, 10: p1, 40: Vt }), s(D1, [2, 47], { 44: Lt }), s(w1, [2, 75]), s(w1, [2, 74]), { 62: [1, 234], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(w1, [2, 77]), s(R1, [2, 80]), { 77: [1, 235], 79: 197, 116: K1, 119: Y1 }, { 30: 236, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, s(Q1, o, { 5: 237 }), s(F, [2, 102]), s(y, [2, 35]), { 43: 238, 44: C, 45: 39, 47: 40, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 10: p1, 18: 239 }, { 10: r1, 60: a1, 84: n1, 92: 240, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 10: r1, 60: a1, 84: n1, 92: 251, 104: [1, 252], 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 10: r1, 60: a1, 84: n1, 92: 253, 104: [1, 254], 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 105: [1, 255] }, { 10: r1, 60: a1, 84: n1, 92: 256, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 44: C, 47: 257, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(B, [2, 108]), { 80: [1, 258] }, { 80: [1, 259], 98: [1, 260] }, s(B, [2, 116]), s(B, [2, 118], { 10: [1, 261] }), s(B, [2, 119]), s(z, [2, 56]), s(f1, [2, 87]), s(z, [2, 57]), { 51: [1, 262], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(z, [2, 64]), s(z, [2, 59]), s(z, [2, 60]), s(z, [2, 61]), { 109: [1, 263] }, s(z, [2, 63]), s(z, [2, 65]), { 66: [1, 264], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(z, [2, 67]), s(z, [2, 68]), s(z, [2, 70]), s(z, [2, 69]), s(z, [2, 71]), s([10, 44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], [2, 85]), s(w1, [2, 78]), { 31: [1, 265], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 32: [1, 266], 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: d, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, s(k1, [2, 53]), { 43: 267, 44: C, 45: 39, 47: 40, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(B, [2, 121], { 106: N1 }), s(wt, [2, 130], { 108: 269, 10: r1, 60: a1, 84: n1, 105: u1, 109: o1, 110: l1, 111: c1, 112: h1 }), s($, [2, 132]), s($, [2, 134]), s($, [2, 135]), s($, [2, 136]), s($, [2, 137]), s($, [2, 138]), s($, [2, 139]), s($, [2, 140]), s($, [2, 141]), s(B, [2, 122], { 106: N1 }), { 10: [1, 270] }, s(B, [2, 123], { 106: N1 }), { 10: [1, 271] }, s(It, [2, 129]), s(B, [2, 105], { 106: N1 }), s(B, [2, 106], { 113: 112, 44: C, 60: d, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 114: P, 115: O, 116: M }), s(B, [2, 110]), s(B, [2, 112], { 10: [1, 272] }), s(B, [2, 113]), { 98: [1, 273] }, { 51: [1, 274] }, { 62: [1, 275] }, { 66: [1, 276] }, { 8: e1, 9: s1, 11: i1, 21: 277 }, s(y, [2, 34]), s(k1, [2, 52]), { 10: r1, 60: a1, 84: n1, 105: u1, 107: 278, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, s($, [2, 133]), { 14: x1, 44: T1, 60: E1, 89: y1, 101: 279, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1, 120: 87 }, { 14: x1, 44: T1, 60: E1, 89: y1, 101: 280, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1, 120: 87 }, { 98: [1, 281] }, s(B, [2, 120]), s(z, [2, 58]), { 30: 282, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, s(z, [2, 66]), s(Q1, o, { 5: 283 }), s(wt, [2, 131], { 108: 269, 10: r1, 60: a1, 84: n1, 105: u1, 109: o1, 110: l1, 111: c1, 112: h1 }), s(B, [2, 126], { 120: 167, 10: [1, 284], 14: x1, 44: T1, 60: E1, 89: y1, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1 }), s(B, [2, 127], { 120: 167, 10: [1, 285], 14: x1, 44: T1, 60: E1, 89: y1, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1 }), s(B, [2, 114]), { 31: [1, 286], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 32: [1, 287], 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: d, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, { 10: r1, 60: a1, 84: n1, 92: 288, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 10: r1, 60: a1, 84: n1, 92: 289, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, s(z, [2, 62]), s(y, [2, 33]), s(B, [2, 124], { 106: N1 }), s(B, [2, 125], { 106: N1 })],
942
+ defaultActions: {},
943
+ parseError: /* @__PURE__ */ m(function(h, p) {
944
+ if (p.recoverable)
945
+ this.trace(h);
946
+ else {
947
+ var g = new Error(h);
948
+ throw g.hash = p, g;
949
+ }
950
+ }, "parseError"),
951
+ parse: /* @__PURE__ */ m(function(h) {
952
+ var p = this, g = [0], l = [], _ = [null], t = [], O1 = this.table, e = "", v = 0, Rt = 0, zt = 2, Nt = 1, jt = t.slice.call(arguments, 1), U = Object.create(this.lexer), m1 = { yy: {} };
953
+ for (var Z1 in this.yy)
954
+ Object.prototype.hasOwnProperty.call(this.yy, Z1) && (m1.yy[Z1] = this.yy[Z1]);
955
+ U.setInput(h, m1.yy), m1.yy.lexer = U, m1.yy.parser = this, typeof U.yylloc > "u" && (U.yylloc = {});
956
+ var $1 = U.yylloc;
957
+ t.push($1);
958
+ var Kt = U.options && U.options.ranges;
959
+ typeof m1.yy.parseError == "function" ? this.parseError = m1.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
960
+ function Yt(X) {
961
+ g.length = g.length - 2 * X, _.length = _.length - X, t.length = t.length - X;
962
+ }
963
+ m(Yt, "popStack");
964
+ function Gt() {
965
+ var X;
966
+ return X = l.pop() || U.lex() || Nt, typeof X != "number" && (X instanceof Array && (l = X, X = l.pop()), X = p.symbols_[X] || X), X;
967
+ }
968
+ m(Gt, "lex");
969
+ for (var Y, C1, Q, tt, G1 = {}, H1, d1, Pt, X1; ; ) {
970
+ if (C1 = g[g.length - 1], this.defaultActions[C1] ? Q = this.defaultActions[C1] : ((Y === null || typeof Y > "u") && (Y = Gt()), Q = O1[C1] && O1[C1][Y]), typeof Q > "u" || !Q.length || !Q[0]) {
971
+ var et = "";
972
+ X1 = [];
973
+ for (H1 in O1[C1])
974
+ this.terminals_[H1] && H1 > zt && X1.push("'" + this.terminals_[H1] + "'");
975
+ U.showPosition ? et = "Parse error on line " + (v + 1) + `:
976
+ ` + U.showPosition() + `
977
+ Expecting ` + X1.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : et = "Parse error on line " + (v + 1) + ": Unexpected " + (Y == Nt ? "end of input" : "'" + (this.terminals_[Y] || Y) + "'"), this.parseError(et, {
978
+ text: U.match,
979
+ token: this.terminals_[Y] || Y,
980
+ line: U.yylineno,
981
+ loc: $1,
982
+ expected: X1
983
+ });
984
+ }
985
+ if (Q[0] instanceof Array && Q.length > 1)
986
+ throw new Error("Parse Error: multiple actions possible at state: " + C1 + ", token: " + Y);
987
+ switch (Q[0]) {
988
+ case 1:
989
+ g.push(Y), _.push(U.yytext), t.push(U.yylloc), g.push(Q[1]), Y = null, Rt = U.yyleng, e = U.yytext, v = U.yylineno, $1 = U.yylloc;
990
+ break;
991
+ case 2:
992
+ if (d1 = this.productions_[Q[1]][1], G1.$ = _[_.length - d1], G1._$ = {
993
+ first_line: t[t.length - (d1 || 1)].first_line,
994
+ last_line: t[t.length - 1].last_line,
995
+ first_column: t[t.length - (d1 || 1)].first_column,
996
+ last_column: t[t.length - 1].last_column
997
+ }, Kt && (G1._$.range = [
998
+ t[t.length - (d1 || 1)].range[0],
999
+ t[t.length - 1].range[1]
1000
+ ]), tt = this.performAction.apply(G1, [
1001
+ e,
1002
+ Rt,
1003
+ v,
1004
+ m1.yy,
1005
+ Q[1],
1006
+ _,
1007
+ t
1008
+ ].concat(jt)), typeof tt < "u")
1009
+ return tt;
1010
+ d1 && (g = g.slice(0, -1 * d1 * 2), _ = _.slice(0, -1 * d1), t = t.slice(0, -1 * d1)), g.push(this.productions_[Q[1]][0]), _.push(G1.$), t.push(G1._$), Pt = O1[g[g.length - 2]][g[g.length - 1]], g.push(Pt);
1011
+ break;
1012
+ case 3:
1013
+ return !0;
1014
+ }
1015
+ }
1016
+ return !0;
1017
+ }, "parse")
1018
+ }, Wt = /* @__PURE__ */ function() {
1019
+ var g1 = {
1020
+ EOF: 1,
1021
+ parseError: /* @__PURE__ */ m(function(p, g) {
1022
+ if (this.yy.parser)
1023
+ this.yy.parser.parseError(p, g);
1024
+ else
1025
+ throw new Error(p);
1026
+ }, "parseError"),
1027
+ // resets the lexer, sets new input
1028
+ setInput: /* @__PURE__ */ m(function(h, p) {
1029
+ return this.yy = p || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1030
+ first_line: 1,
1031
+ first_column: 0,
1032
+ last_line: 1,
1033
+ last_column: 0
1034
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1035
+ }, "setInput"),
1036
+ // consumes and returns one char from the input
1037
+ input: /* @__PURE__ */ m(function() {
1038
+ var h = this._input[0];
1039
+ this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
1040
+ var p = h.match(/(?:\r\n?|\n).*/g);
1041
+ return p ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
1042
+ }, "input"),
1043
+ // unshifts one char (or a string) into the input
1044
+ unput: /* @__PURE__ */ m(function(h) {
1045
+ var p = h.length, g = h.split(/(?:\r\n?|\n)/g);
1046
+ this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - p), this.offset -= p;
1047
+ var l = this.match.split(/(?:\r\n?|\n)/g);
1048
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), g.length - 1 && (this.yylineno -= g.length - 1);
1049
+ var _ = this.yylloc.range;
1050
+ return this.yylloc = {
1051
+ first_line: this.yylloc.first_line,
1052
+ last_line: this.yylineno + 1,
1053
+ first_column: this.yylloc.first_column,
1054
+ last_column: g ? (g.length === l.length ? this.yylloc.first_column : 0) + l[l.length - g.length].length - g[0].length : this.yylloc.first_column - p
1055
+ }, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - p]), this.yyleng = this.yytext.length, this;
1056
+ }, "unput"),
1057
+ // When called from action, caches matched text and appends it on next action
1058
+ more: /* @__PURE__ */ m(function() {
1059
+ return this._more = !0, this;
1060
+ }, "more"),
1061
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
1062
+ reject: /* @__PURE__ */ m(function() {
1063
+ if (this.options.backtrack_lexer)
1064
+ this._backtrack = !0;
1065
+ else
1066
+ return 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).
1067
+ ` + this.showPosition(), {
1068
+ text: "",
1069
+ token: null,
1070
+ line: this.yylineno
1071
+ });
1072
+ return this;
1073
+ }, "reject"),
1074
+ // retain first n characters of the match
1075
+ less: /* @__PURE__ */ m(function(h) {
1076
+ this.unput(this.match.slice(h));
1077
+ }, "less"),
1078
+ // displays already matched input, i.e. for error messages
1079
+ pastInput: /* @__PURE__ */ m(function() {
1080
+ var h = this.matched.substr(0, this.matched.length - this.match.length);
1081
+ return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
1082
+ }, "pastInput"),
1083
+ // displays upcoming input, i.e. for error messages
1084
+ upcomingInput: /* @__PURE__ */ m(function() {
1085
+ var h = this.match;
1086
+ return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
1087
+ }, "upcomingInput"),
1088
+ // displays the character position where the lexing error occurred, i.e. for error messages
1089
+ showPosition: /* @__PURE__ */ m(function() {
1090
+ var h = this.pastInput(), p = new Array(h.length + 1).join("-");
1091
+ return h + this.upcomingInput() + `
1092
+ ` + p + "^";
1093
+ }, "showPosition"),
1094
+ // test the lexed token: return FALSE when not a match, otherwise return token
1095
+ test_match: /* @__PURE__ */ m(function(h, p) {
1096
+ var g, l, _;
1097
+ if (this.options.backtrack_lexer && (_ = {
1098
+ yylineno: this.yylineno,
1099
+ yylloc: {
1100
+ first_line: this.yylloc.first_line,
1101
+ last_line: this.last_line,
1102
+ first_column: this.yylloc.first_column,
1103
+ last_column: this.yylloc.last_column
1104
+ },
1105
+ yytext: this.yytext,
1106
+ match: this.match,
1107
+ matches: this.matches,
1108
+ matched: this.matched,
1109
+ yyleng: this.yyleng,
1110
+ offset: this.offset,
1111
+ _more: this._more,
1112
+ _input: this._input,
1113
+ yy: this.yy,
1114
+ conditionStack: this.conditionStack.slice(0),
1115
+ done: this.done
1116
+ }, this.options.ranges && (_.yylloc.range = this.yylloc.range.slice(0))), l = h[0].match(/(?:\r\n?|\n).*/g), l && (this.yylineno += l.length), this.yylloc = {
1117
+ first_line: this.yylloc.last_line,
1118
+ last_line: this.yylineno + 1,
1119
+ first_column: this.yylloc.last_column,
1120
+ last_column: l ? l[l.length - 1].length - l[l.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
1121
+ }, this.yytext += h[0], this.match += h[0], this.matches = h, 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(h[0].length), this.matched += h[0], g = this.performAction.call(this, this.yy, this, p, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), g)
1122
+ return g;
1123
+ if (this._backtrack) {
1124
+ for (var t in _)
1125
+ this[t] = _[t];
1126
+ return !1;
1127
+ }
1128
+ return !1;
1129
+ }, "test_match"),
1130
+ // return next match in input
1131
+ next: /* @__PURE__ */ m(function() {
1132
+ if (this.done)
1133
+ return this.EOF;
1134
+ this._input || (this.done = !0);
1135
+ var h, p, g, l;
1136
+ this._more || (this.yytext = "", this.match = "");
1137
+ for (var _ = this._currentRules(), t = 0; t < _.length; t++)
1138
+ if (g = this._input.match(this.rules[_[t]]), g && (!p || g[0].length > p[0].length)) {
1139
+ if (p = g, l = t, this.options.backtrack_lexer) {
1140
+ if (h = this.test_match(g, _[t]), h !== !1)
1141
+ return h;
1142
+ if (this._backtrack) {
1143
+ p = !1;
1144
+ continue;
1145
+ } else
1146
+ return !1;
1147
+ } else if (!this.options.flex)
1148
+ break;
1149
+ }
1150
+ return p ? (h = this.test_match(p, _[l]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
1151
+ ` + this.showPosition(), {
1152
+ text: "",
1153
+ token: null,
1154
+ line: this.yylineno
1155
+ });
1156
+ }, "next"),
1157
+ // return next match that has a token
1158
+ lex: /* @__PURE__ */ m(function() {
1159
+ var p = this.next();
1160
+ return p || this.lex();
1161
+ }, "lex"),
1162
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1163
+ begin: /* @__PURE__ */ m(function(p) {
1164
+ this.conditionStack.push(p);
1165
+ }, "begin"),
1166
+ // pop the previously active lexer condition state off the condition stack
1167
+ popState: /* @__PURE__ */ m(function() {
1168
+ var p = this.conditionStack.length - 1;
1169
+ return p > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1170
+ }, "popState"),
1171
+ // produce the lexer rule set which is active for the currently active lexer condition state
1172
+ _currentRules: /* @__PURE__ */ m(function() {
1173
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1174
+ }, "_currentRules"),
1175
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1176
+ topState: /* @__PURE__ */ m(function(p) {
1177
+ return p = this.conditionStack.length - 1 - Math.abs(p || 0), p >= 0 ? this.conditionStack[p] : "INITIAL";
1178
+ }, "topState"),
1179
+ // alias for begin(condition)
1180
+ pushState: /* @__PURE__ */ m(function(p) {
1181
+ this.begin(p);
1182
+ }, "pushState"),
1183
+ // return the number of states currently on the stack
1184
+ stateStackSize: /* @__PURE__ */ m(function() {
1185
+ return this.conditionStack.length;
1186
+ }, "stateStackSize"),
1187
+ options: {},
1188
+ performAction: /* @__PURE__ */ m(function(p, g, l, _) {
1189
+ switch (l) {
1190
+ case 0:
1191
+ return this.begin("acc_title"), 34;
1192
+ case 1:
1193
+ return this.popState(), "acc_title_value";
1194
+ case 2:
1195
+ return this.begin("acc_descr"), 36;
1196
+ case 3:
1197
+ return this.popState(), "acc_descr_value";
1198
+ case 4:
1199
+ this.begin("acc_descr_multiline");
1200
+ break;
1201
+ case 5:
1202
+ this.popState();
1203
+ break;
1204
+ case 6:
1205
+ return "acc_descr_multiline_value";
1206
+ case 7:
1207
+ return this.pushState("shapeData"), g.yytext = "", 40;
1208
+ case 8:
1209
+ return this.pushState("shapeDataStr"), 40;
1210
+ case 9:
1211
+ return this.popState(), 40;
1212
+ case 10:
1213
+ const t = /\n\s*/g;
1214
+ return g.yytext = g.yytext.replace(t, "<br/>"), 40;
1215
+ case 11:
1216
+ return 40;
1217
+ case 12:
1218
+ this.popState();
1219
+ break;
1220
+ case 13:
1221
+ this.begin("callbackname");
1222
+ break;
1223
+ case 14:
1224
+ this.popState();
1225
+ break;
1226
+ case 15:
1227
+ this.popState(), this.begin("callbackargs");
1228
+ break;
1229
+ case 16:
1230
+ return 95;
1231
+ case 17:
1232
+ this.popState();
1233
+ break;
1234
+ case 18:
1235
+ return 96;
1236
+ case 19:
1237
+ return "MD_STR";
1238
+ case 20:
1239
+ this.popState();
1240
+ break;
1241
+ case 21:
1242
+ this.begin("md_string");
1243
+ break;
1244
+ case 22:
1245
+ return "STR";
1246
+ case 23:
1247
+ this.popState();
1248
+ break;
1249
+ case 24:
1250
+ this.pushState("string");
1251
+ break;
1252
+ case 25:
1253
+ return 84;
1254
+ case 26:
1255
+ return 102;
1256
+ case 27:
1257
+ return 85;
1258
+ case 28:
1259
+ return 104;
1260
+ case 29:
1261
+ return 86;
1262
+ case 30:
1263
+ return 87;
1264
+ case 31:
1265
+ return 97;
1266
+ case 32:
1267
+ this.begin("click");
1268
+ break;
1269
+ case 33:
1270
+ this.popState();
1271
+ break;
1272
+ case 34:
1273
+ return 88;
1274
+ case 35:
1275
+ return p.lex.firstGraph() && this.begin("dir"), 12;
1276
+ case 36:
1277
+ return p.lex.firstGraph() && this.begin("dir"), 12;
1278
+ case 37:
1279
+ return p.lex.firstGraph() && this.begin("dir"), 12;
1280
+ case 38:
1281
+ return 27;
1282
+ case 39:
1283
+ return 32;
1284
+ case 40:
1285
+ return 98;
1286
+ case 41:
1287
+ return 98;
1288
+ case 42:
1289
+ return 98;
1290
+ case 43:
1291
+ return 98;
1292
+ case 44:
1293
+ return this.popState(), 13;
1294
+ case 45:
1295
+ return this.popState(), 14;
1296
+ case 46:
1297
+ return this.popState(), 14;
1298
+ case 47:
1299
+ return this.popState(), 14;
1300
+ case 48:
1301
+ return this.popState(), 14;
1302
+ case 49:
1303
+ return this.popState(), 14;
1304
+ case 50:
1305
+ return this.popState(), 14;
1306
+ case 51:
1307
+ return this.popState(), 14;
1308
+ case 52:
1309
+ return this.popState(), 14;
1310
+ case 53:
1311
+ return this.popState(), 14;
1312
+ case 54:
1313
+ return this.popState(), 14;
1314
+ case 55:
1315
+ return 121;
1316
+ case 56:
1317
+ return 122;
1318
+ case 57:
1319
+ return 123;
1320
+ case 58:
1321
+ return 124;
1322
+ case 59:
1323
+ return 78;
1324
+ case 60:
1325
+ return 105;
1326
+ case 61:
1327
+ return 111;
1328
+ case 62:
1329
+ return 46;
1330
+ case 63:
1331
+ return 60;
1332
+ case 64:
1333
+ return 44;
1334
+ case 65:
1335
+ return 8;
1336
+ case 66:
1337
+ return 106;
1338
+ case 67:
1339
+ return 115;
1340
+ case 68:
1341
+ return this.popState(), 77;
1342
+ case 69:
1343
+ return this.pushState("edgeText"), 75;
1344
+ case 70:
1345
+ return 119;
1346
+ case 71:
1347
+ return this.popState(), 77;
1348
+ case 72:
1349
+ return this.pushState("thickEdgeText"), 75;
1350
+ case 73:
1351
+ return 119;
1352
+ case 74:
1353
+ return this.popState(), 77;
1354
+ case 75:
1355
+ return this.pushState("dottedEdgeText"), 75;
1356
+ case 76:
1357
+ return 119;
1358
+ case 77:
1359
+ return 77;
1360
+ case 78:
1361
+ return this.popState(), 53;
1362
+ case 79:
1363
+ return "TEXT";
1364
+ case 80:
1365
+ return this.pushState("ellipseText"), 52;
1366
+ case 81:
1367
+ return this.popState(), 55;
1368
+ case 82:
1369
+ return this.pushState("text"), 54;
1370
+ case 83:
1371
+ return this.popState(), 57;
1372
+ case 84:
1373
+ return this.pushState("text"), 56;
1374
+ case 85:
1375
+ return 58;
1376
+ case 86:
1377
+ return this.pushState("text"), 67;
1378
+ case 87:
1379
+ return this.popState(), 64;
1380
+ case 88:
1381
+ return this.pushState("text"), 63;
1382
+ case 89:
1383
+ return this.popState(), 49;
1384
+ case 90:
1385
+ return this.pushState("text"), 48;
1386
+ case 91:
1387
+ return this.popState(), 69;
1388
+ case 92:
1389
+ return this.popState(), 71;
1390
+ case 93:
1391
+ return 117;
1392
+ case 94:
1393
+ return this.pushState("trapText"), 68;
1394
+ case 95:
1395
+ return this.pushState("trapText"), 70;
1396
+ case 96:
1397
+ return 118;
1398
+ case 97:
1399
+ return 67;
1400
+ case 98:
1401
+ return 90;
1402
+ case 99:
1403
+ return "SEP";
1404
+ case 100:
1405
+ return 89;
1406
+ case 101:
1407
+ return 115;
1408
+ case 102:
1409
+ return 111;
1410
+ case 103:
1411
+ return 44;
1412
+ case 104:
1413
+ return 109;
1414
+ case 105:
1415
+ return 114;
1416
+ case 106:
1417
+ return 116;
1418
+ case 107:
1419
+ return this.popState(), 62;
1420
+ case 108:
1421
+ return this.pushState("text"), 62;
1422
+ case 109:
1423
+ return this.popState(), 51;
1424
+ case 110:
1425
+ return this.pushState("text"), 50;
1426
+ case 111:
1427
+ return this.popState(), 31;
1428
+ case 112:
1429
+ return this.pushState("text"), 29;
1430
+ case 113:
1431
+ return this.popState(), 66;
1432
+ case 114:
1433
+ return this.pushState("text"), 65;
1434
+ case 115:
1435
+ return "TEXT";
1436
+ case 116:
1437
+ return "QUOTE";
1438
+ case 117:
1439
+ return 9;
1440
+ case 118:
1441
+ return 10;
1442
+ case 119:
1443
+ return 11;
1444
+ }
1445
+ }, "anonymous"),
1446
+ rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:@\{)/, /^(?:["])/, /^(?:["])/, /^(?:[^\"]+)/, /^(?:[^}^"]+)/, /^(?:\})/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[^\s\"]+@(?=[^\{\"]))/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/],
1447
+ conditions: { shapeDataEndBracket: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, shapeDataStr: { rules: [9, 10, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, shapeData: { rules: [8, 11, 12, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, callbackargs: { rules: [17, 18, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, callbackname: { rules: [14, 15, 16, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, href: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, click: { rules: [21, 24, 33, 34, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, dottedEdgeText: { rules: [21, 24, 74, 76, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, thickEdgeText: { rules: [21, 24, 71, 73, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, edgeText: { rules: [21, 24, 68, 70, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, trapText: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 91, 92, 93, 94, 95, 108, 110, 112, 114], inclusive: !1 }, ellipseText: { rules: [21, 24, 77, 78, 79, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, text: { rules: [21, 24, 77, 80, 81, 82, 83, 84, 87, 88, 89, 90, 94, 95, 107, 108, 109, 110, 111, 112, 113, 114, 115], inclusive: !1 }, vertex: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, dir: { rules: [21, 24, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, acc_descr: { rules: [3, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, acc_title: { rules: [1, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, md_string: { rules: [19, 20, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, string: { rules: [21, 22, 23, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 13, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 74, 75, 77, 80, 82, 84, 85, 86, 88, 90, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 110, 112, 114, 116, 117, 118, 119], inclusive: !0 } }
1448
+ };
1449
+ return g1;
1450
+ }();
1451
+ J1.lexer = Wt;
1452
+ function q1() {
1453
+ this.yy = {};
1454
+ }
1455
+ return m(q1, "Parser"), q1.prototype = J1, J1.Parser = q1, new q1();
1456
+ }();
1457
+ rt.parser = rt;
1458
+ var Mt = rt, Ut = Object.assign({}, Mt);
1459
+ Ut.parse = (s) => {
1460
+ const i = s.replace(/}\s*\n/g, `}
1461
+ `);
1462
+ return Mt.parse(i);
1463
+ };
1464
+ var Ae = Ut, ke = /* @__PURE__ */ m((s, i) => {
1465
+ const a = he, n = a(s, "r"), u = a(s, "g"), o = a(s, "b");
1466
+ return oe(n, u, o, i);
1467
+ }, "fade"), me = /* @__PURE__ */ m((s) => `.label {
1468
+ font-family: ${s.fontFamily};
1469
+ color: ${s.nodeTextColor || s.textColor};
1470
+ }
1471
+ .cluster-label text {
1472
+ fill: ${s.titleColor};
1473
+ }
1474
+ .cluster-label span {
1475
+ color: ${s.titleColor};
1476
+ }
1477
+ .cluster-label span p {
1478
+ background-color: transparent;
1479
+ }
1480
+
1481
+ .label text,span {
1482
+ fill: ${s.nodeTextColor || s.textColor};
1483
+ color: ${s.nodeTextColor || s.textColor};
1484
+ }
1485
+
1486
+ .node rect,
1487
+ .node circle,
1488
+ .node ellipse,
1489
+ .node polygon,
1490
+ .node path {
1491
+ fill: ${s.mainBkg};
1492
+ stroke: ${s.nodeBorder};
1493
+ stroke-width: 1px;
1494
+ }
1495
+ .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
1496
+ text-anchor: middle;
1497
+ }
1498
+ // .flowchart-label .text-outer-tspan {
1499
+ // text-anchor: middle;
1500
+ // }
1501
+ // .flowchart-label .text-inner-tspan {
1502
+ // text-anchor: start;
1503
+ // }
1504
+
1505
+ .node .katex path {
1506
+ fill: #000;
1507
+ stroke: #000;
1508
+ stroke-width: 1px;
1509
+ }
1510
+
1511
+ .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
1512
+ text-align: center;
1513
+ }
1514
+ .node.clickable {
1515
+ cursor: pointer;
1516
+ }
1517
+
1518
+
1519
+ .root .anchor path {
1520
+ fill: ${s.lineColor} !important;
1521
+ stroke-width: 0;
1522
+ stroke: ${s.lineColor};
1523
+ }
1524
+
1525
+ .arrowheadPath {
1526
+ fill: ${s.arrowheadColor};
1527
+ }
1528
+
1529
+ .edgePath .path {
1530
+ stroke: ${s.lineColor};
1531
+ stroke-width: 2.0px;
1532
+ }
1533
+
1534
+ .flowchart-link {
1535
+ stroke: ${s.lineColor};
1536
+ fill: none;
1537
+ }
1538
+
1539
+ .edgeLabel {
1540
+ background-color: ${s.edgeLabelBackground};
1541
+ p {
1542
+ background-color: ${s.edgeLabelBackground};
1543
+ }
1544
+ rect {
1545
+ opacity: 0.5;
1546
+ background-color: ${s.edgeLabelBackground};
1547
+ fill: ${s.edgeLabelBackground};
1548
+ }
1549
+ text-align: center;
1550
+ }
1551
+
1552
+ /* For html labels only */
1553
+ .labelBkg {
1554
+ background-color: ${ke(s.edgeLabelBackground, 0.5)};
1555
+ // background-color:
1556
+ }
1557
+
1558
+ .cluster rect {
1559
+ fill: ${s.clusterBkg};
1560
+ stroke: ${s.clusterBorder};
1561
+ stroke-width: 1px;
1562
+ }
1563
+
1564
+ .cluster text {
1565
+ fill: ${s.titleColor};
1566
+ }
1567
+
1568
+ .cluster span {
1569
+ color: ${s.titleColor};
1570
+ }
1571
+ /* .cluster div {
1572
+ color: ${s.titleColor};
1573
+ } */
1574
+
1575
+ div.mermaidTooltip {
1576
+ position: absolute;
1577
+ text-align: center;
1578
+ max-width: 200px;
1579
+ padding: 2px;
1580
+ font-family: ${s.fontFamily};
1581
+ font-size: 12px;
1582
+ background: ${s.tertiaryColor};
1583
+ border: 1px solid ${s.border2};
1584
+ border-radius: 2px;
1585
+ pointer-events: none;
1586
+ z-index: 100;
1587
+ }
1588
+
1589
+ .flowchartTitleText {
1590
+ text-anchor: middle;
1591
+ font-size: 18px;
1592
+ fill: ${s.textColor};
1593
+ }
1594
+
1595
+ rect.text {
1596
+ fill: none;
1597
+ stroke-width: 0;
1598
+ }
1599
+
1600
+ .icon-shape, .image-shape {
1601
+ background-color: ${s.edgeLabelBackground};
1602
+ p {
1603
+ background-color: ${s.edgeLabelBackground};
1604
+ padding: 2px;
1605
+ }
1606
+ rect {
1607
+ opacity: 0.5;
1608
+ background-color: ${s.edgeLabelBackground};
1609
+ fill: ${s.edgeLabelBackground};
1610
+ }
1611
+ text-align: center;
1612
+ }
1613
+ ${qt()}
1614
+ `, "getStyles"), Ce = me, ye = {
1615
+ parser: Ae,
1616
+ get db() {
1617
+ return new pe();
1618
+ },
1619
+ renderer: be,
1620
+ styles: Ce,
1621
+ init: /* @__PURE__ */ m((s) => {
1622
+ s.flowchart || (s.flowchart = {}), s.layout && Ot({ layout: s.layout }), s.flowchart.arrowMarkerAbsolute = s.arrowMarkerAbsolute, Ot({ flowchart: { arrowMarkerAbsolute: s.arrowMarkerAbsolute } });
1623
+ }, "init")
1624
+ };
1625
+ export {
1626
+ ye as diagram
1627
+ };
src/backend/gradio_dropdownplus/templates/component/ganttDiagram-WV7ZQ7D5-P_-JzS6t.js ADDED
@@ -0,0 +1,2499 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { a_ as $e, a$ as Un, b0 as Je, b1 as Ke, b2 as tn, b3 as re, b4 as En, _ as h, g as Ln, s as An, q as In, p as Wn, a as On, b as Hn, c as _t, d as Zt, e as Nn, b5 as at, l as Qt, k as Vn, j as zn, y as Pn, u as Rn } from "./mermaid.core-DH6TRyjK.js";
2
+ import { c as Te, g as be } from "./Index-dsULWx_B.js";
3
+ import { b as Bn, t as Ie, c as Zn, a as qn, l as Gn } from "./linear-LzsmWjnq.js";
4
+ import { i as Xn } from "./init-DjUOC4st.js";
5
+ function jn(t, e) {
6
+ let n;
7
+ if (e === void 0)
8
+ for (const r of t)
9
+ r != null && (n < r || n === void 0 && r >= r) && (n = r);
10
+ else {
11
+ let r = -1;
12
+ for (let a of t)
13
+ (a = e(a, ++r, t)) != null && (n < a || n === void 0 && a >= a) && (n = a);
14
+ }
15
+ return n;
16
+ }
17
+ function Qn(t, e) {
18
+ let n;
19
+ if (e === void 0)
20
+ for (const r of t)
21
+ r != null && (n > r || n === void 0 && r >= r) && (n = r);
22
+ else {
23
+ let r = -1;
24
+ for (let a of t)
25
+ (a = e(a, ++r, t)) != null && (n > a || n === void 0 && a >= a) && (n = a);
26
+ }
27
+ return n;
28
+ }
29
+ function $n(t) {
30
+ return t;
31
+ }
32
+ var Gt = 1, ae = 2, me = 3, qt = 4, We = 1e-6;
33
+ function Jn(t) {
34
+ return "translate(" + t + ",0)";
35
+ }
36
+ function Kn(t) {
37
+ return "translate(0," + t + ")";
38
+ }
39
+ function tr(t) {
40
+ return (e) => +t(e);
41
+ }
42
+ function er(t, e) {
43
+ return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
44
+ }
45
+ function nr() {
46
+ return !this.__axis;
47
+ }
48
+ function en(t, e) {
49
+ var n = [], r = null, a = null, i = 6, s = 6, y = 3, _ = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, p = t === Gt || t === qt ? -1 : 1, g = t === qt || t === ae ? "x" : "y", E = t === Gt || t === me ? Jn : Kn;
50
+ function C(b) {
51
+ var G = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), O = a ?? (e.tickFormat ? e.tickFormat.apply(e, n) : $n), M = Math.max(i, 0) + y, I = e.range(), V = +I[0] + _, W = +I[I.length - 1] + _, Z = (e.bandwidth ? er : tr)(e.copy(), _), Q = b.selection ? b.selection() : b, D = Q.selectAll(".domain").data([null]), H = Q.selectAll(".tick").data(G, e).order(), x = H.exit(), Y = H.enter().append("g").attr("class", "tick"), F = H.select("line"), S = H.select("text");
52
+ D = D.merge(D.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), H = H.merge(Y), F = F.merge(Y.append("line").attr("stroke", "currentColor").attr(g + "2", p * i)), S = S.merge(Y.append("text").attr("fill", "currentColor").attr(g, p * M).attr("dy", t === Gt ? "0em" : t === me ? "0.71em" : "0.32em")), b !== Q && (D = D.transition(b), H = H.transition(b), F = F.transition(b), S = S.transition(b), x = x.transition(b).attr("opacity", We).attr("transform", function(v) {
53
+ return isFinite(v = Z(v)) ? E(v + _) : this.getAttribute("transform");
54
+ }), Y.attr("opacity", We).attr("transform", function(v) {
55
+ var U = this.parentNode.__axis;
56
+ return E((U && isFinite(U = U(v)) ? U : Z(v)) + _);
57
+ })), x.remove(), D.attr("d", t === qt || t === ae ? s ? "M" + p * s + "," + V + "H" + _ + "V" + W + "H" + p * s : "M" + _ + "," + V + "V" + W : s ? "M" + V + "," + p * s + "V" + _ + "H" + W + "V" + p * s : "M" + V + "," + _ + "H" + W), H.attr("opacity", 1).attr("transform", function(v) {
58
+ return E(Z(v) + _);
59
+ }), F.attr(g + "2", p * i), S.attr(g, p * M).text(O), Q.filter(nr).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === ae ? "start" : t === qt ? "end" : "middle"), Q.each(function() {
60
+ this.__axis = Z;
61
+ });
62
+ }
63
+ return C.scale = function(b) {
64
+ return arguments.length ? (e = b, C) : e;
65
+ }, C.ticks = function() {
66
+ return n = Array.from(arguments), C;
67
+ }, C.tickArguments = function(b) {
68
+ return arguments.length ? (n = b == null ? [] : Array.from(b), C) : n.slice();
69
+ }, C.tickValues = function(b) {
70
+ return arguments.length ? (r = b == null ? null : Array.from(b), C) : r && r.slice();
71
+ }, C.tickFormat = function(b) {
72
+ return arguments.length ? (a = b, C) : a;
73
+ }, C.tickSize = function(b) {
74
+ return arguments.length ? (i = s = +b, C) : i;
75
+ }, C.tickSizeInner = function(b) {
76
+ return arguments.length ? (i = +b, C) : i;
77
+ }, C.tickSizeOuter = function(b) {
78
+ return arguments.length ? (s = +b, C) : s;
79
+ }, C.tickPadding = function(b) {
80
+ return arguments.length ? (y = +b, C) : y;
81
+ }, C.offset = function(b) {
82
+ return arguments.length ? (_ = +b, C) : _;
83
+ }, C;
84
+ }
85
+ function rr(t) {
86
+ return en(Gt, t);
87
+ }
88
+ function ar(t) {
89
+ return en(me, t);
90
+ }
91
+ const ir = Math.PI / 180, sr = 180 / Math.PI, $t = 18, nn = 0.96422, rn = 1, an = 0.82521, sn = 4 / 29, St = 6 / 29, on = 3 * St * St, or = St * St * St;
92
+ function cn(t) {
93
+ if (t instanceof ft) return new ft(t.l, t.a, t.b, t.opacity);
94
+ if (t instanceof dt) return ln(t);
95
+ t instanceof $e || (t = Un(t));
96
+ var e = ce(t.r), n = ce(t.g), r = ce(t.b), a = ie((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / rn), i, s;
97
+ return e === n && n === r ? i = s = a : (i = ie((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / nn), s = ie((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / an)), new ft(116 * a - 16, 500 * (i - a), 200 * (a - s), t.opacity);
98
+ }
99
+ function cr(t, e, n, r) {
100
+ return arguments.length === 1 ? cn(t) : new ft(t, e, n, r ?? 1);
101
+ }
102
+ function ft(t, e, n, r) {
103
+ this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
104
+ }
105
+ Je(ft, cr, Ke(tn, {
106
+ brighter(t) {
107
+ return new ft(this.l + $t * (t ?? 1), this.a, this.b, this.opacity);
108
+ },
109
+ darker(t) {
110
+ return new ft(this.l - $t * (t ?? 1), this.a, this.b, this.opacity);
111
+ },
112
+ rgb() {
113
+ var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
114
+ return e = nn * se(e), t = rn * se(t), n = an * se(n), new $e(
115
+ oe(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
116
+ oe(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
117
+ oe(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
118
+ this.opacity
119
+ );
120
+ }
121
+ }));
122
+ function ie(t) {
123
+ return t > or ? Math.pow(t, 1 / 3) : t / on + sn;
124
+ }
125
+ function se(t) {
126
+ return t > St ? t * t * t : on * (t - sn);
127
+ }
128
+ function oe(t) {
129
+ return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
130
+ }
131
+ function ce(t) {
132
+ return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
133
+ }
134
+ function lr(t) {
135
+ if (t instanceof dt) return new dt(t.h, t.c, t.l, t.opacity);
136
+ if (t instanceof ft || (t = cn(t)), t.a === 0 && t.b === 0) return new dt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
137
+ var e = Math.atan2(t.b, t.a) * sr;
138
+ return new dt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
139
+ }
140
+ function ge(t, e, n, r) {
141
+ return arguments.length === 1 ? lr(t) : new dt(t, e, n, r ?? 1);
142
+ }
143
+ function dt(t, e, n, r) {
144
+ this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
145
+ }
146
+ function ln(t) {
147
+ if (isNaN(t.h)) return new ft(t.l, 0, 0, t.opacity);
148
+ var e = t.h * ir;
149
+ return new ft(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
150
+ }
151
+ Je(dt, ge, Ke(tn, {
152
+ brighter(t) {
153
+ return new dt(this.h, this.c, this.l + $t * (t ?? 1), this.opacity);
154
+ },
155
+ darker(t) {
156
+ return new dt(this.h, this.c, this.l - $t * (t ?? 1), this.opacity);
157
+ },
158
+ rgb() {
159
+ return ln(this).rgb();
160
+ }
161
+ }));
162
+ function ur(t) {
163
+ return function(e, n) {
164
+ var r = t((e = ge(e)).h, (n = ge(n)).h), a = re(e.c, n.c), i = re(e.l, n.l), s = re(e.opacity, n.opacity);
165
+ return function(y) {
166
+ return e.h = r(y), e.c = a(y), e.l = i(y), e.opacity = s(y), e + "";
167
+ };
168
+ };
169
+ }
170
+ const fr = ur(En);
171
+ function hr(t, e) {
172
+ t = t.slice();
173
+ var n = 0, r = t.length - 1, a = t[n], i = t[r], s;
174
+ return i < a && (s = n, n = r, r = s, s = a, a = i, i = s), t[n] = e.floor(a), t[r] = e.ceil(i), t;
175
+ }
176
+ const le = /* @__PURE__ */ new Date(), ue = /* @__PURE__ */ new Date();
177
+ function et(t, e, n, r) {
178
+ function a(i) {
179
+ return t(i = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+i)), i;
180
+ }
181
+ return a.floor = (i) => (t(i = /* @__PURE__ */ new Date(+i)), i), a.ceil = (i) => (t(i = new Date(i - 1)), e(i, 1), t(i), i), a.round = (i) => {
182
+ const s = a(i), y = a.ceil(i);
183
+ return i - s < y - i ? s : y;
184
+ }, a.offset = (i, s) => (e(i = /* @__PURE__ */ new Date(+i), s == null ? 1 : Math.floor(s)), i), a.range = (i, s, y) => {
185
+ const _ = [];
186
+ if (i = a.ceil(i), y = y == null ? 1 : Math.floor(y), !(i < s) || !(y > 0)) return _;
187
+ let p;
188
+ do
189
+ _.push(p = /* @__PURE__ */ new Date(+i)), e(i, y), t(i);
190
+ while (p < i && i < s);
191
+ return _;
192
+ }, a.filter = (i) => et((s) => {
193
+ if (s >= s) for (; t(s), !i(s); ) s.setTime(s - 1);
194
+ }, (s, y) => {
195
+ if (s >= s)
196
+ if (y < 0) for (; ++y <= 0; )
197
+ for (; e(s, -1), !i(s); )
198
+ ;
199
+ else for (; --y >= 0; )
200
+ for (; e(s, 1), !i(s); )
201
+ ;
202
+ }), n && (a.count = (i, s) => (le.setTime(+i), ue.setTime(+s), t(le), t(ue), Math.floor(n(le, ue))), a.every = (i) => (i = Math.floor(i), !isFinite(i) || !(i > 0) ? null : i > 1 ? a.filter(r ? (s) => r(s) % i === 0 : (s) => a.count(0, s) % i === 0) : a)), a;
203
+ }
204
+ const Yt = et(() => {
205
+ }, (t, e) => {
206
+ t.setTime(+t + e);
207
+ }, (t, e) => e - t);
208
+ Yt.every = (t) => (t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? et((e) => {
209
+ e.setTime(Math.floor(e / t) * t);
210
+ }, (e, n) => {
211
+ e.setTime(+e + n * t);
212
+ }, (e, n) => (n - e) / t) : Yt);
213
+ Yt.range;
214
+ const mt = 1e3, ct = mt * 60, gt = ct * 60, yt = gt * 24, xe = yt * 7, Oe = yt * 30, fe = yt * 365, vt = et((t) => {
215
+ t.setTime(t - t.getMilliseconds());
216
+ }, (t, e) => {
217
+ t.setTime(+t + e * mt);
218
+ }, (t, e) => (e - t) / mt, (t) => t.getUTCSeconds());
219
+ vt.range;
220
+ const Wt = et((t) => {
221
+ t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt);
222
+ }, (t, e) => {
223
+ t.setTime(+t + e * ct);
224
+ }, (t, e) => (e - t) / ct, (t) => t.getMinutes());
225
+ Wt.range;
226
+ const dr = et((t) => {
227
+ t.setUTCSeconds(0, 0);
228
+ }, (t, e) => {
229
+ t.setTime(+t + e * ct);
230
+ }, (t, e) => (e - t) / ct, (t) => t.getUTCMinutes());
231
+ dr.range;
232
+ const Ot = et((t) => {
233
+ t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt - t.getMinutes() * ct);
234
+ }, (t, e) => {
235
+ t.setTime(+t + e * gt);
236
+ }, (t, e) => (e - t) / gt, (t) => t.getHours());
237
+ Ot.range;
238
+ const mr = et((t) => {
239
+ t.setUTCMinutes(0, 0, 0);
240
+ }, (t, e) => {
241
+ t.setTime(+t + e * gt);
242
+ }, (t, e) => (e - t) / gt, (t) => t.getUTCHours());
243
+ mr.range;
244
+ const Tt = et(
245
+ (t) => t.setHours(0, 0, 0, 0),
246
+ (t, e) => t.setDate(t.getDate() + e),
247
+ (t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * ct) / yt,
248
+ (t) => t.getDate() - 1
249
+ );
250
+ Tt.range;
251
+ const we = et((t) => {
252
+ t.setUTCHours(0, 0, 0, 0);
253
+ }, (t, e) => {
254
+ t.setUTCDate(t.getUTCDate() + e);
255
+ }, (t, e) => (e - t) / yt, (t) => t.getUTCDate() - 1);
256
+ we.range;
257
+ const gr = et((t) => {
258
+ t.setUTCHours(0, 0, 0, 0);
259
+ }, (t, e) => {
260
+ t.setUTCDate(t.getUTCDate() + e);
261
+ }, (t, e) => (e - t) / yt, (t) => Math.floor(t / yt));
262
+ gr.range;
263
+ function wt(t) {
264
+ return et((e) => {
265
+ e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
266
+ }, (e, n) => {
267
+ e.setDate(e.getDate() + n * 7);
268
+ }, (e, n) => (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * ct) / xe);
269
+ }
270
+ const Vt = wt(0), Ht = wt(1), un = wt(2), fn = wt(3), bt = wt(4), hn = wt(5), dn = wt(6);
271
+ Vt.range;
272
+ Ht.range;
273
+ un.range;
274
+ fn.range;
275
+ bt.range;
276
+ hn.range;
277
+ dn.range;
278
+ function Dt(t) {
279
+ return et((e) => {
280
+ e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
281
+ }, (e, n) => {
282
+ e.setUTCDate(e.getUTCDate() + n * 7);
283
+ }, (e, n) => (n - e) / xe);
284
+ }
285
+ const mn = Dt(0), Jt = Dt(1), yr = Dt(2), kr = Dt(3), Ut = Dt(4), pr = Dt(5), vr = Dt(6);
286
+ mn.range;
287
+ Jt.range;
288
+ yr.range;
289
+ kr.range;
290
+ Ut.range;
291
+ pr.range;
292
+ vr.range;
293
+ const Nt = et((t) => {
294
+ t.setDate(1), t.setHours(0, 0, 0, 0);
295
+ }, (t, e) => {
296
+ t.setMonth(t.getMonth() + e);
297
+ }, (t, e) => e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12, (t) => t.getMonth());
298
+ Nt.range;
299
+ const Tr = et((t) => {
300
+ t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
301
+ }, (t, e) => {
302
+ t.setUTCMonth(t.getUTCMonth() + e);
303
+ }, (t, e) => e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12, (t) => t.getUTCMonth());
304
+ Tr.range;
305
+ const kt = et((t) => {
306
+ t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
307
+ }, (t, e) => {
308
+ t.setFullYear(t.getFullYear() + e);
309
+ }, (t, e) => e.getFullYear() - t.getFullYear(), (t) => t.getFullYear());
310
+ kt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
311
+ e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
312
+ }, (e, n) => {
313
+ e.setFullYear(e.getFullYear() + n * t);
314
+ });
315
+ kt.range;
316
+ const xt = et((t) => {
317
+ t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
318
+ }, (t, e) => {
319
+ t.setUTCFullYear(t.getUTCFullYear() + e);
320
+ }, (t, e) => e.getUTCFullYear() - t.getUTCFullYear(), (t) => t.getUTCFullYear());
321
+ xt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
322
+ e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
323
+ }, (e, n) => {
324
+ e.setUTCFullYear(e.getUTCFullYear() + n * t);
325
+ });
326
+ xt.range;
327
+ function br(t, e, n, r, a, i) {
328
+ const s = [
329
+ [vt, 1, mt],
330
+ [vt, 5, 5 * mt],
331
+ [vt, 15, 15 * mt],
332
+ [vt, 30, 30 * mt],
333
+ [i, 1, ct],
334
+ [i, 5, 5 * ct],
335
+ [i, 15, 15 * ct],
336
+ [i, 30, 30 * ct],
337
+ [a, 1, gt],
338
+ [a, 3, 3 * gt],
339
+ [a, 6, 6 * gt],
340
+ [a, 12, 12 * gt],
341
+ [r, 1, yt],
342
+ [r, 2, 2 * yt],
343
+ [n, 1, xe],
344
+ [e, 1, Oe],
345
+ [e, 3, 3 * Oe],
346
+ [t, 1, fe]
347
+ ];
348
+ function y(p, g, E) {
349
+ const C = g < p;
350
+ C && ([p, g] = [g, p]);
351
+ const b = E && typeof E.range == "function" ? E : _(p, g, E), G = b ? b.range(p, +g + 1) : [];
352
+ return C ? G.reverse() : G;
353
+ }
354
+ function _(p, g, E) {
355
+ const C = Math.abs(g - p) / E, b = Bn(([, , M]) => M).right(s, C);
356
+ if (b === s.length) return t.every(Ie(p / fe, g / fe, E));
357
+ if (b === 0) return Yt.every(Math.max(Ie(p, g, E), 1));
358
+ const [G, O] = s[C / s[b - 1][2] < s[b][2] / C ? b - 1 : b];
359
+ return G.every(O);
360
+ }
361
+ return [y, _];
362
+ }
363
+ const [xr, wr] = br(kt, Nt, Vt, Tt, Ot, Wt);
364
+ function he(t) {
365
+ if (0 <= t.y && t.y < 100) {
366
+ var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
367
+ return e.setFullYear(t.y), e;
368
+ }
369
+ return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
370
+ }
371
+ function de(t) {
372
+ if (0 <= t.y && t.y < 100) {
373
+ var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
374
+ return e.setUTCFullYear(t.y), e;
375
+ }
376
+ return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
377
+ }
378
+ function Lt(t, e, n) {
379
+ return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 };
380
+ }
381
+ function Dr(t) {
382
+ var e = t.dateTime, n = t.date, r = t.time, a = t.periods, i = t.days, s = t.shortDays, y = t.months, _ = t.shortMonths, p = At(a), g = It(a), E = At(i), C = It(i), b = At(s), G = It(s), O = At(y), M = It(y), I = At(_), V = It(_), W = {
383
+ a: d,
384
+ A: w,
385
+ b: c,
386
+ B: l,
387
+ c: null,
388
+ d: Re,
389
+ e: Re,
390
+ f: Gr,
391
+ g: ra,
392
+ G: ia,
393
+ H: Br,
394
+ I: Zr,
395
+ j: qr,
396
+ L: gn,
397
+ m: Xr,
398
+ M: jr,
399
+ p: o,
400
+ q: P,
401
+ Q: qe,
402
+ s: Ge,
403
+ S: Qr,
404
+ u: $r,
405
+ U: Jr,
406
+ V: Kr,
407
+ w: ta,
408
+ W: ea,
409
+ x: null,
410
+ X: null,
411
+ y: na,
412
+ Y: aa,
413
+ Z: sa,
414
+ "%": Ze
415
+ }, Z = {
416
+ a: z,
417
+ A: R,
418
+ b: K,
419
+ B: X,
420
+ c: null,
421
+ d: Be,
422
+ e: Be,
423
+ f: ua,
424
+ g: Ta,
425
+ G: xa,
426
+ H: oa,
427
+ I: ca,
428
+ j: la,
429
+ L: kn,
430
+ m: fa,
431
+ M: ha,
432
+ p: $,
433
+ q: it,
434
+ Q: qe,
435
+ s: Ge,
436
+ S: da,
437
+ u: ma,
438
+ U: ga,
439
+ V: ya,
440
+ w: ka,
441
+ W: pa,
442
+ x: null,
443
+ X: null,
444
+ y: va,
445
+ Y: ba,
446
+ Z: wa,
447
+ "%": Ze
448
+ }, Q = {
449
+ a: F,
450
+ A: S,
451
+ b: v,
452
+ B: U,
453
+ c: u,
454
+ d: ze,
455
+ e: ze,
456
+ f: Vr,
457
+ g: Ve,
458
+ G: Ne,
459
+ H: Pe,
460
+ I: Pe,
461
+ j: Wr,
462
+ L: Nr,
463
+ m: Ir,
464
+ M: Or,
465
+ p: Y,
466
+ q: Ar,
467
+ Q: Pr,
468
+ s: Rr,
469
+ S: Hr,
470
+ u: Fr,
471
+ U: Yr,
472
+ V: Ur,
473
+ w: Sr,
474
+ W: Er,
475
+ x: m,
476
+ X: T,
477
+ y: Ve,
478
+ Y: Ne,
479
+ Z: Lr,
480
+ "%": zr
481
+ };
482
+ W.x = D(n, W), W.X = D(r, W), W.c = D(e, W), Z.x = D(n, Z), Z.X = D(r, Z), Z.c = D(e, Z);
483
+ function D(k, A) {
484
+ return function(N) {
485
+ var f = [], J = -1, L = 0, j = k.length, q, rt, st;
486
+ for (N instanceof Date || (N = /* @__PURE__ */ new Date(+N)); ++J < j; )
487
+ k.charCodeAt(J) === 37 && (f.push(k.slice(L, J)), (rt = He[q = k.charAt(++J)]) != null ? q = k.charAt(++J) : rt = q === "e" ? " " : "0", (st = A[q]) && (q = st(N, rt)), f.push(q), L = J + 1);
488
+ return f.push(k.slice(L, J)), f.join("");
489
+ };
490
+ }
491
+ function H(k, A) {
492
+ return function(N) {
493
+ var f = Lt(1900, void 0, 1), J = x(f, k, N += "", 0), L, j;
494
+ if (J != N.length) return null;
495
+ if ("Q" in f) return new Date(f.Q);
496
+ if ("s" in f) return new Date(f.s * 1e3 + ("L" in f ? f.L : 0));
497
+ if (A && !("Z" in f) && (f.Z = 0), "p" in f && (f.H = f.H % 12 + f.p * 12), f.m === void 0 && (f.m = "q" in f ? f.q : 0), "V" in f) {
498
+ if (f.V < 1 || f.V > 53) return null;
499
+ "w" in f || (f.w = 1), "Z" in f ? (L = de(Lt(f.y, 0, 1)), j = L.getUTCDay(), L = j > 4 || j === 0 ? Jt.ceil(L) : Jt(L), L = we.offset(L, (f.V - 1) * 7), f.y = L.getUTCFullYear(), f.m = L.getUTCMonth(), f.d = L.getUTCDate() + (f.w + 6) % 7) : (L = he(Lt(f.y, 0, 1)), j = L.getDay(), L = j > 4 || j === 0 ? Ht.ceil(L) : Ht(L), L = Tt.offset(L, (f.V - 1) * 7), f.y = L.getFullYear(), f.m = L.getMonth(), f.d = L.getDate() + (f.w + 6) % 7);
500
+ } else ("W" in f || "U" in f) && ("w" in f || (f.w = "u" in f ? f.u % 7 : "W" in f ? 1 : 0), j = "Z" in f ? de(Lt(f.y, 0, 1)).getUTCDay() : he(Lt(f.y, 0, 1)).getDay(), f.m = 0, f.d = "W" in f ? (f.w + 6) % 7 + f.W * 7 - (j + 5) % 7 : f.w + f.U * 7 - (j + 6) % 7);
501
+ return "Z" in f ? (f.H += f.Z / 100 | 0, f.M += f.Z % 100, de(f)) : he(f);
502
+ };
503
+ }
504
+ function x(k, A, N, f) {
505
+ for (var J = 0, L = A.length, j = N.length, q, rt; J < L; ) {
506
+ if (f >= j) return -1;
507
+ if (q = A.charCodeAt(J++), q === 37) {
508
+ if (q = A.charAt(J++), rt = Q[q in He ? A.charAt(J++) : q], !rt || (f = rt(k, N, f)) < 0) return -1;
509
+ } else if (q != N.charCodeAt(f++))
510
+ return -1;
511
+ }
512
+ return f;
513
+ }
514
+ function Y(k, A, N) {
515
+ var f = p.exec(A.slice(N));
516
+ return f ? (k.p = g.get(f[0].toLowerCase()), N + f[0].length) : -1;
517
+ }
518
+ function F(k, A, N) {
519
+ var f = b.exec(A.slice(N));
520
+ return f ? (k.w = G.get(f[0].toLowerCase()), N + f[0].length) : -1;
521
+ }
522
+ function S(k, A, N) {
523
+ var f = E.exec(A.slice(N));
524
+ return f ? (k.w = C.get(f[0].toLowerCase()), N + f[0].length) : -1;
525
+ }
526
+ function v(k, A, N) {
527
+ var f = I.exec(A.slice(N));
528
+ return f ? (k.m = V.get(f[0].toLowerCase()), N + f[0].length) : -1;
529
+ }
530
+ function U(k, A, N) {
531
+ var f = O.exec(A.slice(N));
532
+ return f ? (k.m = M.get(f[0].toLowerCase()), N + f[0].length) : -1;
533
+ }
534
+ function u(k, A, N) {
535
+ return x(k, e, A, N);
536
+ }
537
+ function m(k, A, N) {
538
+ return x(k, n, A, N);
539
+ }
540
+ function T(k, A, N) {
541
+ return x(k, r, A, N);
542
+ }
543
+ function d(k) {
544
+ return s[k.getDay()];
545
+ }
546
+ function w(k) {
547
+ return i[k.getDay()];
548
+ }
549
+ function c(k) {
550
+ return _[k.getMonth()];
551
+ }
552
+ function l(k) {
553
+ return y[k.getMonth()];
554
+ }
555
+ function o(k) {
556
+ return a[+(k.getHours() >= 12)];
557
+ }
558
+ function P(k) {
559
+ return 1 + ~~(k.getMonth() / 3);
560
+ }
561
+ function z(k) {
562
+ return s[k.getUTCDay()];
563
+ }
564
+ function R(k) {
565
+ return i[k.getUTCDay()];
566
+ }
567
+ function K(k) {
568
+ return _[k.getUTCMonth()];
569
+ }
570
+ function X(k) {
571
+ return y[k.getUTCMonth()];
572
+ }
573
+ function $(k) {
574
+ return a[+(k.getUTCHours() >= 12)];
575
+ }
576
+ function it(k) {
577
+ return 1 + ~~(k.getUTCMonth() / 3);
578
+ }
579
+ return {
580
+ format: function(k) {
581
+ var A = D(k += "", W);
582
+ return A.toString = function() {
583
+ return k;
584
+ }, A;
585
+ },
586
+ parse: function(k) {
587
+ var A = H(k += "", !1);
588
+ return A.toString = function() {
589
+ return k;
590
+ }, A;
591
+ },
592
+ utcFormat: function(k) {
593
+ var A = D(k += "", Z);
594
+ return A.toString = function() {
595
+ return k;
596
+ }, A;
597
+ },
598
+ utcParse: function(k) {
599
+ var A = H(k += "", !0);
600
+ return A.toString = function() {
601
+ return k;
602
+ }, A;
603
+ }
604
+ };
605
+ }
606
+ var He = { "-": "", _: " ", 0: "0" }, nt = /^\s*\d+/, Cr = /^%/, Mr = /[\\^$*+?|[\]().{}]/g;
607
+ function B(t, e, n) {
608
+ var r = t < 0 ? "-" : "", a = (r ? -t : t) + "", i = a.length;
609
+ return r + (i < n ? new Array(n - i + 1).join(e) + a : a);
610
+ }
611
+ function _r(t) {
612
+ return t.replace(Mr, "\\$&");
613
+ }
614
+ function At(t) {
615
+ return new RegExp("^(?:" + t.map(_r).join("|") + ")", "i");
616
+ }
617
+ function It(t) {
618
+ return new Map(t.map((e, n) => [e.toLowerCase(), n]));
619
+ }
620
+ function Sr(t, e, n) {
621
+ var r = nt.exec(e.slice(n, n + 1));
622
+ return r ? (t.w = +r[0], n + r[0].length) : -1;
623
+ }
624
+ function Fr(t, e, n) {
625
+ var r = nt.exec(e.slice(n, n + 1));
626
+ return r ? (t.u = +r[0], n + r[0].length) : -1;
627
+ }
628
+ function Yr(t, e, n) {
629
+ var r = nt.exec(e.slice(n, n + 2));
630
+ return r ? (t.U = +r[0], n + r[0].length) : -1;
631
+ }
632
+ function Ur(t, e, n) {
633
+ var r = nt.exec(e.slice(n, n + 2));
634
+ return r ? (t.V = +r[0], n + r[0].length) : -1;
635
+ }
636
+ function Er(t, e, n) {
637
+ var r = nt.exec(e.slice(n, n + 2));
638
+ return r ? (t.W = +r[0], n + r[0].length) : -1;
639
+ }
640
+ function Ne(t, e, n) {
641
+ var r = nt.exec(e.slice(n, n + 4));
642
+ return r ? (t.y = +r[0], n + r[0].length) : -1;
643
+ }
644
+ function Ve(t, e, n) {
645
+ var r = nt.exec(e.slice(n, n + 2));
646
+ return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
647
+ }
648
+ function Lr(t, e, n) {
649
+ var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6));
650
+ return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
651
+ }
652
+ function Ar(t, e, n) {
653
+ var r = nt.exec(e.slice(n, n + 1));
654
+ return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1;
655
+ }
656
+ function Ir(t, e, n) {
657
+ var r = nt.exec(e.slice(n, n + 2));
658
+ return r ? (t.m = r[0] - 1, n + r[0].length) : -1;
659
+ }
660
+ function ze(t, e, n) {
661
+ var r = nt.exec(e.slice(n, n + 2));
662
+ return r ? (t.d = +r[0], n + r[0].length) : -1;
663
+ }
664
+ function Wr(t, e, n) {
665
+ var r = nt.exec(e.slice(n, n + 3));
666
+ return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1;
667
+ }
668
+ function Pe(t, e, n) {
669
+ var r = nt.exec(e.slice(n, n + 2));
670
+ return r ? (t.H = +r[0], n + r[0].length) : -1;
671
+ }
672
+ function Or(t, e, n) {
673
+ var r = nt.exec(e.slice(n, n + 2));
674
+ return r ? (t.M = +r[0], n + r[0].length) : -1;
675
+ }
676
+ function Hr(t, e, n) {
677
+ var r = nt.exec(e.slice(n, n + 2));
678
+ return r ? (t.S = +r[0], n + r[0].length) : -1;
679
+ }
680
+ function Nr(t, e, n) {
681
+ var r = nt.exec(e.slice(n, n + 3));
682
+ return r ? (t.L = +r[0], n + r[0].length) : -1;
683
+ }
684
+ function Vr(t, e, n) {
685
+ var r = nt.exec(e.slice(n, n + 6));
686
+ return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
687
+ }
688
+ function zr(t, e, n) {
689
+ var r = Cr.exec(e.slice(n, n + 1));
690
+ return r ? n + r[0].length : -1;
691
+ }
692
+ function Pr(t, e, n) {
693
+ var r = nt.exec(e.slice(n));
694
+ return r ? (t.Q = +r[0], n + r[0].length) : -1;
695
+ }
696
+ function Rr(t, e, n) {
697
+ var r = nt.exec(e.slice(n));
698
+ return r ? (t.s = +r[0], n + r[0].length) : -1;
699
+ }
700
+ function Re(t, e) {
701
+ return B(t.getDate(), e, 2);
702
+ }
703
+ function Br(t, e) {
704
+ return B(t.getHours(), e, 2);
705
+ }
706
+ function Zr(t, e) {
707
+ return B(t.getHours() % 12 || 12, e, 2);
708
+ }
709
+ function qr(t, e) {
710
+ return B(1 + Tt.count(kt(t), t), e, 3);
711
+ }
712
+ function gn(t, e) {
713
+ return B(t.getMilliseconds(), e, 3);
714
+ }
715
+ function Gr(t, e) {
716
+ return gn(t, e) + "000";
717
+ }
718
+ function Xr(t, e) {
719
+ return B(t.getMonth() + 1, e, 2);
720
+ }
721
+ function jr(t, e) {
722
+ return B(t.getMinutes(), e, 2);
723
+ }
724
+ function Qr(t, e) {
725
+ return B(t.getSeconds(), e, 2);
726
+ }
727
+ function $r(t) {
728
+ var e = t.getDay();
729
+ return e === 0 ? 7 : e;
730
+ }
731
+ function Jr(t, e) {
732
+ return B(Vt.count(kt(t) - 1, t), e, 2);
733
+ }
734
+ function yn(t) {
735
+ var e = t.getDay();
736
+ return e >= 4 || e === 0 ? bt(t) : bt.ceil(t);
737
+ }
738
+ function Kr(t, e) {
739
+ return t = yn(t), B(bt.count(kt(t), t) + (kt(t).getDay() === 4), e, 2);
740
+ }
741
+ function ta(t) {
742
+ return t.getDay();
743
+ }
744
+ function ea(t, e) {
745
+ return B(Ht.count(kt(t) - 1, t), e, 2);
746
+ }
747
+ function na(t, e) {
748
+ return B(t.getFullYear() % 100, e, 2);
749
+ }
750
+ function ra(t, e) {
751
+ return t = yn(t), B(t.getFullYear() % 100, e, 2);
752
+ }
753
+ function aa(t, e) {
754
+ return B(t.getFullYear() % 1e4, e, 4);
755
+ }
756
+ function ia(t, e) {
757
+ var n = t.getDay();
758
+ return t = n >= 4 || n === 0 ? bt(t) : bt.ceil(t), B(t.getFullYear() % 1e4, e, 4);
759
+ }
760
+ function sa(t) {
761
+ var e = t.getTimezoneOffset();
762
+ return (e > 0 ? "-" : (e *= -1, "+")) + B(e / 60 | 0, "0", 2) + B(e % 60, "0", 2);
763
+ }
764
+ function Be(t, e) {
765
+ return B(t.getUTCDate(), e, 2);
766
+ }
767
+ function oa(t, e) {
768
+ return B(t.getUTCHours(), e, 2);
769
+ }
770
+ function ca(t, e) {
771
+ return B(t.getUTCHours() % 12 || 12, e, 2);
772
+ }
773
+ function la(t, e) {
774
+ return B(1 + we.count(xt(t), t), e, 3);
775
+ }
776
+ function kn(t, e) {
777
+ return B(t.getUTCMilliseconds(), e, 3);
778
+ }
779
+ function ua(t, e) {
780
+ return kn(t, e) + "000";
781
+ }
782
+ function fa(t, e) {
783
+ return B(t.getUTCMonth() + 1, e, 2);
784
+ }
785
+ function ha(t, e) {
786
+ return B(t.getUTCMinutes(), e, 2);
787
+ }
788
+ function da(t, e) {
789
+ return B(t.getUTCSeconds(), e, 2);
790
+ }
791
+ function ma(t) {
792
+ var e = t.getUTCDay();
793
+ return e === 0 ? 7 : e;
794
+ }
795
+ function ga(t, e) {
796
+ return B(mn.count(xt(t) - 1, t), e, 2);
797
+ }
798
+ function pn(t) {
799
+ var e = t.getUTCDay();
800
+ return e >= 4 || e === 0 ? Ut(t) : Ut.ceil(t);
801
+ }
802
+ function ya(t, e) {
803
+ return t = pn(t), B(Ut.count(xt(t), t) + (xt(t).getUTCDay() === 4), e, 2);
804
+ }
805
+ function ka(t) {
806
+ return t.getUTCDay();
807
+ }
808
+ function pa(t, e) {
809
+ return B(Jt.count(xt(t) - 1, t), e, 2);
810
+ }
811
+ function va(t, e) {
812
+ return B(t.getUTCFullYear() % 100, e, 2);
813
+ }
814
+ function Ta(t, e) {
815
+ return t = pn(t), B(t.getUTCFullYear() % 100, e, 2);
816
+ }
817
+ function ba(t, e) {
818
+ return B(t.getUTCFullYear() % 1e4, e, 4);
819
+ }
820
+ function xa(t, e) {
821
+ var n = t.getUTCDay();
822
+ return t = n >= 4 || n === 0 ? Ut(t) : Ut.ceil(t), B(t.getUTCFullYear() % 1e4, e, 4);
823
+ }
824
+ function wa() {
825
+ return "+0000";
826
+ }
827
+ function Ze() {
828
+ return "%";
829
+ }
830
+ function qe(t) {
831
+ return +t;
832
+ }
833
+ function Ge(t) {
834
+ return Math.floor(+t / 1e3);
835
+ }
836
+ var Mt, Kt;
837
+ Da({
838
+ dateTime: "%x, %X",
839
+ date: "%-m/%-d/%Y",
840
+ time: "%-I:%M:%S %p",
841
+ periods: ["AM", "PM"],
842
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
843
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
844
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
845
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
846
+ });
847
+ function Da(t) {
848
+ return Mt = Dr(t), Kt = Mt.format, Mt.parse, Mt.utcFormat, Mt.utcParse, Mt;
849
+ }
850
+ function Ca(t) {
851
+ return new Date(t);
852
+ }
853
+ function Ma(t) {
854
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
855
+ }
856
+ function vn(t, e, n, r, a, i, s, y, _, p) {
857
+ var g = Zn(), E = g.invert, C = g.domain, b = p(".%L"), G = p(":%S"), O = p("%I:%M"), M = p("%I %p"), I = p("%a %d"), V = p("%b %d"), W = p("%B"), Z = p("%Y");
858
+ function Q(D) {
859
+ return (_(D) < D ? b : y(D) < D ? G : s(D) < D ? O : i(D) < D ? M : r(D) < D ? a(D) < D ? I : V : n(D) < D ? W : Z)(D);
860
+ }
861
+ return g.invert = function(D) {
862
+ return new Date(E(D));
863
+ }, g.domain = function(D) {
864
+ return arguments.length ? C(Array.from(D, Ma)) : C().map(Ca);
865
+ }, g.ticks = function(D) {
866
+ var H = C();
867
+ return t(H[0], H[H.length - 1], D ?? 10);
868
+ }, g.tickFormat = function(D, H) {
869
+ return H == null ? Q : p(H);
870
+ }, g.nice = function(D) {
871
+ var H = C();
872
+ return (!D || typeof D.range != "function") && (D = e(H[0], H[H.length - 1], D ?? 10)), D ? C(hr(H, D)) : g;
873
+ }, g.copy = function() {
874
+ return qn(g, vn(t, e, n, r, a, i, s, y, _, p));
875
+ }, g;
876
+ }
877
+ function _a() {
878
+ return Xn.apply(vn(xr, wr, kt, Nt, Vt, Tt, Ot, Wt, vt, Kt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
879
+ }
880
+ var Tn = { exports: {} };
881
+ (function(t, e) {
882
+ (function(n, r) {
883
+ t.exports = r();
884
+ })(Te, function() {
885
+ var n = "day";
886
+ return function(r, a, i) {
887
+ var s = function(p) {
888
+ return p.add(4 - p.isoWeekday(), n);
889
+ }, y = a.prototype;
890
+ y.isoWeekYear = function() {
891
+ return s(this).year();
892
+ }, y.isoWeek = function(p) {
893
+ if (!this.$utils().u(p)) return this.add(7 * (p - this.isoWeek()), n);
894
+ var g, E, C, b, G = s(this), O = (g = this.isoWeekYear(), E = this.$u, C = (E ? i.utc : i)().year(g).startOf("year"), b = 4 - C.isoWeekday(), C.isoWeekday() > 4 && (b += 7), C.add(b, n));
895
+ return G.diff(O, "week") + 1;
896
+ }, y.isoWeekday = function(p) {
897
+ return this.$utils().u(p) ? this.day() || 7 : this.day(this.day() % 7 ? p : p - 7);
898
+ };
899
+ var _ = y.startOf;
900
+ y.startOf = function(p, g) {
901
+ var E = this.$utils(), C = !!E.u(g) || g;
902
+ return E.p(p) === "isoweek" ? C ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : _.bind(this)(p, g);
903
+ };
904
+ };
905
+ });
906
+ })(Tn);
907
+ var Sa = Tn.exports;
908
+ const Fa = /* @__PURE__ */ be(Sa);
909
+ var bn = { exports: {} };
910
+ (function(t, e) {
911
+ (function(n, r) {
912
+ t.exports = r();
913
+ })(Te, function() {
914
+ var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, a = /\d/, i = /\d\d/, s = /\d\d?/, y = /\d*[^-_:/,()\s\d]+/, _ = {}, p = function(M) {
915
+ return (M = +M) + (M > 68 ? 1900 : 2e3);
916
+ }, g = function(M) {
917
+ return function(I) {
918
+ this[M] = +I;
919
+ };
920
+ }, E = [/[+-]\d\d:?(\d\d)?|Z/, function(M) {
921
+ (this.zone || (this.zone = {})).offset = function(I) {
922
+ if (!I || I === "Z") return 0;
923
+ var V = I.match(/([+-]|\d\d)/g), W = 60 * V[1] + (+V[2] || 0);
924
+ return W === 0 ? 0 : V[0] === "+" ? -W : W;
925
+ }(M);
926
+ }], C = function(M) {
927
+ var I = _[M];
928
+ return I && (I.indexOf ? I : I.s.concat(I.f));
929
+ }, b = function(M, I) {
930
+ var V, W = _.meridiem;
931
+ if (W) {
932
+ for (var Z = 1; Z <= 24; Z += 1) if (M.indexOf(W(Z, 0, I)) > -1) {
933
+ V = Z > 12;
934
+ break;
935
+ }
936
+ } else V = M === (I ? "pm" : "PM");
937
+ return V;
938
+ }, G = { A: [y, function(M) {
939
+ this.afternoon = b(M, !1);
940
+ }], a: [y, function(M) {
941
+ this.afternoon = b(M, !0);
942
+ }], Q: [a, function(M) {
943
+ this.month = 3 * (M - 1) + 1;
944
+ }], S: [a, function(M) {
945
+ this.milliseconds = 100 * +M;
946
+ }], SS: [i, function(M) {
947
+ this.milliseconds = 10 * +M;
948
+ }], SSS: [/\d{3}/, function(M) {
949
+ this.milliseconds = +M;
950
+ }], s: [s, g("seconds")], ss: [s, g("seconds")], m: [s, g("minutes")], mm: [s, g("minutes")], H: [s, g("hours")], h: [s, g("hours")], HH: [s, g("hours")], hh: [s, g("hours")], D: [s, g("day")], DD: [i, g("day")], Do: [y, function(M) {
951
+ var I = _.ordinal, V = M.match(/\d+/);
952
+ if (this.day = V[0], I) for (var W = 1; W <= 31; W += 1) I(W).replace(/\[|\]/g, "") === M && (this.day = W);
953
+ }], w: [s, g("week")], ww: [i, g("week")], M: [s, g("month")], MM: [i, g("month")], MMM: [y, function(M) {
954
+ var I = C("months"), V = (C("monthsShort") || I.map(function(W) {
955
+ return W.slice(0, 3);
956
+ })).indexOf(M) + 1;
957
+ if (V < 1) throw new Error();
958
+ this.month = V % 12 || V;
959
+ }], MMMM: [y, function(M) {
960
+ var I = C("months").indexOf(M) + 1;
961
+ if (I < 1) throw new Error();
962
+ this.month = I % 12 || I;
963
+ }], Y: [/[+-]?\d+/, g("year")], YY: [i, function(M) {
964
+ this.year = p(M);
965
+ }], YYYY: [/\d{4}/, g("year")], Z: E, ZZ: E };
966
+ function O(M) {
967
+ var I, V;
968
+ I = M, V = _ && _.formats;
969
+ for (var W = (M = I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(F, S, v) {
970
+ var U = v && v.toUpperCase();
971
+ return S || V[v] || n[v] || V[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(u, m, T) {
972
+ return m || T.slice(1);
973
+ });
974
+ })).match(r), Z = W.length, Q = 0; Q < Z; Q += 1) {
975
+ var D = W[Q], H = G[D], x = H && H[0], Y = H && H[1];
976
+ W[Q] = Y ? { regex: x, parser: Y } : D.replace(/^\[|\]$/g, "");
977
+ }
978
+ return function(F) {
979
+ for (var S = {}, v = 0, U = 0; v < Z; v += 1) {
980
+ var u = W[v];
981
+ if (typeof u == "string") U += u.length;
982
+ else {
983
+ var m = u.regex, T = u.parser, d = F.slice(U), w = m.exec(d)[0];
984
+ T.call(S, w), F = F.replace(w, "");
985
+ }
986
+ }
987
+ return function(c) {
988
+ var l = c.afternoon;
989
+ if (l !== void 0) {
990
+ var o = c.hours;
991
+ l ? o < 12 && (c.hours += 12) : o === 12 && (c.hours = 0), delete c.afternoon;
992
+ }
993
+ }(S), S;
994
+ };
995
+ }
996
+ return function(M, I, V) {
997
+ V.p.customParseFormat = !0, M && M.parseTwoDigitYear && (p = M.parseTwoDigitYear);
998
+ var W = I.prototype, Z = W.parse;
999
+ W.parse = function(Q) {
1000
+ var D = Q.date, H = Q.utc, x = Q.args;
1001
+ this.$u = H;
1002
+ var Y = x[1];
1003
+ if (typeof Y == "string") {
1004
+ var F = x[2] === !0, S = x[3] === !0, v = F || S, U = x[2];
1005
+ S && (U = x[2]), _ = this.$locale(), !F && U && (_ = V.Ls[U]), this.$d = function(d, w, c, l) {
1006
+ try {
1007
+ if (["x", "X"].indexOf(w) > -1) return new Date((w === "X" ? 1e3 : 1) * d);
1008
+ var o = O(w)(d), P = o.year, z = o.month, R = o.day, K = o.hours, X = o.minutes, $ = o.seconds, it = o.milliseconds, k = o.zone, A = o.week, N = /* @__PURE__ */ new Date(), f = R || (P || z ? 1 : N.getDate()), J = P || N.getFullYear(), L = 0;
1009
+ P && !z || (L = z > 0 ? z - 1 : N.getMonth());
1010
+ var j, q = K || 0, rt = X || 0, st = $ || 0, pt = it || 0;
1011
+ return k ? new Date(Date.UTC(J, L, f, q, rt, st, pt + 60 * k.offset * 1e3)) : c ? new Date(Date.UTC(J, L, f, q, rt, st, pt)) : (j = new Date(J, L, f, q, rt, st, pt), A && (j = l(j).week(A).toDate()), j);
1012
+ } catch {
1013
+ return /* @__PURE__ */ new Date("");
1014
+ }
1015
+ }(D, Y, H, V), this.init(), U && U !== !0 && (this.$L = this.locale(U).$L), v && D != this.format(Y) && (this.$d = /* @__PURE__ */ new Date("")), _ = {};
1016
+ } else if (Y instanceof Array) for (var u = Y.length, m = 1; m <= u; m += 1) {
1017
+ x[1] = Y[m - 1];
1018
+ var T = V.apply(this, x);
1019
+ if (T.isValid()) {
1020
+ this.$d = T.$d, this.$L = T.$L, this.init();
1021
+ break;
1022
+ }
1023
+ m === u && (this.$d = /* @__PURE__ */ new Date(""));
1024
+ }
1025
+ else Z.call(this, Q);
1026
+ };
1027
+ };
1028
+ });
1029
+ })(bn);
1030
+ var Ya = bn.exports;
1031
+ const Ua = /* @__PURE__ */ be(Ya);
1032
+ var xn = { exports: {} };
1033
+ (function(t, e) {
1034
+ (function(n, r) {
1035
+ t.exports = r();
1036
+ })(Te, function() {
1037
+ return function(n, r) {
1038
+ var a = r.prototype, i = a.format;
1039
+ a.format = function(s) {
1040
+ var y = this, _ = this.$locale();
1041
+ if (!this.isValid()) return i.bind(this)(s);
1042
+ var p = this.$utils(), g = (s || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(E) {
1043
+ switch (E) {
1044
+ case "Q":
1045
+ return Math.ceil((y.$M + 1) / 3);
1046
+ case "Do":
1047
+ return _.ordinal(y.$D);
1048
+ case "gggg":
1049
+ return y.weekYear();
1050
+ case "GGGG":
1051
+ return y.isoWeekYear();
1052
+ case "wo":
1053
+ return _.ordinal(y.week(), "W");
1054
+ case "w":
1055
+ case "ww":
1056
+ return p.s(y.week(), E === "w" ? 1 : 2, "0");
1057
+ case "W":
1058
+ case "WW":
1059
+ return p.s(y.isoWeek(), E === "W" ? 1 : 2, "0");
1060
+ case "k":
1061
+ case "kk":
1062
+ return p.s(String(y.$H === 0 ? 24 : y.$H), E === "k" ? 1 : 2, "0");
1063
+ case "X":
1064
+ return Math.floor(y.$d.getTime() / 1e3);
1065
+ case "x":
1066
+ return y.$d.getTime();
1067
+ case "z":
1068
+ return "[" + y.offsetName() + "]";
1069
+ case "zzz":
1070
+ return "[" + y.offsetName("long") + "]";
1071
+ default:
1072
+ return E;
1073
+ }
1074
+ });
1075
+ return i.bind(this)(g);
1076
+ };
1077
+ };
1078
+ });
1079
+ })(xn);
1080
+ var Ea = xn.exports;
1081
+ const La = /* @__PURE__ */ be(Ea);
1082
+ var ye = function() {
1083
+ var t = /* @__PURE__ */ h(function(U, u, m, T) {
1084
+ for (m = m || {}, T = U.length; T--; m[U[T]] = u) ;
1085
+ return m;
1086
+ }, "o"), e = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 40], n = [1, 26], r = [1, 27], a = [1, 28], i = [1, 29], s = [1, 30], y = [1, 31], _ = [1, 32], p = [1, 33], g = [1, 34], E = [1, 9], C = [1, 10], b = [1, 11], G = [1, 12], O = [1, 13], M = [1, 14], I = [1, 15], V = [1, 16], W = [1, 19], Z = [1, 20], Q = [1, 21], D = [1, 22], H = [1, 23], x = [1, 25], Y = [1, 35], F = {
1087
+ trace: /* @__PURE__ */ h(function() {
1088
+ }, "trace"),
1089
+ yy: {},
1090
+ symbols_: { error: 2, start: 3, gantt: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NL: 10, weekday: 11, weekday_monday: 12, weekday_tuesday: 13, weekday_wednesday: 14, weekday_thursday: 15, weekday_friday: 16, weekday_saturday: 17, weekday_sunday: 18, weekend: 19, weekend_friday: 20, weekend_saturday: 21, dateFormat: 22, inclusiveEndDates: 23, topAxis: 24, axisFormat: 25, tickInterval: 26, excludes: 27, includes: 28, todayMarker: 29, title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, section: 36, clickStatement: 37, taskTxt: 38, taskData: 39, click: 40, callbackname: 41, callbackargs: 42, href: 43, clickStatementDebug: 44, $accept: 0, $end: 1 },
1091
+ terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 20: "weekend_friday", 21: "weekend_saturday", 22: "dateFormat", 23: "inclusiveEndDates", 24: "topAxis", 25: "axisFormat", 26: "tickInterval", 27: "excludes", 28: "includes", 29: "todayMarker", 30: "title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "section", 38: "taskTxt", 39: "taskData", 40: "click", 41: "callbackname", 42: "callbackargs", 43: "href" },
1092
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [19, 1], [19, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [37, 2], [37, 3], [37, 3], [37, 4], [37, 3], [37, 4], [37, 2], [44, 2], [44, 3], [44, 3], [44, 4], [44, 3], [44, 4], [44, 2]],
1093
+ performAction: /* @__PURE__ */ h(function(u, m, T, d, w, c, l) {
1094
+ var o = c.length - 1;
1095
+ switch (w) {
1096
+ case 1:
1097
+ return c[o - 1];
1098
+ case 2:
1099
+ this.$ = [];
1100
+ break;
1101
+ case 3:
1102
+ c[o - 1].push(c[o]), this.$ = c[o - 1];
1103
+ break;
1104
+ case 4:
1105
+ case 5:
1106
+ this.$ = c[o];
1107
+ break;
1108
+ case 6:
1109
+ case 7:
1110
+ this.$ = [];
1111
+ break;
1112
+ case 8:
1113
+ d.setWeekday("monday");
1114
+ break;
1115
+ case 9:
1116
+ d.setWeekday("tuesday");
1117
+ break;
1118
+ case 10:
1119
+ d.setWeekday("wednesday");
1120
+ break;
1121
+ case 11:
1122
+ d.setWeekday("thursday");
1123
+ break;
1124
+ case 12:
1125
+ d.setWeekday("friday");
1126
+ break;
1127
+ case 13:
1128
+ d.setWeekday("saturday");
1129
+ break;
1130
+ case 14:
1131
+ d.setWeekday("sunday");
1132
+ break;
1133
+ case 15:
1134
+ d.setWeekend("friday");
1135
+ break;
1136
+ case 16:
1137
+ d.setWeekend("saturday");
1138
+ break;
1139
+ case 17:
1140
+ d.setDateFormat(c[o].substr(11)), this.$ = c[o].substr(11);
1141
+ break;
1142
+ case 18:
1143
+ d.enableInclusiveEndDates(), this.$ = c[o].substr(18);
1144
+ break;
1145
+ case 19:
1146
+ d.TopAxis(), this.$ = c[o].substr(8);
1147
+ break;
1148
+ case 20:
1149
+ d.setAxisFormat(c[o].substr(11)), this.$ = c[o].substr(11);
1150
+ break;
1151
+ case 21:
1152
+ d.setTickInterval(c[o].substr(13)), this.$ = c[o].substr(13);
1153
+ break;
1154
+ case 22:
1155
+ d.setExcludes(c[o].substr(9)), this.$ = c[o].substr(9);
1156
+ break;
1157
+ case 23:
1158
+ d.setIncludes(c[o].substr(9)), this.$ = c[o].substr(9);
1159
+ break;
1160
+ case 24:
1161
+ d.setTodayMarker(c[o].substr(12)), this.$ = c[o].substr(12);
1162
+ break;
1163
+ case 27:
1164
+ d.setDiagramTitle(c[o].substr(6)), this.$ = c[o].substr(6);
1165
+ break;
1166
+ case 28:
1167
+ this.$ = c[o].trim(), d.setAccTitle(this.$);
1168
+ break;
1169
+ case 29:
1170
+ case 30:
1171
+ this.$ = c[o].trim(), d.setAccDescription(this.$);
1172
+ break;
1173
+ case 31:
1174
+ d.addSection(c[o].substr(8)), this.$ = c[o].substr(8);
1175
+ break;
1176
+ case 33:
1177
+ d.addTask(c[o - 1], c[o]), this.$ = "task";
1178
+ break;
1179
+ case 34:
1180
+ this.$ = c[o - 1], d.setClickEvent(c[o - 1], c[o], null);
1181
+ break;
1182
+ case 35:
1183
+ this.$ = c[o - 2], d.setClickEvent(c[o - 2], c[o - 1], c[o]);
1184
+ break;
1185
+ case 36:
1186
+ this.$ = c[o - 2], d.setClickEvent(c[o - 2], c[o - 1], null), d.setLink(c[o - 2], c[o]);
1187
+ break;
1188
+ case 37:
1189
+ this.$ = c[o - 3], d.setClickEvent(c[o - 3], c[o - 2], c[o - 1]), d.setLink(c[o - 3], c[o]);
1190
+ break;
1191
+ case 38:
1192
+ this.$ = c[o - 2], d.setClickEvent(c[o - 2], c[o], null), d.setLink(c[o - 2], c[o - 1]);
1193
+ break;
1194
+ case 39:
1195
+ this.$ = c[o - 3], d.setClickEvent(c[o - 3], c[o - 1], c[o]), d.setLink(c[o - 3], c[o - 2]);
1196
+ break;
1197
+ case 40:
1198
+ this.$ = c[o - 1], d.setLink(c[o - 1], c[o]);
1199
+ break;
1200
+ case 41:
1201
+ case 47:
1202
+ this.$ = c[o - 1] + " " + c[o];
1203
+ break;
1204
+ case 42:
1205
+ case 43:
1206
+ case 45:
1207
+ this.$ = c[o - 2] + " " + c[o - 1] + " " + c[o];
1208
+ break;
1209
+ case 44:
1210
+ case 46:
1211
+ this.$ = c[o - 3] + " " + c[o - 2] + " " + c[o - 1] + " " + c[o];
1212
+ break;
1213
+ }
1214
+ }, "anonymous"),
1215
+ 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: 17, 12: n, 13: r, 14: a, 15: i, 16: s, 17: y, 18: _, 19: 18, 20: p, 21: g, 22: E, 23: C, 24: b, 25: G, 26: O, 27: M, 28: I, 29: V, 30: W, 31: Z, 33: Q, 35: D, 36: H, 37: 24, 38: x, 40: Y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 36, 11: 17, 12: n, 13: r, 14: a, 15: i, 16: s, 17: y, 18: _, 19: 18, 20: p, 21: g, 22: E, 23: C, 24: b, 25: G, 26: O, 27: M, 28: I, 29: V, 30: W, 31: Z, 33: Q, 35: D, 36: H, 37: 24, 38: x, 40: Y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 17]), t(e, [2, 18]), t(e, [2, 19]), t(e, [2, 20]), t(e, [2, 21]), t(e, [2, 22]), t(e, [2, 23]), t(e, [2, 24]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, t(e, [2, 30]), t(e, [2, 31]), t(e, [2, 32]), { 39: [1, 39] }, t(e, [2, 8]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 11]), t(e, [2, 12]), t(e, [2, 13]), t(e, [2, 14]), t(e, [2, 15]), t(e, [2, 16]), { 41: [1, 40], 43: [1, 41] }, t(e, [2, 4]), t(e, [2, 28]), t(e, [2, 29]), t(e, [2, 33]), t(e, [2, 34], { 42: [1, 42], 43: [1, 43] }), t(e, [2, 40], { 41: [1, 44] }), t(e, [2, 35], { 43: [1, 45] }), t(e, [2, 36]), t(e, [2, 38], { 42: [1, 46] }), t(e, [2, 37]), t(e, [2, 39])],
1216
+ defaultActions: {},
1217
+ parseError: /* @__PURE__ */ h(function(u, m) {
1218
+ if (m.recoverable)
1219
+ this.trace(u);
1220
+ else {
1221
+ var T = new Error(u);
1222
+ throw T.hash = m, T;
1223
+ }
1224
+ }, "parseError"),
1225
+ parse: /* @__PURE__ */ h(function(u) {
1226
+ var m = this, T = [0], d = [], w = [null], c = [], l = this.table, o = "", P = 0, z = 0, R = 2, K = 1, X = c.slice.call(arguments, 1), $ = Object.create(this.lexer), it = { yy: {} };
1227
+ for (var k in this.yy)
1228
+ Object.prototype.hasOwnProperty.call(this.yy, k) && (it.yy[k] = this.yy[k]);
1229
+ $.setInput(u, it.yy), it.yy.lexer = $, it.yy.parser = this, typeof $.yylloc > "u" && ($.yylloc = {});
1230
+ var A = $.yylloc;
1231
+ c.push(A);
1232
+ var N = $.options && $.options.ranges;
1233
+ typeof it.yy.parseError == "function" ? this.parseError = it.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1234
+ function f(ot) {
1235
+ T.length = T.length - 2 * ot, w.length = w.length - ot, c.length = c.length - ot;
1236
+ }
1237
+ h(f, "popStack");
1238
+ function J() {
1239
+ var ot;
1240
+ return ot = d.pop() || $.lex() || K, typeof ot != "number" && (ot instanceof Array && (d = ot, ot = d.pop()), ot = m.symbols_[ot] || ot), ot;
1241
+ }
1242
+ h(J, "lex");
1243
+ for (var L, j, q, rt, st = {}, pt, lt, Ae, Bt; ; ) {
1244
+ if (j = T[T.length - 1], this.defaultActions[j] ? q = this.defaultActions[j] : ((L === null || typeof L > "u") && (L = J()), q = l[j] && l[j][L]), typeof q > "u" || !q.length || !q[0]) {
1245
+ var ne = "";
1246
+ Bt = [];
1247
+ for (pt in l[j])
1248
+ this.terminals_[pt] && pt > R && Bt.push("'" + this.terminals_[pt] + "'");
1249
+ $.showPosition ? ne = "Parse error on line " + (P + 1) + `:
1250
+ ` + $.showPosition() + `
1251
+ Expecting ` + Bt.join(", ") + ", got '" + (this.terminals_[L] || L) + "'" : ne = "Parse error on line " + (P + 1) + ": Unexpected " + (L == K ? "end of input" : "'" + (this.terminals_[L] || L) + "'"), this.parseError(ne, {
1252
+ text: $.match,
1253
+ token: this.terminals_[L] || L,
1254
+ line: $.yylineno,
1255
+ loc: A,
1256
+ expected: Bt
1257
+ });
1258
+ }
1259
+ if (q[0] instanceof Array && q.length > 1)
1260
+ throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + L);
1261
+ switch (q[0]) {
1262
+ case 1:
1263
+ T.push(L), w.push($.yytext), c.push($.yylloc), T.push(q[1]), L = null, z = $.yyleng, o = $.yytext, P = $.yylineno, A = $.yylloc;
1264
+ break;
1265
+ case 2:
1266
+ if (lt = this.productions_[q[1]][1], st.$ = w[w.length - lt], st._$ = {
1267
+ first_line: c[c.length - (lt || 1)].first_line,
1268
+ last_line: c[c.length - 1].last_line,
1269
+ first_column: c[c.length - (lt || 1)].first_column,
1270
+ last_column: c[c.length - 1].last_column
1271
+ }, N && (st._$.range = [
1272
+ c[c.length - (lt || 1)].range[0],
1273
+ c[c.length - 1].range[1]
1274
+ ]), rt = this.performAction.apply(st, [
1275
+ o,
1276
+ z,
1277
+ P,
1278
+ it.yy,
1279
+ q[1],
1280
+ w,
1281
+ c
1282
+ ].concat(X)), typeof rt < "u")
1283
+ return rt;
1284
+ lt && (T = T.slice(0, -1 * lt * 2), w = w.slice(0, -1 * lt), c = c.slice(0, -1 * lt)), T.push(this.productions_[q[1]][0]), w.push(st.$), c.push(st._$), Ae = l[T[T.length - 2]][T[T.length - 1]], T.push(Ae);
1285
+ break;
1286
+ case 3:
1287
+ return !0;
1288
+ }
1289
+ }
1290
+ return !0;
1291
+ }, "parse")
1292
+ }, S = /* @__PURE__ */ function() {
1293
+ var U = {
1294
+ EOF: 1,
1295
+ parseError: /* @__PURE__ */ h(function(m, T) {
1296
+ if (this.yy.parser)
1297
+ this.yy.parser.parseError(m, T);
1298
+ else
1299
+ throw new Error(m);
1300
+ }, "parseError"),
1301
+ // resets the lexer, sets new input
1302
+ setInput: /* @__PURE__ */ h(function(u, m) {
1303
+ return this.yy = m || this.yy || {}, this._input = u, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1304
+ first_line: 1,
1305
+ first_column: 0,
1306
+ last_line: 1,
1307
+ last_column: 0
1308
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1309
+ }, "setInput"),
1310
+ // consumes and returns one char from the input
1311
+ input: /* @__PURE__ */ h(function() {
1312
+ var u = this._input[0];
1313
+ this.yytext += u, this.yyleng++, this.offset++, this.match += u, this.matched += u;
1314
+ var m = u.match(/(?:\r\n?|\n).*/g);
1315
+ return m ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), u;
1316
+ }, "input"),
1317
+ // unshifts one char (or a string) into the input
1318
+ unput: /* @__PURE__ */ h(function(u) {
1319
+ var m = u.length, T = u.split(/(?:\r\n?|\n)/g);
1320
+ this._input = u + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - m), this.offset -= m;
1321
+ var d = this.match.split(/(?:\r\n?|\n)/g);
1322
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), T.length - 1 && (this.yylineno -= T.length - 1);
1323
+ var w = this.yylloc.range;
1324
+ return this.yylloc = {
1325
+ first_line: this.yylloc.first_line,
1326
+ last_line: this.yylineno + 1,
1327
+ first_column: this.yylloc.first_column,
1328
+ last_column: T ? (T.length === d.length ? this.yylloc.first_column : 0) + d[d.length - T.length].length - T[0].length : this.yylloc.first_column - m
1329
+ }, this.options.ranges && (this.yylloc.range = [w[0], w[0] + this.yyleng - m]), this.yyleng = this.yytext.length, this;
1330
+ }, "unput"),
1331
+ // When called from action, caches matched text and appends it on next action
1332
+ more: /* @__PURE__ */ h(function() {
1333
+ return this._more = !0, this;
1334
+ }, "more"),
1335
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
1336
+ reject: /* @__PURE__ */ h(function() {
1337
+ if (this.options.backtrack_lexer)
1338
+ this._backtrack = !0;
1339
+ else
1340
+ return 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).
1341
+ ` + this.showPosition(), {
1342
+ text: "",
1343
+ token: null,
1344
+ line: this.yylineno
1345
+ });
1346
+ return this;
1347
+ }, "reject"),
1348
+ // retain first n characters of the match
1349
+ less: /* @__PURE__ */ h(function(u) {
1350
+ this.unput(this.match.slice(u));
1351
+ }, "less"),
1352
+ // displays already matched input, i.e. for error messages
1353
+ pastInput: /* @__PURE__ */ h(function() {
1354
+ var u = this.matched.substr(0, this.matched.length - this.match.length);
1355
+ return (u.length > 20 ? "..." : "") + u.substr(-20).replace(/\n/g, "");
1356
+ }, "pastInput"),
1357
+ // displays upcoming input, i.e. for error messages
1358
+ upcomingInput: /* @__PURE__ */ h(function() {
1359
+ var u = this.match;
1360
+ return u.length < 20 && (u += this._input.substr(0, 20 - u.length)), (u.substr(0, 20) + (u.length > 20 ? "..." : "")).replace(/\n/g, "");
1361
+ }, "upcomingInput"),
1362
+ // displays the character position where the lexing error occurred, i.e. for error messages
1363
+ showPosition: /* @__PURE__ */ h(function() {
1364
+ var u = this.pastInput(), m = new Array(u.length + 1).join("-");
1365
+ return u + this.upcomingInput() + `
1366
+ ` + m + "^";
1367
+ }, "showPosition"),
1368
+ // test the lexed token: return FALSE when not a match, otherwise return token
1369
+ test_match: /* @__PURE__ */ h(function(u, m) {
1370
+ var T, d, w;
1371
+ if (this.options.backtrack_lexer && (w = {
1372
+ yylineno: this.yylineno,
1373
+ yylloc: {
1374
+ first_line: this.yylloc.first_line,
1375
+ last_line: this.last_line,
1376
+ first_column: this.yylloc.first_column,
1377
+ last_column: this.yylloc.last_column
1378
+ },
1379
+ yytext: this.yytext,
1380
+ match: this.match,
1381
+ matches: this.matches,
1382
+ matched: this.matched,
1383
+ yyleng: this.yyleng,
1384
+ offset: this.offset,
1385
+ _more: this._more,
1386
+ _input: this._input,
1387
+ yy: this.yy,
1388
+ conditionStack: this.conditionStack.slice(0),
1389
+ done: this.done
1390
+ }, this.options.ranges && (w.yylloc.range = this.yylloc.range.slice(0))), d = u[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
1391
+ first_line: this.yylloc.last_line,
1392
+ last_line: this.yylineno + 1,
1393
+ first_column: this.yylloc.last_column,
1394
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + u[0].length
1395
+ }, this.yytext += u[0], this.match += u[0], this.matches = u, 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(u[0].length), this.matched += u[0], T = this.performAction.call(this, this.yy, this, m, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), T)
1396
+ return T;
1397
+ if (this._backtrack) {
1398
+ for (var c in w)
1399
+ this[c] = w[c];
1400
+ return !1;
1401
+ }
1402
+ return !1;
1403
+ }, "test_match"),
1404
+ // return next match in input
1405
+ next: /* @__PURE__ */ h(function() {
1406
+ if (this.done)
1407
+ return this.EOF;
1408
+ this._input || (this.done = !0);
1409
+ var u, m, T, d;
1410
+ this._more || (this.yytext = "", this.match = "");
1411
+ for (var w = this._currentRules(), c = 0; c < w.length; c++)
1412
+ if (T = this._input.match(this.rules[w[c]]), T && (!m || T[0].length > m[0].length)) {
1413
+ if (m = T, d = c, this.options.backtrack_lexer) {
1414
+ if (u = this.test_match(T, w[c]), u !== !1)
1415
+ return u;
1416
+ if (this._backtrack) {
1417
+ m = !1;
1418
+ continue;
1419
+ } else
1420
+ return !1;
1421
+ } else if (!this.options.flex)
1422
+ break;
1423
+ }
1424
+ return m ? (u = this.test_match(m, w[d]), u !== !1 ? u : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
1425
+ ` + this.showPosition(), {
1426
+ text: "",
1427
+ token: null,
1428
+ line: this.yylineno
1429
+ });
1430
+ }, "next"),
1431
+ // return next match that has a token
1432
+ lex: /* @__PURE__ */ h(function() {
1433
+ var m = this.next();
1434
+ return m || this.lex();
1435
+ }, "lex"),
1436
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1437
+ begin: /* @__PURE__ */ h(function(m) {
1438
+ this.conditionStack.push(m);
1439
+ }, "begin"),
1440
+ // pop the previously active lexer condition state off the condition stack
1441
+ popState: /* @__PURE__ */ h(function() {
1442
+ var m = this.conditionStack.length - 1;
1443
+ return m > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1444
+ }, "popState"),
1445
+ // produce the lexer rule set which is active for the currently active lexer condition state
1446
+ _currentRules: /* @__PURE__ */ h(function() {
1447
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1448
+ }, "_currentRules"),
1449
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1450
+ topState: /* @__PURE__ */ h(function(m) {
1451
+ return m = this.conditionStack.length - 1 - Math.abs(m || 0), m >= 0 ? this.conditionStack[m] : "INITIAL";
1452
+ }, "topState"),
1453
+ // alias for begin(condition)
1454
+ pushState: /* @__PURE__ */ h(function(m) {
1455
+ this.begin(m);
1456
+ }, "pushState"),
1457
+ // return the number of states currently on the stack
1458
+ stateStackSize: /* @__PURE__ */ h(function() {
1459
+ return this.conditionStack.length;
1460
+ }, "stateStackSize"),
1461
+ options: { "case-insensitive": !0 },
1462
+ performAction: /* @__PURE__ */ h(function(m, T, d, w) {
1463
+ switch (d) {
1464
+ case 0:
1465
+ return this.begin("open_directive"), "open_directive";
1466
+ case 1:
1467
+ return this.begin("acc_title"), 31;
1468
+ case 2:
1469
+ return this.popState(), "acc_title_value";
1470
+ case 3:
1471
+ return this.begin("acc_descr"), 33;
1472
+ case 4:
1473
+ return this.popState(), "acc_descr_value";
1474
+ case 5:
1475
+ this.begin("acc_descr_multiline");
1476
+ break;
1477
+ case 6:
1478
+ this.popState();
1479
+ break;
1480
+ case 7:
1481
+ return "acc_descr_multiline_value";
1482
+ case 8:
1483
+ break;
1484
+ case 9:
1485
+ break;
1486
+ case 10:
1487
+ break;
1488
+ case 11:
1489
+ return 10;
1490
+ case 12:
1491
+ break;
1492
+ case 13:
1493
+ break;
1494
+ case 14:
1495
+ this.begin("href");
1496
+ break;
1497
+ case 15:
1498
+ this.popState();
1499
+ break;
1500
+ case 16:
1501
+ return 43;
1502
+ case 17:
1503
+ this.begin("callbackname");
1504
+ break;
1505
+ case 18:
1506
+ this.popState();
1507
+ break;
1508
+ case 19:
1509
+ this.popState(), this.begin("callbackargs");
1510
+ break;
1511
+ case 20:
1512
+ return 41;
1513
+ case 21:
1514
+ this.popState();
1515
+ break;
1516
+ case 22:
1517
+ return 42;
1518
+ case 23:
1519
+ this.begin("click");
1520
+ break;
1521
+ case 24:
1522
+ this.popState();
1523
+ break;
1524
+ case 25:
1525
+ return 40;
1526
+ case 26:
1527
+ return 4;
1528
+ case 27:
1529
+ return 22;
1530
+ case 28:
1531
+ return 23;
1532
+ case 29:
1533
+ return 24;
1534
+ case 30:
1535
+ return 25;
1536
+ case 31:
1537
+ return 26;
1538
+ case 32:
1539
+ return 28;
1540
+ case 33:
1541
+ return 27;
1542
+ case 34:
1543
+ return 29;
1544
+ case 35:
1545
+ return 12;
1546
+ case 36:
1547
+ return 13;
1548
+ case 37:
1549
+ return 14;
1550
+ case 38:
1551
+ return 15;
1552
+ case 39:
1553
+ return 16;
1554
+ case 40:
1555
+ return 17;
1556
+ case 41:
1557
+ return 18;
1558
+ case 42:
1559
+ return 20;
1560
+ case 43:
1561
+ return 21;
1562
+ case 44:
1563
+ return "date";
1564
+ case 45:
1565
+ return 30;
1566
+ case 46:
1567
+ return "accDescription";
1568
+ case 47:
1569
+ return 36;
1570
+ case 48:
1571
+ return 38;
1572
+ case 49:
1573
+ return 39;
1574
+ case 50:
1575
+ return ":";
1576
+ case 51:
1577
+ return 6;
1578
+ case 52:
1579
+ return "INVALID";
1580
+ }
1581
+ }, "anonymous"),
1582
+ rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:weekend\s+friday\b)/i, /^(?:weekend\s+saturday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
1583
+ conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, callbackargs: { rules: [21, 22], inclusive: !1 }, callbackname: { rules: [18, 19, 20], inclusive: !1 }, href: { rules: [15, 16], inclusive: !1 }, click: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], inclusive: !0 } }
1584
+ };
1585
+ return U;
1586
+ }();
1587
+ F.lexer = S;
1588
+ function v() {
1589
+ this.yy = {};
1590
+ }
1591
+ return h(v, "Parser"), v.prototype = F, F.Parser = v, new v();
1592
+ }();
1593
+ ye.parser = ye;
1594
+ var Aa = ye;
1595
+ at.extend(Fa);
1596
+ at.extend(Ua);
1597
+ at.extend(La);
1598
+ var Xe = { friday: 5, saturday: 6 }, ut = "", De = "", Ce = void 0, Me = "", zt = [], Pt = [], _e = /* @__PURE__ */ new Map(), Se = [], te = [], Et = "", Fe = "", wn = ["active", "done", "crit", "milestone", "vert"], Ye = [], Rt = !1, Ue = !1, Ee = "sunday", ee = "saturday", ke = 0, Ia = /* @__PURE__ */ h(function() {
1599
+ Se = [], te = [], Et = "", Ye = [], Xt = 0, ve = void 0, jt = void 0, tt = [], ut = "", De = "", Fe = "", Ce = void 0, Me = "", zt = [], Pt = [], Rt = !1, Ue = !1, ke = 0, _e = /* @__PURE__ */ new Map(), Pn(), Ee = "sunday", ee = "saturday";
1600
+ }, "clear"), Wa = /* @__PURE__ */ h(function(t) {
1601
+ De = t;
1602
+ }, "setAxisFormat"), Oa = /* @__PURE__ */ h(function() {
1603
+ return De;
1604
+ }, "getAxisFormat"), Ha = /* @__PURE__ */ h(function(t) {
1605
+ Ce = t;
1606
+ }, "setTickInterval"), Na = /* @__PURE__ */ h(function() {
1607
+ return Ce;
1608
+ }, "getTickInterval"), Va = /* @__PURE__ */ h(function(t) {
1609
+ Me = t;
1610
+ }, "setTodayMarker"), za = /* @__PURE__ */ h(function() {
1611
+ return Me;
1612
+ }, "getTodayMarker"), Pa = /* @__PURE__ */ h(function(t) {
1613
+ ut = t;
1614
+ }, "setDateFormat"), Ra = /* @__PURE__ */ h(function() {
1615
+ Rt = !0;
1616
+ }, "enableInclusiveEndDates"), Ba = /* @__PURE__ */ h(function() {
1617
+ return Rt;
1618
+ }, "endDatesAreInclusive"), Za = /* @__PURE__ */ h(function() {
1619
+ Ue = !0;
1620
+ }, "enableTopAxis"), qa = /* @__PURE__ */ h(function() {
1621
+ return Ue;
1622
+ }, "topAxisEnabled"), Ga = /* @__PURE__ */ h(function(t) {
1623
+ Fe = t;
1624
+ }, "setDisplayMode"), Xa = /* @__PURE__ */ h(function() {
1625
+ return Fe;
1626
+ }, "getDisplayMode"), ja = /* @__PURE__ */ h(function() {
1627
+ return ut;
1628
+ }, "getDateFormat"), Qa = /* @__PURE__ */ h(function(t) {
1629
+ zt = t.toLowerCase().split(/[\s,]+/);
1630
+ }, "setIncludes"), $a = /* @__PURE__ */ h(function() {
1631
+ return zt;
1632
+ }, "getIncludes"), Ja = /* @__PURE__ */ h(function(t) {
1633
+ Pt = t.toLowerCase().split(/[\s,]+/);
1634
+ }, "setExcludes"), Ka = /* @__PURE__ */ h(function() {
1635
+ return Pt;
1636
+ }, "getExcludes"), ti = /* @__PURE__ */ h(function() {
1637
+ return _e;
1638
+ }, "getLinks"), ei = /* @__PURE__ */ h(function(t) {
1639
+ Et = t, Se.push(t);
1640
+ }, "addSection"), ni = /* @__PURE__ */ h(function() {
1641
+ return Se;
1642
+ }, "getSections"), ri = /* @__PURE__ */ h(function() {
1643
+ let t = je();
1644
+ const e = 10;
1645
+ let n = 0;
1646
+ for (; !t && n < e; )
1647
+ t = je(), n++;
1648
+ return te = tt, te;
1649
+ }, "getTasks"), Dn = /* @__PURE__ */ h(function(t, e, n, r) {
1650
+ const a = t.format(e.trim()), i = t.format("YYYY-MM-DD");
1651
+ return r.includes(a) || r.includes(i) ? !1 : n.includes("weekends") && (t.isoWeekday() === Xe[ee] || t.isoWeekday() === Xe[ee] + 1) || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(a) || n.includes(i);
1652
+ }, "isInvalidDate"), ai = /* @__PURE__ */ h(function(t) {
1653
+ Ee = t;
1654
+ }, "setWeekday"), ii = /* @__PURE__ */ h(function() {
1655
+ return Ee;
1656
+ }, "getWeekday"), si = /* @__PURE__ */ h(function(t) {
1657
+ ee = t;
1658
+ }, "setWeekend"), Cn = /* @__PURE__ */ h(function(t, e, n, r) {
1659
+ if (!n.length || t.manualEndTime)
1660
+ return;
1661
+ let a;
1662
+ t.startTime instanceof Date ? a = at(t.startTime) : a = at(t.startTime, e, !0), a = a.add(1, "d");
1663
+ let i;
1664
+ t.endTime instanceof Date ? i = at(t.endTime) : i = at(t.endTime, e, !0);
1665
+ const [s, y] = oi(
1666
+ a,
1667
+ i,
1668
+ e,
1669
+ n,
1670
+ r
1671
+ );
1672
+ t.endTime = s.toDate(), t.renderEndTime = y;
1673
+ }, "checkTaskDates"), oi = /* @__PURE__ */ h(function(t, e, n, r, a) {
1674
+ let i = !1, s = null;
1675
+ for (; t <= e; )
1676
+ i || (s = e.toDate()), i = Dn(t, n, r, a), i && (e = e.add(1, "d")), t = t.add(1, "d");
1677
+ return [e, s];
1678
+ }, "fixTaskDates"), pe = /* @__PURE__ */ h(function(t, e, n) {
1679
+ n = n.trim();
1680
+ const a = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
1681
+ if (a !== null) {
1682
+ let s = null;
1683
+ for (const _ of a.groups.ids.split(" ")) {
1684
+ let p = Ct(_);
1685
+ p !== void 0 && (!s || p.endTime > s.endTime) && (s = p);
1686
+ }
1687
+ if (s)
1688
+ return s.endTime;
1689
+ const y = /* @__PURE__ */ new Date();
1690
+ return y.setHours(0, 0, 0, 0), y;
1691
+ }
1692
+ let i = at(n, e.trim(), !0);
1693
+ if (i.isValid())
1694
+ return i.toDate();
1695
+ {
1696
+ Qt.debug("Invalid date:" + n), Qt.debug("With date format:" + e.trim());
1697
+ const s = new Date(n);
1698
+ if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
1699
+ // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
1700
+ // This can cause virtually infinite loops while rendering, so for the
1701
+ // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
1702
+ // invalid.
1703
+ s.getFullYear() < -1e4 || s.getFullYear() > 1e4)
1704
+ throw new Error("Invalid date:" + n);
1705
+ return s;
1706
+ }
1707
+ }, "getStartDate"), Mn = /* @__PURE__ */ h(function(t) {
1708
+ const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
1709
+ return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
1710
+ }, "parseDuration"), _n = /* @__PURE__ */ h(function(t, e, n, r = !1) {
1711
+ n = n.trim();
1712
+ const i = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
1713
+ if (i !== null) {
1714
+ let g = null;
1715
+ for (const C of i.groups.ids.split(" ")) {
1716
+ let b = Ct(C);
1717
+ b !== void 0 && (!g || b.startTime < g.startTime) && (g = b);
1718
+ }
1719
+ if (g)
1720
+ return g.startTime;
1721
+ const E = /* @__PURE__ */ new Date();
1722
+ return E.setHours(0, 0, 0, 0), E;
1723
+ }
1724
+ let s = at(n, e.trim(), !0);
1725
+ if (s.isValid())
1726
+ return r && (s = s.add(1, "d")), s.toDate();
1727
+ let y = at(t);
1728
+ const [_, p] = Mn(n);
1729
+ if (!Number.isNaN(_)) {
1730
+ const g = y.add(_, p);
1731
+ g.isValid() && (y = g);
1732
+ }
1733
+ return y.toDate();
1734
+ }, "getEndDate"), Xt = 0, Ft = /* @__PURE__ */ h(function(t) {
1735
+ return t === void 0 ? (Xt = Xt + 1, "task" + Xt) : t;
1736
+ }, "parseId"), ci = /* @__PURE__ */ h(function(t, e) {
1737
+ let n;
1738
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1739
+ const r = n.split(","), a = {};
1740
+ Le(r, a, wn);
1741
+ for (let s = 0; s < r.length; s++)
1742
+ r[s] = r[s].trim();
1743
+ let i = "";
1744
+ switch (r.length) {
1745
+ case 1:
1746
+ a.id = Ft(), a.startTime = t.endTime, i = r[0];
1747
+ break;
1748
+ case 2:
1749
+ a.id = Ft(), a.startTime = pe(void 0, ut, r[0]), i = r[1];
1750
+ break;
1751
+ case 3:
1752
+ a.id = Ft(r[0]), a.startTime = pe(void 0, ut, r[1]), i = r[2];
1753
+ break;
1754
+ }
1755
+ return i && (a.endTime = _n(a.startTime, ut, i, Rt), a.manualEndTime = at(i, "YYYY-MM-DD", !0).isValid(), Cn(a, ut, Pt, zt)), a;
1756
+ }, "compileData"), li = /* @__PURE__ */ h(function(t, e) {
1757
+ let n;
1758
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1759
+ const r = n.split(","), a = {};
1760
+ Le(r, a, wn);
1761
+ for (let i = 0; i < r.length; i++)
1762
+ r[i] = r[i].trim();
1763
+ switch (r.length) {
1764
+ case 1:
1765
+ a.id = Ft(), a.startTime = {
1766
+ type: "prevTaskEnd",
1767
+ id: t
1768
+ }, a.endTime = {
1769
+ data: r[0]
1770
+ };
1771
+ break;
1772
+ case 2:
1773
+ a.id = Ft(), a.startTime = {
1774
+ type: "getStartDate",
1775
+ startData: r[0]
1776
+ }, a.endTime = {
1777
+ data: r[1]
1778
+ };
1779
+ break;
1780
+ case 3:
1781
+ a.id = Ft(r[0]), a.startTime = {
1782
+ type: "getStartDate",
1783
+ startData: r[1]
1784
+ }, a.endTime = {
1785
+ data: r[2]
1786
+ };
1787
+ break;
1788
+ }
1789
+ return a;
1790
+ }, "parseData"), ve, jt, tt = [], Sn = {}, ui = /* @__PURE__ */ h(function(t, e) {
1791
+ const n = {
1792
+ section: Et,
1793
+ type: Et,
1794
+ processed: !1,
1795
+ manualEndTime: !1,
1796
+ renderEndTime: null,
1797
+ raw: { data: e },
1798
+ task: t,
1799
+ classes: []
1800
+ }, r = li(jt, e);
1801
+ n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = jt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, n.order = ke, ke++;
1802
+ const a = tt.push(n);
1803
+ jt = n.id, Sn[n.id] = a - 1;
1804
+ }, "addTask"), Ct = /* @__PURE__ */ h(function(t) {
1805
+ const e = Sn[t];
1806
+ return tt[e];
1807
+ }, "findTaskById"), fi = /* @__PURE__ */ h(function(t, e) {
1808
+ const n = {
1809
+ section: Et,
1810
+ type: Et,
1811
+ description: t,
1812
+ task: t,
1813
+ classes: []
1814
+ }, r = ci(ve, e);
1815
+ n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, ve = n, te.push(n);
1816
+ }, "addTaskOrg"), je = /* @__PURE__ */ h(function() {
1817
+ const t = /* @__PURE__ */ h(function(n) {
1818
+ const r = tt[n];
1819
+ let a = "";
1820
+ switch (tt[n].raw.startTime.type) {
1821
+ case "prevTaskEnd": {
1822
+ const i = Ct(r.prevTaskId);
1823
+ r.startTime = i.endTime;
1824
+ break;
1825
+ }
1826
+ case "getStartDate":
1827
+ a = pe(void 0, ut, tt[n].raw.startTime.startData), a && (tt[n].startTime = a);
1828
+ break;
1829
+ }
1830
+ return tt[n].startTime && (tt[n].endTime = _n(
1831
+ tt[n].startTime,
1832
+ ut,
1833
+ tt[n].raw.endTime.data,
1834
+ Rt
1835
+ ), tt[n].endTime && (tt[n].processed = !0, tt[n].manualEndTime = at(
1836
+ tt[n].raw.endTime.data,
1837
+ "YYYY-MM-DD",
1838
+ !0
1839
+ ).isValid(), Cn(tt[n], ut, Pt, zt))), tt[n].processed;
1840
+ }, "compileTask");
1841
+ let e = !0;
1842
+ for (const [n, r] of tt.entries())
1843
+ t(n), e = e && r.processed;
1844
+ return e;
1845
+ }, "compileTasks"), hi = /* @__PURE__ */ h(function(t, e) {
1846
+ let n = e;
1847
+ _t().securityLevel !== "loose" && (n = zn(e)), t.split(",").forEach(function(r) {
1848
+ Ct(r) !== void 0 && (Yn(r, () => {
1849
+ window.open(n, "_self");
1850
+ }), _e.set(r, n));
1851
+ }), Fn(t, "clickable");
1852
+ }, "setLink"), Fn = /* @__PURE__ */ h(function(t, e) {
1853
+ t.split(",").forEach(function(n) {
1854
+ let r = Ct(n);
1855
+ r !== void 0 && r.classes.push(e);
1856
+ });
1857
+ }, "setClass"), di = /* @__PURE__ */ h(function(t, e, n) {
1858
+ if (_t().securityLevel !== "loose" || e === void 0)
1859
+ return;
1860
+ let r = [];
1861
+ if (typeof n == "string") {
1862
+ r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1863
+ for (let i = 0; i < r.length; i++) {
1864
+ let s = r[i].trim();
1865
+ s.startsWith('"') && s.endsWith('"') && (s = s.substr(1, s.length - 2)), r[i] = s;
1866
+ }
1867
+ }
1868
+ r.length === 0 && r.push(t), Ct(t) !== void 0 && Yn(t, () => {
1869
+ Rn.runFunc(e, ...r);
1870
+ });
1871
+ }, "setClickFun"), Yn = /* @__PURE__ */ h(function(t, e) {
1872
+ Ye.push(
1873
+ function() {
1874
+ const n = document.querySelector(`[id="${t}"]`);
1875
+ n !== null && n.addEventListener("click", function() {
1876
+ e();
1877
+ });
1878
+ },
1879
+ function() {
1880
+ const n = document.querySelector(`[id="${t}-text"]`);
1881
+ n !== null && n.addEventListener("click", function() {
1882
+ e();
1883
+ });
1884
+ }
1885
+ );
1886
+ }, "pushFun"), mi = /* @__PURE__ */ h(function(t, e, n) {
1887
+ t.split(",").forEach(function(r) {
1888
+ di(r, e, n);
1889
+ }), Fn(t, "clickable");
1890
+ }, "setClickEvent"), gi = /* @__PURE__ */ h(function(t) {
1891
+ Ye.forEach(function(e) {
1892
+ e(t);
1893
+ });
1894
+ }, "bindFunctions"), yi = {
1895
+ getConfig: /* @__PURE__ */ h(() => _t().gantt, "getConfig"),
1896
+ clear: Ia,
1897
+ setDateFormat: Pa,
1898
+ getDateFormat: ja,
1899
+ enableInclusiveEndDates: Ra,
1900
+ endDatesAreInclusive: Ba,
1901
+ enableTopAxis: Za,
1902
+ topAxisEnabled: qa,
1903
+ setAxisFormat: Wa,
1904
+ getAxisFormat: Oa,
1905
+ setTickInterval: Ha,
1906
+ getTickInterval: Na,
1907
+ setTodayMarker: Va,
1908
+ getTodayMarker: za,
1909
+ setAccTitle: Hn,
1910
+ getAccTitle: On,
1911
+ setDiagramTitle: Wn,
1912
+ getDiagramTitle: In,
1913
+ setDisplayMode: Ga,
1914
+ getDisplayMode: Xa,
1915
+ setAccDescription: An,
1916
+ getAccDescription: Ln,
1917
+ addSection: ei,
1918
+ getSections: ni,
1919
+ getTasks: ri,
1920
+ addTask: ui,
1921
+ findTaskById: Ct,
1922
+ addTaskOrg: fi,
1923
+ setIncludes: Qa,
1924
+ getIncludes: $a,
1925
+ setExcludes: Ja,
1926
+ getExcludes: Ka,
1927
+ setClickEvent: mi,
1928
+ setLink: hi,
1929
+ getLinks: ti,
1930
+ bindFunctions: gi,
1931
+ parseDuration: Mn,
1932
+ isInvalidDate: Dn,
1933
+ setWeekday: ai,
1934
+ getWeekday: ii,
1935
+ setWeekend: si
1936
+ };
1937
+ function Le(t, e, n) {
1938
+ let r = !0;
1939
+ for (; r; )
1940
+ r = !1, n.forEach(function(a) {
1941
+ const i = "^\\s*" + a + "\\s*$", s = new RegExp(i);
1942
+ t[0].match(s) && (e[a] = !0, t.shift(1), r = !0);
1943
+ });
1944
+ }
1945
+ h(Le, "getTaskTags");
1946
+ var ki = /* @__PURE__ */ h(function() {
1947
+ Qt.debug("Something is calling, setConf, remove the call");
1948
+ }, "setConf"), Qe = {
1949
+ monday: Ht,
1950
+ tuesday: un,
1951
+ wednesday: fn,
1952
+ thursday: bt,
1953
+ friday: hn,
1954
+ saturday: dn,
1955
+ sunday: Vt
1956
+ }, pi = /* @__PURE__ */ h((t, e) => {
1957
+ let n = [...t].map(() => -1 / 0), r = [...t].sort((i, s) => i.startTime - s.startTime || i.order - s.order), a = 0;
1958
+ for (const i of r)
1959
+ for (let s = 0; s < n.length; s++)
1960
+ if (i.startTime >= n[s]) {
1961
+ n[s] = i.endTime, i.order = s + e, s > a && (a = s);
1962
+ break;
1963
+ }
1964
+ return a;
1965
+ }, "getMaxIntersections"), ht, vi = /* @__PURE__ */ h(function(t, e, n, r) {
1966
+ const a = _t().gantt, i = _t().securityLevel;
1967
+ let s;
1968
+ i === "sandbox" && (s = Zt("#i" + e));
1969
+ const y = i === "sandbox" ? Zt(s.nodes()[0].contentDocument.body) : Zt("body"), _ = i === "sandbox" ? s.nodes()[0].contentDocument : document, p = _.getElementById(e);
1970
+ ht = p.parentElement.offsetWidth, ht === void 0 && (ht = 1200), a.useWidth !== void 0 && (ht = a.useWidth);
1971
+ const g = r.db.getTasks();
1972
+ let E = [];
1973
+ for (const x of g)
1974
+ E.push(x.type);
1975
+ E = H(E);
1976
+ const C = {};
1977
+ let b = 2 * a.topPadding;
1978
+ if (r.db.getDisplayMode() === "compact" || a.displayMode === "compact") {
1979
+ const x = {};
1980
+ for (const F of g)
1981
+ x[F.section] === void 0 ? x[F.section] = [F] : x[F.section].push(F);
1982
+ let Y = 0;
1983
+ for (const F of Object.keys(x)) {
1984
+ const S = pi(x[F], Y) + 1;
1985
+ Y += S, b += S * (a.barHeight + a.barGap), C[F] = S;
1986
+ }
1987
+ } else {
1988
+ b += g.length * (a.barHeight + a.barGap);
1989
+ for (const x of E)
1990
+ C[x] = g.filter((Y) => Y.type === x).length;
1991
+ }
1992
+ p.setAttribute("viewBox", "0 0 " + ht + " " + b);
1993
+ const G = y.select(`[id="${e}"]`), O = _a().domain([
1994
+ Qn(g, function(x) {
1995
+ return x.startTime;
1996
+ }),
1997
+ jn(g, function(x) {
1998
+ return x.endTime;
1999
+ })
2000
+ ]).rangeRound([0, ht - a.leftPadding - a.rightPadding]);
2001
+ function M(x, Y) {
2002
+ const F = x.startTime, S = Y.startTime;
2003
+ let v = 0;
2004
+ return F > S ? v = 1 : F < S && (v = -1), v;
2005
+ }
2006
+ h(M, "taskCompare"), g.sort(M), I(g, ht, b), Nn(G, b, ht, a.useMaxWidth), G.append("text").text(r.db.getDiagramTitle()).attr("x", ht / 2).attr("y", a.titleTopMargin).attr("class", "titleText");
2007
+ function I(x, Y, F) {
2008
+ const S = a.barHeight, v = S + a.barGap, U = a.topPadding, u = a.leftPadding, m = Gn().domain([0, E.length]).range(["#00B9FA", "#F95002"]).interpolate(fr);
2009
+ W(
2010
+ v,
2011
+ U,
2012
+ u,
2013
+ Y,
2014
+ F,
2015
+ x,
2016
+ r.db.getExcludes(),
2017
+ r.db.getIncludes()
2018
+ ), Z(u, U, Y, F), V(x, v, U, u, S, m, Y), Q(v, U), D(u, U, Y, F);
2019
+ }
2020
+ h(I, "makeGantt");
2021
+ function V(x, Y, F, S, v, U, u) {
2022
+ x.sort((l, o) => l.vert === o.vert ? 0 : l.vert ? 1 : -1);
2023
+ const T = [...new Set(x.map((l) => l.order))].map((l) => x.find((o) => o.order === l));
2024
+ G.append("g").selectAll("rect").data(T).enter().append("rect").attr("x", 0).attr("y", function(l, o) {
2025
+ return o = l.order, o * Y + F - 2;
2026
+ }).attr("width", function() {
2027
+ return u - a.rightPadding / 2;
2028
+ }).attr("height", Y).attr("class", function(l) {
2029
+ for (const [o, P] of E.entries())
2030
+ if (l.type === P)
2031
+ return "section section" + o % a.numberSectionStyles;
2032
+ return "section section0";
2033
+ }).enter();
2034
+ const d = G.append("g").selectAll("rect").data(x).enter(), w = r.db.getLinks();
2035
+ if (d.append("rect").attr("id", function(l) {
2036
+ return l.id;
2037
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(l) {
2038
+ return l.milestone ? O(l.startTime) + S + 0.5 * (O(l.endTime) - O(l.startTime)) - 0.5 * v : O(l.startTime) + S;
2039
+ }).attr("y", function(l, o) {
2040
+ return o = l.order, l.vert ? a.gridLineStartPadding : o * Y + F;
2041
+ }).attr("width", function(l) {
2042
+ return l.milestone ? v : l.vert ? 0.08 * v : O(l.renderEndTime || l.endTime) - O(l.startTime);
2043
+ }).attr("height", function(l) {
2044
+ return l.vert ? g.length * (a.barHeight + a.barGap) + a.barHeight * 2 : v;
2045
+ }).attr("transform-origin", function(l, o) {
2046
+ return o = l.order, (O(l.startTime) + S + 0.5 * (O(l.endTime) - O(l.startTime))).toString() + "px " + (o * Y + F + 0.5 * v).toString() + "px";
2047
+ }).attr("class", function(l) {
2048
+ const o = "task";
2049
+ let P = "";
2050
+ l.classes.length > 0 && (P = l.classes.join(" "));
2051
+ let z = 0;
2052
+ for (const [K, X] of E.entries())
2053
+ l.type === X && (z = K % a.numberSectionStyles);
2054
+ let R = "";
2055
+ return l.active ? l.crit ? R += " activeCrit" : R = " active" : l.done ? l.crit ? R = " doneCrit" : R = " done" : l.crit && (R += " crit"), R.length === 0 && (R = " task"), l.milestone && (R = " milestone " + R), l.vert && (R = " vert " + R), R += z, R += " " + P, o + R;
2056
+ }), d.append("text").attr("id", function(l) {
2057
+ return l.id + "-text";
2058
+ }).text(function(l) {
2059
+ return l.task;
2060
+ }).attr("font-size", a.fontSize).attr("x", function(l) {
2061
+ let o = O(l.startTime), P = O(l.renderEndTime || l.endTime);
2062
+ if (l.milestone && (o += 0.5 * (O(l.endTime) - O(l.startTime)) - 0.5 * v, P = o + v), l.vert)
2063
+ return O(l.startTime) + S;
2064
+ const z = this.getBBox().width;
2065
+ return z > P - o ? P + z + 1.5 * a.leftPadding > u ? o + S - 5 : P + S + 5 : (P - o) / 2 + o + S;
2066
+ }).attr("y", function(l, o) {
2067
+ return l.vert ? a.gridLineStartPadding + g.length * (a.barHeight + a.barGap) + 60 : (o = l.order, o * Y + a.barHeight / 2 + (a.fontSize / 2 - 2) + F);
2068
+ }).attr("text-height", v).attr("class", function(l) {
2069
+ const o = O(l.startTime);
2070
+ let P = O(l.endTime);
2071
+ l.milestone && (P = o + v);
2072
+ const z = this.getBBox().width;
2073
+ let R = "";
2074
+ l.classes.length > 0 && (R = l.classes.join(" "));
2075
+ let K = 0;
2076
+ for (const [$, it] of E.entries())
2077
+ l.type === it && (K = $ % a.numberSectionStyles);
2078
+ let X = "";
2079
+ return l.active && (l.crit ? X = "activeCritText" + K : X = "activeText" + K), l.done ? l.crit ? X = X + " doneCritText" + K : X = X + " doneText" + K : l.crit && (X = X + " critText" + K), l.milestone && (X += " milestoneText"), l.vert && (X += " vertText"), z > P - o ? P + z + 1.5 * a.leftPadding > u ? R + " taskTextOutsideLeft taskTextOutside" + K + " " + X : R + " taskTextOutsideRight taskTextOutside" + K + " " + X + " width-" + z : R + " taskText taskText" + K + " " + X + " width-" + z;
2080
+ }), _t().securityLevel === "sandbox") {
2081
+ let l;
2082
+ l = Zt("#i" + e);
2083
+ const o = l.nodes()[0].contentDocument;
2084
+ d.filter(function(P) {
2085
+ return w.has(P.id);
2086
+ }).each(function(P) {
2087
+ var z = o.querySelector("#" + P.id), R = o.querySelector("#" + P.id + "-text");
2088
+ const K = z.parentNode;
2089
+ var X = o.createElement("a");
2090
+ X.setAttribute("xlink:href", w.get(P.id)), X.setAttribute("target", "_top"), K.appendChild(X), X.appendChild(z), X.appendChild(R);
2091
+ });
2092
+ }
2093
+ }
2094
+ h(V, "drawRects");
2095
+ function W(x, Y, F, S, v, U, u, m) {
2096
+ if (u.length === 0 && m.length === 0)
2097
+ return;
2098
+ let T, d;
2099
+ for (const { startTime: z, endTime: R } of U)
2100
+ (T === void 0 || z < T) && (T = z), (d === void 0 || R > d) && (d = R);
2101
+ if (!T || !d)
2102
+ return;
2103
+ if (at(d).diff(at(T), "year") > 5) {
2104
+ Qt.warn(
2105
+ "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
2106
+ );
2107
+ return;
2108
+ }
2109
+ const w = r.db.getDateFormat(), c = [];
2110
+ let l = null, o = at(T);
2111
+ for (; o.valueOf() <= d; )
2112
+ r.db.isInvalidDate(o, w, u, m) ? l ? l.end = o : l = {
2113
+ start: o,
2114
+ end: o
2115
+ } : l && (c.push(l), l = null), o = o.add(1, "d");
2116
+ G.append("g").selectAll("rect").data(c).enter().append("rect").attr("id", (z) => "exclude-" + z.start.format("YYYY-MM-DD")).attr("x", (z) => O(z.start.startOf("day")) + F).attr("y", a.gridLineStartPadding).attr("width", (z) => O(z.end.endOf("day")) - O(z.start.startOf("day"))).attr("height", v - Y - a.gridLineStartPadding).attr("transform-origin", function(z, R) {
2117
+ return (O(z.start) + F + 0.5 * (O(z.end) - O(z.start))).toString() + "px " + (R * x + 0.5 * v).toString() + "px";
2118
+ }).attr("class", "exclude-range");
2119
+ }
2120
+ h(W, "drawExcludeDays");
2121
+ function Z(x, Y, F, S) {
2122
+ const v = r.db.getDateFormat(), U = r.db.getAxisFormat();
2123
+ let u;
2124
+ U ? u = U : v === "D" ? u = "%d" : u = a.axisFormat ?? "%Y-%m-%d";
2125
+ let m = ar(O).tickSize(-S + Y + a.gridLineStartPadding).tickFormat(Kt(u));
2126
+ const d = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
2127
+ r.db.getTickInterval() || a.tickInterval
2128
+ );
2129
+ if (d !== null) {
2130
+ const w = d[1], c = d[2], l = r.db.getWeekday() || a.weekday;
2131
+ switch (c) {
2132
+ case "millisecond":
2133
+ m.ticks(Yt.every(w));
2134
+ break;
2135
+ case "second":
2136
+ m.ticks(vt.every(w));
2137
+ break;
2138
+ case "minute":
2139
+ m.ticks(Wt.every(w));
2140
+ break;
2141
+ case "hour":
2142
+ m.ticks(Ot.every(w));
2143
+ break;
2144
+ case "day":
2145
+ m.ticks(Tt.every(w));
2146
+ break;
2147
+ case "week":
2148
+ m.ticks(Qe[l].every(w));
2149
+ break;
2150
+ case "month":
2151
+ m.ticks(Nt.every(w));
2152
+ break;
2153
+ }
2154
+ }
2155
+ if (G.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + (S - 50) + ")").call(m).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || a.topAxis) {
2156
+ let w = rr(O).tickSize(-S + Y + a.gridLineStartPadding).tickFormat(Kt(u));
2157
+ if (d !== null) {
2158
+ const c = d[1], l = d[2], o = r.db.getWeekday() || a.weekday;
2159
+ switch (l) {
2160
+ case "millisecond":
2161
+ w.ticks(Yt.every(c));
2162
+ break;
2163
+ case "second":
2164
+ w.ticks(vt.every(c));
2165
+ break;
2166
+ case "minute":
2167
+ w.ticks(Wt.every(c));
2168
+ break;
2169
+ case "hour":
2170
+ w.ticks(Ot.every(c));
2171
+ break;
2172
+ case "day":
2173
+ w.ticks(Tt.every(c));
2174
+ break;
2175
+ case "week":
2176
+ w.ticks(Qe[o].every(c));
2177
+ break;
2178
+ case "month":
2179
+ w.ticks(Nt.every(c));
2180
+ break;
2181
+ }
2182
+ }
2183
+ G.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + Y + ")").call(w).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
2184
+ }
2185
+ }
2186
+ h(Z, "makeGrid");
2187
+ function Q(x, Y) {
2188
+ let F = 0;
2189
+ const S = Object.keys(C).map((v) => [v, C[v]]);
2190
+ G.append("g").selectAll("text").data(S).enter().append(function(v) {
2191
+ const U = v[0].split(Vn.lineBreakRegex), u = -(U.length - 1) / 2, m = _.createElementNS("http://www.w3.org/2000/svg", "text");
2192
+ m.setAttribute("dy", u + "em");
2193
+ for (const [T, d] of U.entries()) {
2194
+ const w = _.createElementNS("http://www.w3.org/2000/svg", "tspan");
2195
+ w.setAttribute("alignment-baseline", "central"), w.setAttribute("x", "10"), T > 0 && w.setAttribute("dy", "1em"), w.textContent = d, m.appendChild(w);
2196
+ }
2197
+ return m;
2198
+ }).attr("x", 10).attr("y", function(v, U) {
2199
+ if (U > 0)
2200
+ for (let u = 0; u < U; u++)
2201
+ return F += S[U - 1][1], v[1] * x / 2 + F * x + Y;
2202
+ else
2203
+ return v[1] * x / 2 + Y;
2204
+ }).attr("font-size", a.sectionFontSize).attr("class", function(v) {
2205
+ for (const [U, u] of E.entries())
2206
+ if (v[0] === u)
2207
+ return "sectionTitle sectionTitle" + U % a.numberSectionStyles;
2208
+ return "sectionTitle";
2209
+ });
2210
+ }
2211
+ h(Q, "vertLabels");
2212
+ function D(x, Y, F, S) {
2213
+ const v = r.db.getTodayMarker();
2214
+ if (v === "off")
2215
+ return;
2216
+ const U = G.append("g").attr("class", "today"), u = /* @__PURE__ */ new Date(), m = U.append("line");
2217
+ m.attr("x1", O(u) + x).attr("x2", O(u) + x).attr("y1", a.titleTopMargin).attr("y2", S - a.titleTopMargin).attr("class", "today"), v !== "" && m.attr("style", v.replace(/,/g, ";"));
2218
+ }
2219
+ h(D, "drawToday");
2220
+ function H(x) {
2221
+ const Y = {}, F = [];
2222
+ for (let S = 0, v = x.length; S < v; ++S)
2223
+ Object.prototype.hasOwnProperty.call(Y, x[S]) || (Y[x[S]] = !0, F.push(x[S]));
2224
+ return F;
2225
+ }
2226
+ h(H, "checkUnique");
2227
+ }, "draw"), Ti = {
2228
+ setConf: ki,
2229
+ draw: vi
2230
+ }, bi = /* @__PURE__ */ h((t) => `
2231
+ .mermaid-main-font {
2232
+ font-family: ${t.fontFamily};
2233
+ }
2234
+
2235
+ .exclude-range {
2236
+ fill: ${t.excludeBkgColor};
2237
+ }
2238
+
2239
+ .section {
2240
+ stroke: none;
2241
+ opacity: 0.2;
2242
+ }
2243
+
2244
+ .section0 {
2245
+ fill: ${t.sectionBkgColor};
2246
+ }
2247
+
2248
+ .section2 {
2249
+ fill: ${t.sectionBkgColor2};
2250
+ }
2251
+
2252
+ .section1,
2253
+ .section3 {
2254
+ fill: ${t.altSectionBkgColor};
2255
+ opacity: 0.2;
2256
+ }
2257
+
2258
+ .sectionTitle0 {
2259
+ fill: ${t.titleColor};
2260
+ }
2261
+
2262
+ .sectionTitle1 {
2263
+ fill: ${t.titleColor};
2264
+ }
2265
+
2266
+ .sectionTitle2 {
2267
+ fill: ${t.titleColor};
2268
+ }
2269
+
2270
+ .sectionTitle3 {
2271
+ fill: ${t.titleColor};
2272
+ }
2273
+
2274
+ .sectionTitle {
2275
+ text-anchor: start;
2276
+ font-family: ${t.fontFamily};
2277
+ }
2278
+
2279
+
2280
+ /* Grid and axis */
2281
+
2282
+ .grid .tick {
2283
+ stroke: ${t.gridColor};
2284
+ opacity: 0.8;
2285
+ shape-rendering: crispEdges;
2286
+ }
2287
+
2288
+ .grid .tick text {
2289
+ font-family: ${t.fontFamily};
2290
+ fill: ${t.textColor};
2291
+ }
2292
+
2293
+ .grid path {
2294
+ stroke-width: 0;
2295
+ }
2296
+
2297
+
2298
+ /* Today line */
2299
+
2300
+ .today {
2301
+ fill: none;
2302
+ stroke: ${t.todayLineColor};
2303
+ stroke-width: 2px;
2304
+ }
2305
+
2306
+
2307
+ /* Task styling */
2308
+
2309
+ /* Default task */
2310
+
2311
+ .task {
2312
+ stroke-width: 2;
2313
+ }
2314
+
2315
+ .taskText {
2316
+ text-anchor: middle;
2317
+ font-family: ${t.fontFamily};
2318
+ }
2319
+
2320
+ .taskTextOutsideRight {
2321
+ fill: ${t.taskTextDarkColor};
2322
+ text-anchor: start;
2323
+ font-family: ${t.fontFamily};
2324
+ }
2325
+
2326
+ .taskTextOutsideLeft {
2327
+ fill: ${t.taskTextDarkColor};
2328
+ text-anchor: end;
2329
+ }
2330
+
2331
+
2332
+ /* Special case clickable */
2333
+
2334
+ .task.clickable {
2335
+ cursor: pointer;
2336
+ }
2337
+
2338
+ .taskText.clickable {
2339
+ cursor: pointer;
2340
+ fill: ${t.taskTextClickableColor} !important;
2341
+ font-weight: bold;
2342
+ }
2343
+
2344
+ .taskTextOutsideLeft.clickable {
2345
+ cursor: pointer;
2346
+ fill: ${t.taskTextClickableColor} !important;
2347
+ font-weight: bold;
2348
+ }
2349
+
2350
+ .taskTextOutsideRight.clickable {
2351
+ cursor: pointer;
2352
+ fill: ${t.taskTextClickableColor} !important;
2353
+ font-weight: bold;
2354
+ }
2355
+
2356
+
2357
+ /* Specific task settings for the sections*/
2358
+
2359
+ .taskText0,
2360
+ .taskText1,
2361
+ .taskText2,
2362
+ .taskText3 {
2363
+ fill: ${t.taskTextColor};
2364
+ }
2365
+
2366
+ .task0,
2367
+ .task1,
2368
+ .task2,
2369
+ .task3 {
2370
+ fill: ${t.taskBkgColor};
2371
+ stroke: ${t.taskBorderColor};
2372
+ }
2373
+
2374
+ .taskTextOutside0,
2375
+ .taskTextOutside2
2376
+ {
2377
+ fill: ${t.taskTextOutsideColor};
2378
+ }
2379
+
2380
+ .taskTextOutside1,
2381
+ .taskTextOutside3 {
2382
+ fill: ${t.taskTextOutsideColor};
2383
+ }
2384
+
2385
+
2386
+ /* Active task */
2387
+
2388
+ .active0,
2389
+ .active1,
2390
+ .active2,
2391
+ .active3 {
2392
+ fill: ${t.activeTaskBkgColor};
2393
+ stroke: ${t.activeTaskBorderColor};
2394
+ }
2395
+
2396
+ .activeText0,
2397
+ .activeText1,
2398
+ .activeText2,
2399
+ .activeText3 {
2400
+ fill: ${t.taskTextDarkColor} !important;
2401
+ }
2402
+
2403
+
2404
+ /* Completed task */
2405
+
2406
+ .done0,
2407
+ .done1,
2408
+ .done2,
2409
+ .done3 {
2410
+ stroke: ${t.doneTaskBorderColor};
2411
+ fill: ${t.doneTaskBkgColor};
2412
+ stroke-width: 2;
2413
+ }
2414
+
2415
+ .doneText0,
2416
+ .doneText1,
2417
+ .doneText2,
2418
+ .doneText3 {
2419
+ fill: ${t.taskTextDarkColor} !important;
2420
+ }
2421
+
2422
+
2423
+ /* Tasks on the critical line */
2424
+
2425
+ .crit0,
2426
+ .crit1,
2427
+ .crit2,
2428
+ .crit3 {
2429
+ stroke: ${t.critBorderColor};
2430
+ fill: ${t.critBkgColor};
2431
+ stroke-width: 2;
2432
+ }
2433
+
2434
+ .activeCrit0,
2435
+ .activeCrit1,
2436
+ .activeCrit2,
2437
+ .activeCrit3 {
2438
+ stroke: ${t.critBorderColor};
2439
+ fill: ${t.activeTaskBkgColor};
2440
+ stroke-width: 2;
2441
+ }
2442
+
2443
+ .doneCrit0,
2444
+ .doneCrit1,
2445
+ .doneCrit2,
2446
+ .doneCrit3 {
2447
+ stroke: ${t.critBorderColor};
2448
+ fill: ${t.doneTaskBkgColor};
2449
+ stroke-width: 2;
2450
+ cursor: pointer;
2451
+ shape-rendering: crispEdges;
2452
+ }
2453
+
2454
+ .milestone {
2455
+ transform: rotate(45deg) scale(0.8,0.8);
2456
+ }
2457
+
2458
+ .milestoneText {
2459
+ font-style: italic;
2460
+ }
2461
+ .doneCritText0,
2462
+ .doneCritText1,
2463
+ .doneCritText2,
2464
+ .doneCritText3 {
2465
+ fill: ${t.taskTextDarkColor} !important;
2466
+ }
2467
+
2468
+ .vert {
2469
+ stroke: ${t.vertLineColor};
2470
+ }
2471
+
2472
+ .vertText {
2473
+ font-size: 15px;
2474
+ text-anchor: middle;
2475
+ fill: ${t.vertLineColor} !important;
2476
+ }
2477
+
2478
+ .activeCritText0,
2479
+ .activeCritText1,
2480
+ .activeCritText2,
2481
+ .activeCritText3 {
2482
+ fill: ${t.taskTextDarkColor} !important;
2483
+ }
2484
+
2485
+ .titleText {
2486
+ text-anchor: middle;
2487
+ font-size: 18px;
2488
+ fill: ${t.titleColor || t.textColor};
2489
+ font-family: ${t.fontFamily};
2490
+ }
2491
+ `, "getStyles"), xi = bi, _i = {
2492
+ parser: Aa,
2493
+ db: yi,
2494
+ renderer: Ti,
2495
+ styles: xi
2496
+ };
2497
+ export {
2498
+ _i as diagram
2499
+ };
src/backend/gradio_dropdownplus/templates/component/gitGraphDiagram-OJR772UL-gcjdT_Xe.js ADDED
@@ -0,0 +1,712 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { p as Z } from "./chunk-ANTBXLJU-BwgTSljF.js";
2
+ import { I as F } from "./chunk-FHKO5MBM-CzrxxPWK.js";
3
+ import { _ as h, q as U, p as rr, s as er, g as tr, a as ar, b as nr, l as m, c as sr, d as or, u as cr, C as ir, y as dr, k as B, D as hr, E as lr, F as $r, G as fr } from "./mermaid.core-DH6TRyjK.js";
4
+ import { p as gr } from "./treemap-75Q7IDZK-o7HSbXc7.js";
5
+ var u = {
6
+ NORMAL: 0,
7
+ REVERSE: 1,
8
+ HIGHLIGHT: 2,
9
+ MERGE: 3,
10
+ CHERRY_PICK: 4
11
+ }, yr = $r.gitGraph, z = /* @__PURE__ */ h(() => hr({
12
+ ...yr,
13
+ ...lr().gitGraph
14
+ }), "getConfig"), i = new F(() => {
15
+ const t = z(), r = t.mainBranchName, a = t.mainBranchOrder;
16
+ return {
17
+ mainBranchName: r,
18
+ commits: /* @__PURE__ */ new Map(),
19
+ head: null,
20
+ branchConfig: /* @__PURE__ */ new Map([[r, { name: r, order: a }]]),
21
+ branches: /* @__PURE__ */ new Map([[r, null]]),
22
+ currBranch: r,
23
+ direction: "LR",
24
+ seq: 0,
25
+ options: {}
26
+ };
27
+ });
28
+ function S() {
29
+ return fr({ length: 7 });
30
+ }
31
+ h(S, "getID");
32
+ function N(t, r) {
33
+ const a = /* @__PURE__ */ Object.create(null);
34
+ return t.reduce((s, e) => {
35
+ const n = r(e);
36
+ return a[n] || (a[n] = !0, s.push(e)), s;
37
+ }, []);
38
+ }
39
+ h(N, "uniqBy");
40
+ var xr = /* @__PURE__ */ h(function(t) {
41
+ i.records.direction = t;
42
+ }, "setDirection"), ur = /* @__PURE__ */ h(function(t) {
43
+ m.debug("options str", t), t = t == null ? void 0 : t.trim(), t = t || "{}";
44
+ try {
45
+ i.records.options = JSON.parse(t);
46
+ } catch (r) {
47
+ m.error("error while parsing gitGraph options", r.message);
48
+ }
49
+ }, "setOptions"), pr = /* @__PURE__ */ h(function() {
50
+ return i.records.options;
51
+ }, "getOptions"), br = /* @__PURE__ */ h(function(t) {
52
+ let r = t.msg, a = t.id;
53
+ const s = t.type;
54
+ let e = t.tags;
55
+ m.info("commit", r, a, s, e), m.debug("Entering commit:", r, a, s, e);
56
+ const n = z();
57
+ a = B.sanitizeText(a, n), r = B.sanitizeText(r, n), e = e == null ? void 0 : e.map((o) => B.sanitizeText(o, n));
58
+ const c = {
59
+ id: a || i.records.seq + "-" + S(),
60
+ message: r,
61
+ seq: i.records.seq++,
62
+ type: s ?? u.NORMAL,
63
+ tags: e ?? [],
64
+ parents: i.records.head == null ? [] : [i.records.head.id],
65
+ branch: i.records.currBranch
66
+ };
67
+ i.records.head = c, m.info("main branch", n.mainBranchName), i.records.commits.has(c.id) && m.warn(`Commit ID ${c.id} already exists`), i.records.commits.set(c.id, c), i.records.branches.set(i.records.currBranch, c.id), m.debug("in pushCommit " + c.id);
68
+ }, "commit"), mr = /* @__PURE__ */ h(function(t) {
69
+ let r = t.name;
70
+ const a = t.order;
71
+ if (r = B.sanitizeText(r, z()), i.records.branches.has(r))
72
+ throw new Error(
73
+ `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
74
+ );
75
+ i.records.branches.set(r, i.records.head != null ? i.records.head.id : null), i.records.branchConfig.set(r, { name: r, order: a }), _(r), m.debug("in createBranch");
76
+ }, "branch"), wr = /* @__PURE__ */ h((t) => {
77
+ let r = t.branch, a = t.id;
78
+ const s = t.type, e = t.tags, n = z();
79
+ r = B.sanitizeText(r, n), a && (a = B.sanitizeText(a, n));
80
+ const c = i.records.branches.get(i.records.currBranch), o = i.records.branches.get(r), $ = c ? i.records.commits.get(c) : void 0, l = o ? i.records.commits.get(o) : void 0;
81
+ if ($ && l && $.branch === r)
82
+ throw new Error(`Cannot merge branch '${r}' into itself.`);
83
+ if (i.records.currBranch === r) {
84
+ const d = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
85
+ throw d.hash = {
86
+ text: `merge ${r}`,
87
+ token: `merge ${r}`,
88
+ expected: ["branch abc"]
89
+ }, d;
90
+ }
91
+ if ($ === void 0 || !$) {
92
+ const d = new Error(
93
+ `Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`
94
+ );
95
+ throw d.hash = {
96
+ text: `merge ${r}`,
97
+ token: `merge ${r}`,
98
+ expected: ["commit"]
99
+ }, d;
100
+ }
101
+ if (!i.records.branches.has(r)) {
102
+ const d = new Error(
103
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
104
+ );
105
+ throw d.hash = {
106
+ text: `merge ${r}`,
107
+ token: `merge ${r}`,
108
+ expected: [`branch ${r}`]
109
+ }, d;
110
+ }
111
+ if (l === void 0 || !l) {
112
+ const d = new Error(
113
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
114
+ );
115
+ throw d.hash = {
116
+ text: `merge ${r}`,
117
+ token: `merge ${r}`,
118
+ expected: ['"commit"']
119
+ }, d;
120
+ }
121
+ if ($ === l) {
122
+ const d = new Error('Incorrect usage of "merge". Both branches have same head');
123
+ throw d.hash = {
124
+ text: `merge ${r}`,
125
+ token: `merge ${r}`,
126
+ expected: ["branch abc"]
127
+ }, d;
128
+ }
129
+ if (a && i.records.commits.has(a)) {
130
+ const d = new Error(
131
+ 'Incorrect usage of "merge". Commit with id:' + a + " already exists, use different custom id"
132
+ );
133
+ throw d.hash = {
134
+ text: `merge ${r} ${a} ${s} ${e == null ? void 0 : e.join(" ")}`,
135
+ token: `merge ${r} ${a} ${s} ${e == null ? void 0 : e.join(" ")}`,
136
+ expected: [
137
+ `merge ${r} ${a}_UNIQUE ${s} ${e == null ? void 0 : e.join(" ")}`
138
+ ]
139
+ }, d;
140
+ }
141
+ const f = o || "", g = {
142
+ id: a || `${i.records.seq}-${S()}`,
143
+ message: `merged branch ${r} into ${i.records.currBranch}`,
144
+ seq: i.records.seq++,
145
+ parents: i.records.head == null ? [] : [i.records.head.id, f],
146
+ branch: i.records.currBranch,
147
+ type: u.MERGE,
148
+ customType: s,
149
+ customId: !!a,
150
+ tags: e ?? []
151
+ };
152
+ i.records.head = g, i.records.commits.set(g.id, g), i.records.branches.set(i.records.currBranch, g.id), m.debug(i.records.branches), m.debug("in mergeBranch");
153
+ }, "merge"), vr = /* @__PURE__ */ h(function(t) {
154
+ let r = t.id, a = t.targetId, s = t.tags, e = t.parent;
155
+ m.debug("Entering cherryPick:", r, a, s);
156
+ const n = z();
157
+ if (r = B.sanitizeText(r, n), a = B.sanitizeText(a, n), s = s == null ? void 0 : s.map(($) => B.sanitizeText($, n)), e = B.sanitizeText(e, n), !r || !i.records.commits.has(r)) {
158
+ const $ = new Error(
159
+ 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
160
+ );
161
+ throw $.hash = {
162
+ text: `cherryPick ${r} ${a}`,
163
+ token: `cherryPick ${r} ${a}`,
164
+ expected: ["cherry-pick abc"]
165
+ }, $;
166
+ }
167
+ const c = i.records.commits.get(r);
168
+ if (c === void 0 || !c)
169
+ throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
170
+ if (e && !(Array.isArray(c.parents) && c.parents.includes(e)))
171
+ throw new Error(
172
+ "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
173
+ );
174
+ const o = c.branch;
175
+ if (c.type === u.MERGE && !e)
176
+ throw new Error(
177
+ "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
178
+ );
179
+ if (!a || !i.records.commits.has(a)) {
180
+ if (o === i.records.currBranch) {
181
+ const g = new Error(
182
+ 'Incorrect usage of "cherryPick". Source commit is already on current branch'
183
+ );
184
+ throw g.hash = {
185
+ text: `cherryPick ${r} ${a}`,
186
+ token: `cherryPick ${r} ${a}`,
187
+ expected: ["cherry-pick abc"]
188
+ }, g;
189
+ }
190
+ const $ = i.records.branches.get(i.records.currBranch);
191
+ if ($ === void 0 || !$) {
192
+ const g = new Error(
193
+ `Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`
194
+ );
195
+ throw g.hash = {
196
+ text: `cherryPick ${r} ${a}`,
197
+ token: `cherryPick ${r} ${a}`,
198
+ expected: ["cherry-pick abc"]
199
+ }, g;
200
+ }
201
+ const l = i.records.commits.get($);
202
+ if (l === void 0 || !l) {
203
+ const g = new Error(
204
+ `Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`
205
+ );
206
+ throw g.hash = {
207
+ text: `cherryPick ${r} ${a}`,
208
+ token: `cherryPick ${r} ${a}`,
209
+ expected: ["cherry-pick abc"]
210
+ }, g;
211
+ }
212
+ const f = {
213
+ id: i.records.seq + "-" + S(),
214
+ message: `cherry-picked ${c == null ? void 0 : c.message} into ${i.records.currBranch}`,
215
+ seq: i.records.seq++,
216
+ parents: i.records.head == null ? [] : [i.records.head.id, c.id],
217
+ branch: i.records.currBranch,
218
+ type: u.CHERRY_PICK,
219
+ tags: s ? s.filter(Boolean) : [
220
+ `cherry-pick:${c.id}${c.type === u.MERGE ? `|parent:${e}` : ""}`
221
+ ]
222
+ };
223
+ i.records.head = f, i.records.commits.set(f.id, f), i.records.branches.set(i.records.currBranch, f.id), m.debug(i.records.branches), m.debug("in cherryPick");
224
+ }
225
+ }, "cherryPick"), _ = /* @__PURE__ */ h(function(t) {
226
+ if (t = B.sanitizeText(t, z()), i.records.branches.has(t)) {
227
+ i.records.currBranch = t;
228
+ const r = i.records.branches.get(i.records.currBranch);
229
+ r === void 0 || !r ? i.records.head = null : i.records.head = i.records.commits.get(r) ?? null;
230
+ } else {
231
+ const r = new Error(
232
+ `Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`
233
+ );
234
+ throw r.hash = {
235
+ text: `checkout ${t}`,
236
+ token: `checkout ${t}`,
237
+ expected: [`branch ${t}`]
238
+ }, r;
239
+ }
240
+ }, "checkout");
241
+ function D(t, r, a) {
242
+ const s = t.indexOf(r);
243
+ s === -1 ? t.push(a) : t.splice(s, 1, a);
244
+ }
245
+ h(D, "upsert");
246
+ function A(t) {
247
+ const r = t.reduce((e, n) => e.seq > n.seq ? e : n, t[0]);
248
+ let a = "";
249
+ t.forEach(function(e) {
250
+ e === r ? a += " *" : a += " |";
251
+ });
252
+ const s = [a, r.id, r.seq];
253
+ for (const e in i.records.branches)
254
+ i.records.branches.get(e) === r.id && s.push(e);
255
+ if (m.debug(s.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
256
+ const e = i.records.commits.get(r.parents[0]);
257
+ D(t, r, e), r.parents[1] && t.push(i.records.commits.get(r.parents[1]));
258
+ } else {
259
+ if (r.parents.length == 0)
260
+ return;
261
+ if (r.parents[0]) {
262
+ const e = i.records.commits.get(r.parents[0]);
263
+ D(t, r, e);
264
+ }
265
+ }
266
+ t = N(t, (e) => e.id), A(t);
267
+ }
268
+ h(A, "prettyPrintCommitHistory");
269
+ var Cr = /* @__PURE__ */ h(function() {
270
+ m.debug(i.records.commits);
271
+ const t = V()[0];
272
+ A([t]);
273
+ }, "prettyPrint"), Er = /* @__PURE__ */ h(function() {
274
+ i.reset(), dr();
275
+ }, "clear"), Br = /* @__PURE__ */ h(function() {
276
+ return [...i.records.branchConfig.values()].map((r, a) => r.order !== null && r.order !== void 0 ? r : {
277
+ ...r,
278
+ order: parseFloat(`0.${a}`)
279
+ }).sort((r, a) => (r.order ?? 0) - (a.order ?? 0)).map(({ name: r }) => ({ name: r }));
280
+ }, "getBranchesAsObjArray"), kr = /* @__PURE__ */ h(function() {
281
+ return i.records.branches;
282
+ }, "getBranches"), Lr = /* @__PURE__ */ h(function() {
283
+ return i.records.commits;
284
+ }, "getCommits"), V = /* @__PURE__ */ h(function() {
285
+ const t = [...i.records.commits.values()];
286
+ return t.forEach(function(r) {
287
+ m.debug(r.id);
288
+ }), t.sort((r, a) => r.seq - a.seq), t;
289
+ }, "getCommitsArray"), Tr = /* @__PURE__ */ h(function() {
290
+ return i.records.currBranch;
291
+ }, "getCurrentBranch"), Mr = /* @__PURE__ */ h(function() {
292
+ return i.records.direction;
293
+ }, "getDirection"), Rr = /* @__PURE__ */ h(function() {
294
+ return i.records.head;
295
+ }, "getHead"), X = {
296
+ commitType: u,
297
+ getConfig: z,
298
+ setDirection: xr,
299
+ setOptions: ur,
300
+ getOptions: pr,
301
+ commit: br,
302
+ branch: mr,
303
+ merge: wr,
304
+ cherryPick: vr,
305
+ checkout: _,
306
+ //reset,
307
+ prettyPrint: Cr,
308
+ clear: Er,
309
+ getBranchesAsObjArray: Br,
310
+ getBranches: kr,
311
+ getCommits: Lr,
312
+ getCommitsArray: V,
313
+ getCurrentBranch: Tr,
314
+ getDirection: Mr,
315
+ getHead: Rr,
316
+ setAccTitle: nr,
317
+ getAccTitle: ar,
318
+ getAccDescription: tr,
319
+ setAccDescription: er,
320
+ setDiagramTitle: rr,
321
+ getDiagramTitle: U
322
+ }, Ir = /* @__PURE__ */ h((t, r) => {
323
+ Z(t, r), t.dir && r.setDirection(t.dir);
324
+ for (const a of t.statements)
325
+ qr(a, r);
326
+ }, "populate"), qr = /* @__PURE__ */ h((t, r) => {
327
+ const s = {
328
+ Commit: /* @__PURE__ */ h((e) => r.commit(Or(e)), "Commit"),
329
+ Branch: /* @__PURE__ */ h((e) => r.branch(zr(e)), "Branch"),
330
+ Merge: /* @__PURE__ */ h((e) => r.merge(Gr(e)), "Merge"),
331
+ Checkout: /* @__PURE__ */ h((e) => r.checkout(Hr(e)), "Checkout"),
332
+ CherryPicking: /* @__PURE__ */ h((e) => r.cherryPick(Pr(e)), "CherryPicking")
333
+ }[t.$type];
334
+ s ? s(t) : m.error(`Unknown statement type: ${t.$type}`);
335
+ }, "parseStatement"), Or = /* @__PURE__ */ h((t) => ({
336
+ id: t.id,
337
+ msg: t.message ?? "",
338
+ type: t.type !== void 0 ? u[t.type] : u.NORMAL,
339
+ tags: t.tags ?? void 0
340
+ }), "parseCommit"), zr = /* @__PURE__ */ h((t) => ({
341
+ name: t.name,
342
+ order: t.order ?? 0
343
+ }), "parseBranch"), Gr = /* @__PURE__ */ h((t) => ({
344
+ branch: t.branch,
345
+ id: t.id ?? "",
346
+ type: t.type !== void 0 ? u[t.type] : void 0,
347
+ tags: t.tags ?? void 0
348
+ }), "parseMerge"), Hr = /* @__PURE__ */ h((t) => t.branch, "parseCheckout"), Pr = /* @__PURE__ */ h((t) => {
349
+ var a;
350
+ return {
351
+ id: t.id,
352
+ targetId: "",
353
+ tags: ((a = t.tags) == null ? void 0 : a.length) === 0 ? void 0 : t.tags,
354
+ parent: t.parent
355
+ };
356
+ }, "parseCherryPicking"), Wr = {
357
+ parse: /* @__PURE__ */ h(async (t) => {
358
+ const r = await gr("gitGraph", t);
359
+ m.debug(r), Ir(r, X);
360
+ }, "parse")
361
+ }, j = sr(), b = j == null ? void 0 : j.gitGraph, R = 10, I = 40, k = 4, L = 2, O = 8, C = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), P = 30, G = /* @__PURE__ */ new Map(), W = [], M = 0, x = "LR", Sr = /* @__PURE__ */ h(() => {
362
+ C.clear(), E.clear(), G.clear(), M = 0, W = [], x = "LR";
363
+ }, "clear"), J = /* @__PURE__ */ h((t) => {
364
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
365
+ return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((s) => {
366
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
367
+ e.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), e.setAttribute("dy", "1em"), e.setAttribute("x", "0"), e.setAttribute("class", "row"), e.textContent = s.trim(), r.appendChild(e);
368
+ }), r;
369
+ }, "drawText"), Q = /* @__PURE__ */ h((t) => {
370
+ let r, a, s;
371
+ return x === "BT" ? (a = /* @__PURE__ */ h((e, n) => e <= n, "comparisonFunc"), s = 1 / 0) : (a = /* @__PURE__ */ h((e, n) => e >= n, "comparisonFunc"), s = 0), t.forEach((e) => {
372
+ var c, o;
373
+ const n = x === "TB" || x == "BT" ? (c = E.get(e)) == null ? void 0 : c.y : (o = E.get(e)) == null ? void 0 : o.x;
374
+ n !== void 0 && a(n, s) && (r = e, s = n);
375
+ }), r;
376
+ }, "findClosestParent"), jr = /* @__PURE__ */ h((t) => {
377
+ let r = "", a = 1 / 0;
378
+ return t.forEach((s) => {
379
+ const e = E.get(s).y;
380
+ e <= a && (r = s, a = e);
381
+ }), r || void 0;
382
+ }, "findClosestParentBT"), Dr = /* @__PURE__ */ h((t, r, a) => {
383
+ let s = a, e = a;
384
+ const n = [];
385
+ t.forEach((c) => {
386
+ const o = r.get(c);
387
+ if (!o)
388
+ throw new Error(`Commit not found for key ${c}`);
389
+ o.parents.length ? (s = Yr(o), e = Math.max(s, e)) : n.push(o), Kr(o, s);
390
+ }), s = e, n.forEach((c) => {
391
+ Nr(c, s, a);
392
+ }), t.forEach((c) => {
393
+ const o = r.get(c);
394
+ if (o != null && o.parents.length) {
395
+ const $ = jr(o.parents);
396
+ s = E.get($).y - I, s <= e && (e = s);
397
+ const l = C.get(o.branch).pos, f = s - R;
398
+ E.set(o.id, { x: l, y: f });
399
+ }
400
+ });
401
+ }, "setParallelBTPos"), Ar = /* @__PURE__ */ h((t) => {
402
+ var s;
403
+ const r = Q(t.parents.filter((e) => e !== null));
404
+ if (!r)
405
+ throw new Error(`Closest parent not found for commit ${t.id}`);
406
+ const a = (s = E.get(r)) == null ? void 0 : s.y;
407
+ if (a === void 0)
408
+ throw new Error(`Closest parent position not found for commit ${t.id}`);
409
+ return a;
410
+ }, "findClosestParentPos"), Yr = /* @__PURE__ */ h((t) => Ar(t) + I, "calculateCommitPosition"), Kr = /* @__PURE__ */ h((t, r) => {
411
+ const a = C.get(t.branch);
412
+ if (!a)
413
+ throw new Error(`Branch not found for commit ${t.id}`);
414
+ const s = a.pos, e = r + R;
415
+ return E.set(t.id, { x: s, y: e }), { x: s, y: e };
416
+ }, "setCommitPosition"), Nr = /* @__PURE__ */ h((t, r, a) => {
417
+ const s = C.get(t.branch);
418
+ if (!s)
419
+ throw new Error(`Branch not found for commit ${t.id}`);
420
+ const e = r + a, n = s.pos;
421
+ E.set(t.id, { x: n, y: e });
422
+ }, "setRootPosition"), _r = /* @__PURE__ */ h((t, r, a, s, e, n) => {
423
+ if (n === u.HIGHLIGHT)
424
+ t.append("rect").attr("x", a.x - 10).attr("y", a.y - 10).attr("width", 20).attr("height", 20).attr(
425
+ "class",
426
+ `commit ${r.id} commit-highlight${e % O} ${s}-outer`
427
+ ), t.append("rect").attr("x", a.x - 6).attr("y", a.y - 6).attr("width", 12).attr("height", 12).attr(
428
+ "class",
429
+ `commit ${r.id} commit${e % O} ${s}-inner`
430
+ );
431
+ else if (n === u.CHERRY_PICK)
432
+ t.append("circle").attr("cx", a.x).attr("cy", a.y).attr("r", 10).attr("class", `commit ${r.id} ${s}`), t.append("circle").attr("cx", a.x - 3).attr("cy", a.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${s}`), t.append("circle").attr("cx", a.x + 3).attr("cy", a.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${s}`), t.append("line").attr("x1", a.x + 3).attr("y1", a.y + 1).attr("x2", a.x).attr("y2", a.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${s}`), t.append("line").attr("x1", a.x - 3).attr("y1", a.y + 1).attr("x2", a.x).attr("y2", a.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${s}`);
433
+ else {
434
+ const c = t.append("circle");
435
+ if (c.attr("cx", a.x), c.attr("cy", a.y), c.attr("r", r.type === u.MERGE ? 9 : 10), c.attr("class", `commit ${r.id} commit${e % O}`), n === u.MERGE) {
436
+ const o = t.append("circle");
437
+ o.attr("cx", a.x), o.attr("cy", a.y), o.attr("r", 6), o.attr(
438
+ "class",
439
+ `commit ${s} ${r.id} commit${e % O}`
440
+ );
441
+ }
442
+ n === u.REVERSE && t.append("path").attr(
443
+ "d",
444
+ `M ${a.x - 5},${a.y - 5}L${a.x + 5},${a.y + 5}M${a.x - 5},${a.y + 5}L${a.x + 5},${a.y - 5}`
445
+ ).attr("class", `commit ${s} ${r.id} commit${e % O}`);
446
+ }
447
+ }, "drawCommitBullet"), Vr = /* @__PURE__ */ h((t, r, a, s) => {
448
+ var e;
449
+ if (r.type !== u.CHERRY_PICK && (r.customId && r.type === u.MERGE || r.type !== u.MERGE) && (b != null && b.showCommitLabel)) {
450
+ const n = t.append("g"), c = n.insert("rect").attr("class", "commit-label-bkg"), o = n.append("text").attr("x", s).attr("y", a.y + 25).attr("class", "commit-label").text(r.id), $ = (e = o.node()) == null ? void 0 : e.getBBox();
451
+ if ($ && (c.attr("x", a.posWithOffset - $.width / 2 - L).attr("y", a.y + 13.5).attr("width", $.width + 2 * L).attr("height", $.height + 2 * L), x === "TB" || x === "BT" ? (c.attr("x", a.x - ($.width + 4 * k + 5)).attr("y", a.y - 12), o.attr("x", a.x - ($.width + 4 * k)).attr("y", a.y + $.height - 12)) : o.attr("x", a.posWithOffset - $.width / 2), b.rotateCommitLabel))
452
+ if (x === "TB" || x === "BT")
453
+ o.attr(
454
+ "transform",
455
+ "rotate(-45, " + a.x + ", " + a.y + ")"
456
+ ), c.attr(
457
+ "transform",
458
+ "rotate(-45, " + a.x + ", " + a.y + ")"
459
+ );
460
+ else {
461
+ const l = -7.5 - ($.width + 10) / 25 * 9.5, f = 10 + $.width / 25 * 8.5;
462
+ n.attr(
463
+ "transform",
464
+ "translate(" + l + ", " + f + ") rotate(-45, " + s + ", " + a.y + ")"
465
+ );
466
+ }
467
+ }
468
+ }, "drawCommitLabel"), Xr = /* @__PURE__ */ h((t, r, a, s) => {
469
+ var e;
470
+ if (r.tags.length > 0) {
471
+ let n = 0, c = 0, o = 0;
472
+ const $ = [];
473
+ for (const l of r.tags.reverse()) {
474
+ const f = t.insert("polygon"), g = t.append("circle"), d = t.append("text").attr("y", a.y - 16 - n).attr("class", "tag-label").text(l), y = (e = d.node()) == null ? void 0 : e.getBBox();
475
+ if (!y)
476
+ throw new Error("Tag bbox not found");
477
+ c = Math.max(c, y.width), o = Math.max(o, y.height), d.attr("x", a.posWithOffset - y.width / 2), $.push({
478
+ tag: d,
479
+ hole: g,
480
+ rect: f,
481
+ yOffset: n
482
+ }), n += 20;
483
+ }
484
+ for (const { tag: l, hole: f, rect: g, yOffset: d } of $) {
485
+ const y = o / 2, p = a.y - 19.2 - d;
486
+ if (g.attr("class", "tag-label-bkg").attr(
487
+ "points",
488
+ `
489
+ ${s - c / 2 - k / 2},${p + L}
490
+ ${s - c / 2 - k / 2},${p - L}
491
+ ${a.posWithOffset - c / 2 - k},${p - y - L}
492
+ ${a.posWithOffset + c / 2 + k},${p - y - L}
493
+ ${a.posWithOffset + c / 2 + k},${p + y + L}
494
+ ${a.posWithOffset - c / 2 - k},${p + y + L}`
495
+ ), f.attr("cy", p).attr("cx", s - c / 2 + k / 2).attr("r", 1.5).attr("class", "tag-hole"), x === "TB" || x === "BT") {
496
+ const w = s + d;
497
+ g.attr("class", "tag-label-bkg").attr(
498
+ "points",
499
+ `
500
+ ${a.x},${w + 2}
501
+ ${a.x},${w - 2}
502
+ ${a.x + R},${w - y - 2}
503
+ ${a.x + R + c + 4},${w - y - 2}
504
+ ${a.x + R + c + 4},${w + y + 2}
505
+ ${a.x + R},${w + y + 2}`
506
+ ).attr("transform", "translate(12,12) rotate(45, " + a.x + "," + s + ")"), f.attr("cx", a.x + k / 2).attr("cy", w).attr("transform", "translate(12,12) rotate(45, " + a.x + "," + s + ")"), l.attr("x", a.x + 5).attr("y", w + 3).attr("transform", "translate(14,14) rotate(45, " + a.x + "," + s + ")");
507
+ }
508
+ }
509
+ }
510
+ }, "drawCommitTags"), Jr = /* @__PURE__ */ h((t) => {
511
+ switch (t.customType ?? t.type) {
512
+ case u.NORMAL:
513
+ return "commit-normal";
514
+ case u.REVERSE:
515
+ return "commit-reverse";
516
+ case u.HIGHLIGHT:
517
+ return "commit-highlight";
518
+ case u.MERGE:
519
+ return "commit-merge";
520
+ case u.CHERRY_PICK:
521
+ return "commit-cherry-pick";
522
+ default:
523
+ return "commit-normal";
524
+ }
525
+ }, "getCommitClassType"), Qr = /* @__PURE__ */ h((t, r, a, s) => {
526
+ const e = { x: 0, y: 0 };
527
+ if (t.parents.length > 0) {
528
+ const n = Q(t.parents);
529
+ if (n) {
530
+ const c = s.get(n) ?? e;
531
+ return r === "TB" ? c.y + I : r === "BT" ? (s.get(t.id) ?? e).y - I : c.x + I;
532
+ }
533
+ } else
534
+ return r === "TB" ? P : r === "BT" ? (s.get(t.id) ?? e).y - I : 0;
535
+ return 0;
536
+ }, "calculatePosition"), Zr = /* @__PURE__ */ h((t, r, a) => {
537
+ var c, o;
538
+ const s = x === "BT" && a ? r : r + R, e = x === "TB" || x === "BT" ? s : (c = C.get(t.branch)) == null ? void 0 : c.pos, n = x === "TB" || x === "BT" ? (o = C.get(t.branch)) == null ? void 0 : o.pos : s;
539
+ if (n === void 0 || e === void 0)
540
+ throw new Error(`Position were undefined for commit ${t.id}`);
541
+ return { x: n, y: e, posWithOffset: s };
542
+ }, "getCommitPosition"), K = /* @__PURE__ */ h((t, r, a) => {
543
+ if (!b)
544
+ throw new Error("GitGraph config not found");
545
+ const s = t.append("g").attr("class", "commit-bullets"), e = t.append("g").attr("class", "commit-labels");
546
+ let n = x === "TB" || x === "BT" ? P : 0;
547
+ const c = [...r.keys()], o = (b == null ? void 0 : b.parallelCommits) ?? !1, $ = /* @__PURE__ */ h((f, g) => {
548
+ var p, w;
549
+ const d = (p = r.get(f)) == null ? void 0 : p.seq, y = (w = r.get(g)) == null ? void 0 : w.seq;
550
+ return d !== void 0 && y !== void 0 ? d - y : 0;
551
+ }, "sortKeys");
552
+ let l = c.sort($);
553
+ x === "BT" && (o && Dr(l, r, n), l = l.reverse()), l.forEach((f) => {
554
+ var y;
555
+ const g = r.get(f);
556
+ if (!g)
557
+ throw new Error(`Commit not found for key ${f}`);
558
+ o && (n = Qr(g, x, n, E));
559
+ const d = Zr(g, n, o);
560
+ if (a) {
561
+ const p = Jr(g), w = g.customType ?? g.type, q = ((y = C.get(g.branch)) == null ? void 0 : y.index) ?? 0;
562
+ _r(s, g, d, p, q, w), Vr(e, g, d, n), Xr(e, g, d, n);
563
+ }
564
+ x === "TB" || x === "BT" ? E.set(g.id, { x: d.x, y: d.posWithOffset }) : E.set(g.id, { x: d.posWithOffset, y: d.y }), n = x === "BT" && o ? n + I : n + I + R, n > M && (M = n);
565
+ });
566
+ }, "drawCommits"), Fr = /* @__PURE__ */ h((t, r, a, s, e) => {
567
+ const c = (x === "TB" || x === "BT" ? a.x < s.x : a.y < s.y) ? r.branch : t.branch, o = /* @__PURE__ */ h((l) => l.branch === c, "isOnBranchToGetCurve"), $ = /* @__PURE__ */ h((l) => l.seq > t.seq && l.seq < r.seq, "isBetweenCommits");
568
+ return [...e.values()].some((l) => $(l) && o(l));
569
+ }, "shouldRerouteArrow"), H = /* @__PURE__ */ h((t, r, a = 0) => {
570
+ const s = t + Math.abs(t - r) / 2;
571
+ if (a > 5)
572
+ return s;
573
+ if (W.every((c) => Math.abs(c - s) >= 10))
574
+ return W.push(s), s;
575
+ const n = Math.abs(t - r);
576
+ return H(t, r - n / 5, a + 1);
577
+ }, "findLane"), Ur = /* @__PURE__ */ h((t, r, a, s) => {
578
+ var y, p, w, q, Y;
579
+ const e = E.get(r.id), n = E.get(a.id);
580
+ if (e === void 0 || n === void 0)
581
+ throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);
582
+ const c = Fr(r, a, e, n, s);
583
+ let o = "", $ = "", l = 0, f = 0, g = (y = C.get(a.branch)) == null ? void 0 : y.index;
584
+ a.type === u.MERGE && r.id !== a.parents[0] && (g = (p = C.get(r.branch)) == null ? void 0 : p.index);
585
+ let d;
586
+ if (c) {
587
+ o = "A 10 10, 0, 0, 0,", $ = "A 10 10, 0, 0, 1,", l = 10, f = 10;
588
+ const T = e.y < n.y ? H(e.y, n.y) : H(n.y, e.y), v = e.x < n.x ? H(e.x, n.x) : H(n.x, e.x);
589
+ x === "TB" ? e.x < n.x ? d = `M ${e.x} ${e.y} L ${v - l} ${e.y} ${$} ${v} ${e.y + f} L ${v} ${n.y - l} ${o} ${v + f} ${n.y} L ${n.x} ${n.y}` : (g = (w = C.get(r.branch)) == null ? void 0 : w.index, d = `M ${e.x} ${e.y} L ${v + l} ${e.y} ${o} ${v} ${e.y + f} L ${v} ${n.y - l} ${$} ${v - f} ${n.y} L ${n.x} ${n.y}`) : x === "BT" ? e.x < n.x ? d = `M ${e.x} ${e.y} L ${v - l} ${e.y} ${o} ${v} ${e.y - f} L ${v} ${n.y + l} ${$} ${v + f} ${n.y} L ${n.x} ${n.y}` : (g = (q = C.get(r.branch)) == null ? void 0 : q.index, d = `M ${e.x} ${e.y} L ${v + l} ${e.y} ${$} ${v} ${e.y - f} L ${v} ${n.y + l} ${o} ${v - f} ${n.y} L ${n.x} ${n.y}`) : e.y < n.y ? d = `M ${e.x} ${e.y} L ${e.x} ${T - l} ${o} ${e.x + f} ${T} L ${n.x - l} ${T} ${$} ${n.x} ${T + f} L ${n.x} ${n.y}` : (g = (Y = C.get(r.branch)) == null ? void 0 : Y.index, d = `M ${e.x} ${e.y} L ${e.x} ${T + l} ${$} ${e.x + f} ${T} L ${n.x - l} ${T} ${o} ${n.x} ${T - f} L ${n.x} ${n.y}`);
590
+ } else
591
+ o = "A 20 20, 0, 0, 0,", $ = "A 20 20, 0, 0, 1,", l = 20, f = 20, x === "TB" ? (e.x < n.x && (a.type === u.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y - l} ${o} ${e.x + f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${$} ${n.x} ${e.y + f} L ${n.x} ${n.y}`), e.x > n.x && (o = "A 20 20, 0, 0, 0,", $ = "A 20 20, 0, 0, 1,", l = 20, f = 20, a.type === u.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y - l} ${$} ${e.x - f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x + l} ${e.y} ${o} ${n.x} ${e.y + f} L ${n.x} ${n.y}`), e.x === n.x && (d = `M ${e.x} ${e.y} L ${n.x} ${n.y}`)) : x === "BT" ? (e.x < n.x && (a.type === u.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y + l} ${$} ${e.x + f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${o} ${n.x} ${e.y - f} L ${n.x} ${n.y}`), e.x > n.x && (o = "A 20 20, 0, 0, 0,", $ = "A 20 20, 0, 0, 1,", l = 20, f = 20, a.type === u.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y + l} ${o} ${e.x - f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${o} ${n.x} ${e.y - f} L ${n.x} ${n.y}`), e.x === n.x && (d = `M ${e.x} ${e.y} L ${n.x} ${n.y}`)) : (e.y < n.y && (a.type === u.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${$} ${n.x} ${e.y + f} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${e.x} ${n.y - l} ${o} ${e.x + f} ${n.y} L ${n.x} ${n.y}`), e.y > n.y && (a.type === u.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${o} ${n.x} ${e.y - f} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${e.x} ${n.y + l} ${$} ${e.x + f} ${n.y} L ${n.x} ${n.y}`), e.y === n.y && (d = `M ${e.x} ${e.y} L ${n.x} ${n.y}`));
592
+ if (d === void 0)
593
+ throw new Error("Line definition not found");
594
+ t.append("path").attr("d", d).attr("class", "arrow arrow" + g % O);
595
+ }, "drawArrow"), re = /* @__PURE__ */ h((t, r) => {
596
+ const a = t.append("g").attr("class", "commit-arrows");
597
+ [...r.keys()].forEach((s) => {
598
+ const e = r.get(s);
599
+ e.parents && e.parents.length > 0 && e.parents.forEach((n) => {
600
+ Ur(a, r.get(n), e, r);
601
+ });
602
+ });
603
+ }, "drawArrows"), ee = /* @__PURE__ */ h((t, r) => {
604
+ const a = t.append("g");
605
+ r.forEach((s, e) => {
606
+ var p;
607
+ const n = e % O, c = (p = C.get(s.name)) == null ? void 0 : p.pos;
608
+ if (c === void 0)
609
+ throw new Error(`Position not found for branch ${s.name}`);
610
+ const o = a.append("line");
611
+ o.attr("x1", 0), o.attr("y1", c), o.attr("x2", M), o.attr("y2", c), o.attr("class", "branch branch" + n), x === "TB" ? (o.attr("y1", P), o.attr("x1", c), o.attr("y2", M), o.attr("x2", c)) : x === "BT" && (o.attr("y1", M), o.attr("x1", c), o.attr("y2", P), o.attr("x2", c)), W.push(c);
612
+ const $ = s.name, l = J($), f = a.insert("rect"), d = a.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + n);
613
+ d.node().appendChild(l);
614
+ const y = l.getBBox();
615
+ f.attr("class", "branchLabelBkg label" + n).attr("rx", 4).attr("ry", 4).attr("x", -y.width - 4 - ((b == null ? void 0 : b.rotateCommitLabel) === !0 ? 30 : 0)).attr("y", -y.height / 2 + 8).attr("width", y.width + 18).attr("height", y.height + 4), d.attr(
616
+ "transform",
617
+ "translate(" + (-y.width - 14 - ((b == null ? void 0 : b.rotateCommitLabel) === !0 ? 30 : 0)) + ", " + (c - y.height / 2 - 1) + ")"
618
+ ), x === "TB" ? (f.attr("x", c - y.width / 2 - 10).attr("y", 0), d.attr("transform", "translate(" + (c - y.width / 2 - 5) + ", 0)")) : x === "BT" ? (f.attr("x", c - y.width / 2 - 10).attr("y", M), d.attr("transform", "translate(" + (c - y.width / 2 - 5) + ", " + M + ")")) : f.attr("transform", "translate(-19, " + (c - y.height / 2) + ")");
619
+ });
620
+ }, "drawBranches"), te = /* @__PURE__ */ h(function(t, r, a, s, e) {
621
+ return C.set(t, { pos: r, index: a }), r += 50 + (e ? 40 : 0) + (x === "TB" || x === "BT" ? s.width / 2 : 0), r;
622
+ }, "setBranchPosition"), ae = /* @__PURE__ */ h(function(t, r, a, s) {
623
+ if (Sr(), m.debug("in gitgraph renderer", t + `
624
+ `, "id:", r, a), !b)
625
+ throw new Error("GitGraph config not found");
626
+ const e = b.rotateCommitLabel ?? !1, n = s.db;
627
+ G = n.getCommits();
628
+ const c = n.getBranchesAsObjArray();
629
+ x = n.getDirection();
630
+ const o = or(`[id="${r}"]`);
631
+ let $ = 0;
632
+ c.forEach((l, f) => {
633
+ var q;
634
+ const g = J(l.name), d = o.append("g"), y = d.insert("g").attr("class", "branchLabel"), p = y.insert("g").attr("class", "label branch-label");
635
+ (q = p.node()) == null || q.appendChild(g);
636
+ const w = g.getBBox();
637
+ $ = te(l.name, $, f, w, e), p.remove(), y.remove(), d.remove();
638
+ }), K(o, G, !1), b.showBranches && ee(o, c), re(o, G), K(o, G, !0), cr.insertTitle(
639
+ o,
640
+ "gitTitleText",
641
+ b.titleTopMargin ?? 0,
642
+ n.getDiagramTitle()
643
+ ), ir(
644
+ void 0,
645
+ o,
646
+ b.diagramPadding,
647
+ b.useMaxWidth
648
+ );
649
+ }, "draw"), ne = {
650
+ draw: ae
651
+ }, se = /* @__PURE__ */ h((t) => `
652
+ .commit-id,
653
+ .commit-msg,
654
+ .branch-label {
655
+ fill: lightgrey;
656
+ color: lightgrey;
657
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
658
+ font-family: var(--mermaid-font-family);
659
+ }
660
+ ${[0, 1, 2, 3, 4, 5, 6, 7].map(
661
+ (r) => `
662
+ .branch-label${r} { fill: ${t["gitBranchLabel" + r]}; }
663
+ .commit${r} { stroke: ${t["git" + r]}; fill: ${t["git" + r]}; }
664
+ .commit-highlight${r} { stroke: ${t["gitInv" + r]}; fill: ${t["gitInv" + r]}; }
665
+ .label${r} { fill: ${t["git" + r]}; }
666
+ .arrow${r} { stroke: ${t["git" + r]}; }
667
+ `
668
+ ).join(`
669
+ `)}
670
+
671
+ .branch {
672
+ stroke-width: 1;
673
+ stroke: ${t.lineColor};
674
+ stroke-dasharray: 2;
675
+ }
676
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
677
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
678
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
679
+ .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
680
+ .tag-hole { fill: ${t.textColor}; }
681
+
682
+ .commit-merge {
683
+ stroke: ${t.primaryColor};
684
+ fill: ${t.primaryColor};
685
+ }
686
+ .commit-reverse {
687
+ stroke: ${t.primaryColor};
688
+ fill: ${t.primaryColor};
689
+ stroke-width: 3;
690
+ }
691
+ .commit-highlight-outer {
692
+ }
693
+ .commit-highlight-inner {
694
+ stroke: ${t.primaryColor};
695
+ fill: ${t.primaryColor};
696
+ }
697
+
698
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
699
+ .gitTitleText {
700
+ text-anchor: middle;
701
+ font-size: 18px;
702
+ fill: ${t.textColor};
703
+ }
704
+ `, "getStyles"), oe = se, le = {
705
+ parser: Wr,
706
+ db: X,
707
+ renderer: ne,
708
+ styles: oe
709
+ };
710
+ export {
711
+ le as diagram
712
+ };
src/backend/gradio_dropdownplus/templates/component/graph-Ngrd9eu7.js ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { aA as N, aB as j, aC as f, aD as b, aE as E } from "./mermaid.core-DH6TRyjK.js";
2
+ import { a as v, c as P, k as _, f as g, d, i as l, v as p, r as D } from "./_baseUniq-DFIPcCrY.js";
3
+ var w = N(function(o) {
4
+ return v(P(o, 1, j, !0));
5
+ }), F = "\0", a = "\0", O = "";
6
+ class L {
7
+ constructor(e = {}) {
8
+ this._isDirected = Object.prototype.hasOwnProperty.call(e, "directed") ? e.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = f(void 0), this._defaultEdgeLabelFn = f(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[a] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
9
+ }
10
+ /* === Graph functions ========= */
11
+ isDirected() {
12
+ return this._isDirected;
13
+ }
14
+ isMultigraph() {
15
+ return this._isMultigraph;
16
+ }
17
+ isCompound() {
18
+ return this._isCompound;
19
+ }
20
+ setGraph(e) {
21
+ return this._label = e, this;
22
+ }
23
+ graph() {
24
+ return this._label;
25
+ }
26
+ /* === Node functions ========== */
27
+ setDefaultNodeLabel(e) {
28
+ return b(e) || (e = f(e)), this._defaultNodeLabelFn = e, this;
29
+ }
30
+ nodeCount() {
31
+ return this._nodeCount;
32
+ }
33
+ nodes() {
34
+ return _(this._nodes);
35
+ }
36
+ sources() {
37
+ var e = this;
38
+ return g(this.nodes(), function(t) {
39
+ return E(e._in[t]);
40
+ });
41
+ }
42
+ sinks() {
43
+ var e = this;
44
+ return g(this.nodes(), function(t) {
45
+ return E(e._out[t]);
46
+ });
47
+ }
48
+ setNodes(e, t) {
49
+ var s = arguments, i = this;
50
+ return d(e, function(r) {
51
+ s.length > 1 ? i.setNode(r, t) : i.setNode(r);
52
+ }), this;
53
+ }
54
+ setNode(e, t) {
55
+ return Object.prototype.hasOwnProperty.call(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = a, this._children[e] = {}, this._children[a][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
56
+ }
57
+ node(e) {
58
+ return this._nodes[e];
59
+ }
60
+ hasNode(e) {
61
+ return Object.prototype.hasOwnProperty.call(this._nodes, e);
62
+ }
63
+ removeNode(e) {
64
+ if (Object.prototype.hasOwnProperty.call(this._nodes, e)) {
65
+ var t = (s) => this.removeEdge(this._edgeObjs[s]);
66
+ delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], d(this.children(e), (s) => {
67
+ this.setParent(s);
68
+ }), delete this._children[e]), d(_(this._in[e]), t), delete this._in[e], delete this._preds[e], d(_(this._out[e]), t), delete this._out[e], delete this._sucs[e], --this._nodeCount;
69
+ }
70
+ return this;
71
+ }
72
+ setParent(e, t) {
73
+ if (!this._isCompound)
74
+ throw new Error("Cannot set parent in a non-compound graph");
75
+ if (l(t))
76
+ t = a;
77
+ else {
78
+ t += "";
79
+ for (var s = t; !l(s); s = this.parent(s))
80
+ if (s === e)
81
+ throw new Error("Setting " + t + " as parent of " + e + " would create a cycle");
82
+ this.setNode(t);
83
+ }
84
+ return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = t, this._children[t][e] = !0, this;
85
+ }
86
+ _removeFromParentsChildList(e) {
87
+ delete this._children[this._parent[e]][e];
88
+ }
89
+ parent(e) {
90
+ if (this._isCompound) {
91
+ var t = this._parent[e];
92
+ if (t !== a)
93
+ return t;
94
+ }
95
+ }
96
+ children(e) {
97
+ if (l(e) && (e = a), this._isCompound) {
98
+ var t = this._children[e];
99
+ if (t)
100
+ return _(t);
101
+ } else {
102
+ if (e === a)
103
+ return this.nodes();
104
+ if (this.hasNode(e))
105
+ return [];
106
+ }
107
+ }
108
+ predecessors(e) {
109
+ var t = this._preds[e];
110
+ if (t)
111
+ return _(t);
112
+ }
113
+ successors(e) {
114
+ var t = this._sucs[e];
115
+ if (t)
116
+ return _(t);
117
+ }
118
+ neighbors(e) {
119
+ var t = this.predecessors(e);
120
+ if (t)
121
+ return w(t, this.successors(e));
122
+ }
123
+ isLeaf(e) {
124
+ var t;
125
+ return this.isDirected() ? t = this.successors(e) : t = this.neighbors(e), t.length === 0;
126
+ }
127
+ filterNodes(e) {
128
+ var t = new this.constructor({
129
+ directed: this._isDirected,
130
+ multigraph: this._isMultigraph,
131
+ compound: this._isCompound
132
+ });
133
+ t.setGraph(this.graph());
134
+ var s = this;
135
+ d(this._nodes, function(n, h) {
136
+ e(h) && t.setNode(h, n);
137
+ }), d(this._edgeObjs, function(n) {
138
+ t.hasNode(n.v) && t.hasNode(n.w) && t.setEdge(n, s.edge(n));
139
+ });
140
+ var i = {};
141
+ function r(n) {
142
+ var h = s.parent(n);
143
+ return h === void 0 || t.hasNode(h) ? (i[n] = h, h) : h in i ? i[h] : r(h);
144
+ }
145
+ return this._isCompound && d(t.nodes(), function(n) {
146
+ t.setParent(n, r(n));
147
+ }), t;
148
+ }
149
+ /* === Edge functions ========== */
150
+ setDefaultEdgeLabel(e) {
151
+ return b(e) || (e = f(e)), this._defaultEdgeLabelFn = e, this;
152
+ }
153
+ edgeCount() {
154
+ return this._edgeCount;
155
+ }
156
+ edges() {
157
+ return p(this._edgeObjs);
158
+ }
159
+ setPath(e, t) {
160
+ var s = this, i = arguments;
161
+ return D(e, function(r, n) {
162
+ return i.length > 1 ? s.setEdge(r, n, t) : s.setEdge(r, n), n;
163
+ }), this;
164
+ }
165
+ /*
166
+ * setEdge(v, w, [value, [name]])
167
+ * setEdge({ v, w, [name] }, [value])
168
+ */
169
+ setEdge() {
170
+ var e, t, s, i, r = !1, n = arguments[0];
171
+ typeof n == "object" && n !== null && "v" in n ? (e = n.v, t = n.w, s = n.name, arguments.length === 2 && (i = arguments[1], r = !0)) : (e = n, t = arguments[1], s = arguments[3], arguments.length > 2 && (i = arguments[2], r = !0)), e = "" + e, t = "" + t, l(s) || (s = "" + s);
172
+ var h = c(this._isDirected, e, t, s);
173
+ if (Object.prototype.hasOwnProperty.call(this._edgeLabels, h))
174
+ return r && (this._edgeLabels[h] = i), this;
175
+ if (!l(s) && !this._isMultigraph)
176
+ throw new Error("Cannot set a named edge when isMultigraph = false");
177
+ this.setNode(e), this.setNode(t), this._edgeLabels[h] = r ? i : this._defaultEdgeLabelFn(e, t, s);
178
+ var u = M(this._isDirected, e, t, s);
179
+ return e = u.v, t = u.w, Object.freeze(u), this._edgeObjs[h] = u, C(this._preds[t], e), C(this._sucs[e], t), this._in[t][h] = u, this._out[e][h] = u, this._edgeCount++, this;
180
+ }
181
+ edge(e, t, s) {
182
+ var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
183
+ return this._edgeLabels[i];
184
+ }
185
+ hasEdge(e, t, s) {
186
+ var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
187
+ return Object.prototype.hasOwnProperty.call(this._edgeLabels, i);
188
+ }
189
+ removeEdge(e, t, s) {
190
+ var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s), r = this._edgeObjs[i];
191
+ return r && (e = r.v, t = r.w, delete this._edgeLabels[i], delete this._edgeObjs[i], y(this._preds[t], e), y(this._sucs[e], t), delete this._in[t][i], delete this._out[e][i], this._edgeCount--), this;
192
+ }
193
+ inEdges(e, t) {
194
+ var s = this._in[e];
195
+ if (s) {
196
+ var i = p(s);
197
+ return t ? g(i, function(r) {
198
+ return r.v === t;
199
+ }) : i;
200
+ }
201
+ }
202
+ outEdges(e, t) {
203
+ var s = this._out[e];
204
+ if (s) {
205
+ var i = p(s);
206
+ return t ? g(i, function(r) {
207
+ return r.w === t;
208
+ }) : i;
209
+ }
210
+ }
211
+ nodeEdges(e, t) {
212
+ var s = this.inEdges(e, t);
213
+ if (s)
214
+ return s.concat(this.outEdges(e, t));
215
+ }
216
+ }
217
+ L.prototype._nodeCount = 0;
218
+ L.prototype._edgeCount = 0;
219
+ function C(o, e) {
220
+ o[e] ? o[e]++ : o[e] = 1;
221
+ }
222
+ function y(o, e) {
223
+ --o[e] || delete o[e];
224
+ }
225
+ function c(o, e, t, s) {
226
+ var i = "" + e, r = "" + t;
227
+ if (!o && i > r) {
228
+ var n = i;
229
+ i = r, r = n;
230
+ }
231
+ return i + O + r + O + (l(s) ? F : s);
232
+ }
233
+ function M(o, e, t, s) {
234
+ var i = "" + e, r = "" + t;
235
+ if (!o && i > r) {
236
+ var n = i;
237
+ i = r, r = n;
238
+ }
239
+ var h = { v: i, w: r };
240
+ return s && (h.name = s), h;
241
+ }
242
+ function m(o, e) {
243
+ return c(o, e.v, e.w, e.name);
244
+ }
245
+ export {
246
+ L as G
247
+ };
src/backend/gradio_dropdownplus/templates/component/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, D as o, E as p, M as t, I as l } from "./Index-DcsxVbfV.js";
2
  export {
3
  e as BaseDropdown,
4
  o as BaseDropdownOptions,
 
1
+ import { a as e, D as o, E as p, M as t, I as l } from "./Index-dsULWx_B.js";
2
  export {
3
  e as BaseDropdown,
4
  o as BaseDropdownOptions,
src/backend/gradio_dropdownplus/templates/component/infoDiagram-DDUCL6P7-k9fI9cyo.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as e, l as s, H as o, e as i, I as g } from "./mermaid.core-DH6TRyjK.js";
2
+ import { p } from "./treemap-75Q7IDZK-o7HSbXc7.js";
3
+ var v = {
4
+ parse: /* @__PURE__ */ e(async (r) => {
5
+ const a = await p("info", r);
6
+ s.debug(a);
7
+ }, "parse")
8
+ }, d = {
9
+ version: g.version + ""
10
+ }, c = /* @__PURE__ */ e(() => d.version, "getVersion"), m = {
11
+ getVersion: c
12
+ }, l = /* @__PURE__ */ e((r, a, n) => {
13
+ s.debug(`rendering info diagram
14
+ ` + r);
15
+ const t = o(a);
16
+ i(t, 100, 400, !0), t.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${n}`);
17
+ }, "draw"), f = { draw: l }, b = {
18
+ parser: v,
19
+ db: m,
20
+ renderer: f
21
+ };
22
+ export {
23
+ b as diagram
24
+ };
src/backend/gradio_dropdownplus/templates/component/journeyDiagram-FFXJYRFH-Couz-SYf.js ADDED
@@ -0,0 +1,836 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { a as gt, g as lt, f as mt, d as xt } from "./chunk-OMD6QJNC-DamKp1kC.js";
2
+ import { g as kt } from "./chunk-GLLZNHP4-DAmLcc0i.js";
3
+ import { _ as n, g as _t, s as vt, a as bt, b as wt, q as Tt, p as St, c as R, d as G, e as $t, y as Mt } from "./mermaid.core-DH6TRyjK.js";
4
+ import { d as et } from "./arc-Bt6Yqp6j.js";
5
+ var U = function() {
6
+ var t = /* @__PURE__ */ n(function(h, i, a, l) {
7
+ for (a = a || {}, l = h.length; l--; a[h[l]] = i) ;
8
+ return a;
9
+ }, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], s = [1, 9], c = [1, 10], r = [1, 11], f = [1, 12], u = [1, 13], y = [1, 14], g = {
10
+ trace: /* @__PURE__ */ n(function() {
11
+ }, "trace"),
12
+ yy: {},
13
+ 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 },
14
+ 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" },
15
+ 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]],
16
+ performAction: /* @__PURE__ */ n(function(i, a, l, d, p, o, b) {
17
+ var k = o.length - 1;
18
+ switch (p) {
19
+ case 1:
20
+ return o[k - 1];
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ o[k - 1].push(o[k]), this.$ = o[k - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = o[k];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ d.setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
37
+ break;
38
+ case 9:
39
+ this.$ = o[k].trim(), d.setAccTitle(this.$);
40
+ break;
41
+ case 10:
42
+ case 11:
43
+ this.$ = o[k].trim(), d.setAccDescription(this.$);
44
+ break;
45
+ case 12:
46
+ d.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
47
+ break;
48
+ case 13:
49
+ d.addTask(o[k - 1], o[k]), this.$ = "task";
50
+ break;
51
+ }
52
+ }, "anonymous"),
53
+ 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: s, 12: c, 14: r, 16: f, 17: u, 18: y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: s, 12: c, 14: r, 16: f, 17: u, 18: y }, 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])],
54
+ defaultActions: {},
55
+ parseError: /* @__PURE__ */ n(function(i, a) {
56
+ if (a.recoverable)
57
+ this.trace(i);
58
+ else {
59
+ var l = new Error(i);
60
+ throw l.hash = a, l;
61
+ }
62
+ }, "parseError"),
63
+ parse: /* @__PURE__ */ n(function(i) {
64
+ var a = this, l = [0], d = [], p = [null], o = [], b = this.table, k = "", C = 0, K = 0, dt = 2, Q = 1, yt = o.slice.call(arguments, 1), _ = Object.create(this.lexer), I = { yy: {} };
65
+ for (var O in this.yy)
66
+ Object.prototype.hasOwnProperty.call(this.yy, O) && (I.yy[O] = this.yy[O]);
67
+ _.setInput(i, I.yy), I.yy.lexer = _, I.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
68
+ var Y = _.yylloc;
69
+ o.push(Y);
70
+ var ft = _.options && _.options.ranges;
71
+ typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
72
+ function pt(w) {
73
+ l.length = l.length - 2 * w, p.length = p.length - w, o.length = o.length - w;
74
+ }
75
+ n(pt, "popStack");
76
+ function D() {
77
+ var w;
78
+ return w = d.pop() || _.lex() || Q, typeof w != "number" && (w instanceof Array && (d = w, w = d.pop()), w = a.symbols_[w] || w), w;
79
+ }
80
+ n(D, "lex");
81
+ for (var v, A, T, q, F = {}, N, M, tt, z; ; ) {
82
+ if (A = l[l.length - 1], this.defaultActions[A] ? T = this.defaultActions[A] : ((v === null || typeof v > "u") && (v = D()), T = b[A] && b[A][v]), typeof T > "u" || !T.length || !T[0]) {
83
+ var X = "";
84
+ z = [];
85
+ for (N in b[A])
86
+ this.terminals_[N] && N > dt && z.push("'" + this.terminals_[N] + "'");
87
+ _.showPosition ? X = "Parse error on line " + (C + 1) + `:
88
+ ` + _.showPosition() + `
89
+ Expecting ` + z.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : X = "Parse error on line " + (C + 1) + ": Unexpected " + (v == Q ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(X, {
90
+ text: _.match,
91
+ token: this.terminals_[v] || v,
92
+ line: _.yylineno,
93
+ loc: Y,
94
+ expected: z
95
+ });
96
+ }
97
+ if (T[0] instanceof Array && T.length > 1)
98
+ throw new Error("Parse Error: multiple actions possible at state: " + A + ", token: " + v);
99
+ switch (T[0]) {
100
+ case 1:
101
+ l.push(v), p.push(_.yytext), o.push(_.yylloc), l.push(T[1]), v = null, K = _.yyleng, k = _.yytext, C = _.yylineno, Y = _.yylloc;
102
+ break;
103
+ case 2:
104
+ if (M = this.productions_[T[1]][1], F.$ = p[p.length - M], F._$ = {
105
+ first_line: o[o.length - (M || 1)].first_line,
106
+ last_line: o[o.length - 1].last_line,
107
+ first_column: o[o.length - (M || 1)].first_column,
108
+ last_column: o[o.length - 1].last_column
109
+ }, ft && (F._$.range = [
110
+ o[o.length - (M || 1)].range[0],
111
+ o[o.length - 1].range[1]
112
+ ]), q = this.performAction.apply(F, [
113
+ k,
114
+ K,
115
+ C,
116
+ I.yy,
117
+ T[1],
118
+ p,
119
+ o
120
+ ].concat(yt)), typeof q < "u")
121
+ return q;
122
+ M && (l = l.slice(0, -1 * M * 2), p = p.slice(0, -1 * M), o = o.slice(0, -1 * M)), l.push(this.productions_[T[1]][0]), p.push(F.$), o.push(F._$), tt = b[l[l.length - 2]][l[l.length - 1]], l.push(tt);
123
+ break;
124
+ case 3:
125
+ return !0;
126
+ }
127
+ }
128
+ return !0;
129
+ }, "parse")
130
+ }, m = /* @__PURE__ */ function() {
131
+ var h = {
132
+ EOF: 1,
133
+ parseError: /* @__PURE__ */ n(function(a, l) {
134
+ if (this.yy.parser)
135
+ this.yy.parser.parseError(a, l);
136
+ else
137
+ throw new Error(a);
138
+ }, "parseError"),
139
+ // resets the lexer, sets new input
140
+ setInput: /* @__PURE__ */ n(function(i, a) {
141
+ return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
142
+ first_line: 1,
143
+ first_column: 0,
144
+ last_line: 1,
145
+ last_column: 0
146
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
147
+ }, "setInput"),
148
+ // consumes and returns one char from the input
149
+ input: /* @__PURE__ */ n(function() {
150
+ var i = this._input[0];
151
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
152
+ var a = i.match(/(?:\r\n?|\n).*/g);
153
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
154
+ }, "input"),
155
+ // unshifts one char (or a string) into the input
156
+ unput: /* @__PURE__ */ n(function(i) {
157
+ var a = i.length, l = i.split(/(?:\r\n?|\n)/g);
158
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
159
+ var d = this.match.split(/(?:\r\n?|\n)/g);
160
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
161
+ var p = this.yylloc.range;
162
+ return this.yylloc = {
163
+ first_line: this.yylloc.first_line,
164
+ last_line: this.yylineno + 1,
165
+ first_column: this.yylloc.first_column,
166
+ last_column: l ? (l.length === d.length ? this.yylloc.first_column : 0) + d[d.length - l.length].length - l[0].length : this.yylloc.first_column - a
167
+ }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
168
+ }, "unput"),
169
+ // When called from action, caches matched text and appends it on next action
170
+ more: /* @__PURE__ */ n(function() {
171
+ return this._more = !0, this;
172
+ }, "more"),
173
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
174
+ reject: /* @__PURE__ */ n(function() {
175
+ if (this.options.backtrack_lexer)
176
+ this._backtrack = !0;
177
+ else
178
+ return 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).
179
+ ` + this.showPosition(), {
180
+ text: "",
181
+ token: null,
182
+ line: this.yylineno
183
+ });
184
+ return this;
185
+ }, "reject"),
186
+ // retain first n characters of the match
187
+ less: /* @__PURE__ */ n(function(i) {
188
+ this.unput(this.match.slice(i));
189
+ }, "less"),
190
+ // displays already matched input, i.e. for error messages
191
+ pastInput: /* @__PURE__ */ n(function() {
192
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
193
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
194
+ }, "pastInput"),
195
+ // displays upcoming input, i.e. for error messages
196
+ upcomingInput: /* @__PURE__ */ n(function() {
197
+ var i = this.match;
198
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
199
+ }, "upcomingInput"),
200
+ // displays the character position where the lexing error occurred, i.e. for error messages
201
+ showPosition: /* @__PURE__ */ n(function() {
202
+ var i = this.pastInput(), a = new Array(i.length + 1).join("-");
203
+ return i + this.upcomingInput() + `
204
+ ` + a + "^";
205
+ }, "showPosition"),
206
+ // test the lexed token: return FALSE when not a match, otherwise return token
207
+ test_match: /* @__PURE__ */ n(function(i, a) {
208
+ var l, d, p;
209
+ if (this.options.backtrack_lexer && (p = {
210
+ yylineno: this.yylineno,
211
+ yylloc: {
212
+ first_line: this.yylloc.first_line,
213
+ last_line: this.last_line,
214
+ first_column: this.yylloc.first_column,
215
+ last_column: this.yylloc.last_column
216
+ },
217
+ yytext: this.yytext,
218
+ match: this.match,
219
+ matches: this.matches,
220
+ matched: this.matched,
221
+ yyleng: this.yyleng,
222
+ offset: this.offset,
223
+ _more: this._more,
224
+ _input: this._input,
225
+ yy: this.yy,
226
+ conditionStack: this.conditionStack.slice(0),
227
+ done: this.done
228
+ }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
229
+ first_line: this.yylloc.last_line,
230
+ last_line: this.yylineno + 1,
231
+ first_column: this.yylloc.last_column,
232
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
233
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], l = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
234
+ return l;
235
+ if (this._backtrack) {
236
+ for (var o in p)
237
+ this[o] = p[o];
238
+ return !1;
239
+ }
240
+ return !1;
241
+ }, "test_match"),
242
+ // return next match in input
243
+ next: /* @__PURE__ */ n(function() {
244
+ if (this.done)
245
+ return this.EOF;
246
+ this._input || (this.done = !0);
247
+ var i, a, l, d;
248
+ this._more || (this.yytext = "", this.match = "");
249
+ for (var p = this._currentRules(), o = 0; o < p.length; o++)
250
+ if (l = this._input.match(this.rules[p[o]]), l && (!a || l[0].length > a[0].length)) {
251
+ if (a = l, d = o, this.options.backtrack_lexer) {
252
+ if (i = this.test_match(l, p[o]), i !== !1)
253
+ return i;
254
+ if (this._backtrack) {
255
+ a = !1;
256
+ continue;
257
+ } else
258
+ return !1;
259
+ } else if (!this.options.flex)
260
+ break;
261
+ }
262
+ return a ? (i = this.test_match(a, p[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
263
+ ` + this.showPosition(), {
264
+ text: "",
265
+ token: null,
266
+ line: this.yylineno
267
+ });
268
+ }, "next"),
269
+ // return next match that has a token
270
+ lex: /* @__PURE__ */ n(function() {
271
+ var a = this.next();
272
+ return a || this.lex();
273
+ }, "lex"),
274
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
275
+ begin: /* @__PURE__ */ n(function(a) {
276
+ this.conditionStack.push(a);
277
+ }, "begin"),
278
+ // pop the previously active lexer condition state off the condition stack
279
+ popState: /* @__PURE__ */ n(function() {
280
+ var a = this.conditionStack.length - 1;
281
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
282
+ }, "popState"),
283
+ // produce the lexer rule set which is active for the currently active lexer condition state
284
+ _currentRules: /* @__PURE__ */ n(function() {
285
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
286
+ }, "_currentRules"),
287
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
288
+ topState: /* @__PURE__ */ n(function(a) {
289
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
290
+ }, "topState"),
291
+ // alias for begin(condition)
292
+ pushState: /* @__PURE__ */ n(function(a) {
293
+ this.begin(a);
294
+ }, "pushState"),
295
+ // return the number of states currently on the stack
296
+ stateStackSize: /* @__PURE__ */ n(function() {
297
+ return this.conditionStack.length;
298
+ }, "stateStackSize"),
299
+ options: { "case-insensitive": !0 },
300
+ performAction: /* @__PURE__ */ n(function(a, l, d, p) {
301
+ switch (d) {
302
+ case 0:
303
+ break;
304
+ case 1:
305
+ break;
306
+ case 2:
307
+ return 10;
308
+ case 3:
309
+ break;
310
+ case 4:
311
+ break;
312
+ case 5:
313
+ return 4;
314
+ case 6:
315
+ return 11;
316
+ case 7:
317
+ return this.begin("acc_title"), 12;
318
+ case 8:
319
+ return this.popState(), "acc_title_value";
320
+ case 9:
321
+ return this.begin("acc_descr"), 14;
322
+ case 10:
323
+ return this.popState(), "acc_descr_value";
324
+ case 11:
325
+ this.begin("acc_descr_multiline");
326
+ break;
327
+ case 12:
328
+ this.popState();
329
+ break;
330
+ case 13:
331
+ return "acc_descr_multiline_value";
332
+ case 14:
333
+ return 17;
334
+ case 15:
335
+ return 18;
336
+ case 16:
337
+ return 19;
338
+ case 17:
339
+ return ":";
340
+ case 18:
341
+ return 6;
342
+ case 19:
343
+ return "INVALID";
344
+ }
345
+ }, "anonymous"),
346
+ 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],
347
+ 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 } }
348
+ };
349
+ return h;
350
+ }();
351
+ g.lexer = m;
352
+ function x() {
353
+ this.yy = {};
354
+ }
355
+ return n(x, "Parser"), x.prototype = g, g.Parser = x, new x();
356
+ }();
357
+ U.parser = U;
358
+ var Et = U, V = "", Z = [], L = [], B = [], Ct = /* @__PURE__ */ n(function() {
359
+ Z.length = 0, L.length = 0, V = "", B.length = 0, Mt();
360
+ }, "clear"), Pt = /* @__PURE__ */ n(function(t) {
361
+ V = t, Z.push(t);
362
+ }, "addSection"), It = /* @__PURE__ */ n(function() {
363
+ return Z;
364
+ }, "getSections"), At = /* @__PURE__ */ n(function() {
365
+ let t = it();
366
+ const e = 100;
367
+ let s = 0;
368
+ for (; !t && s < e; )
369
+ t = it(), s++;
370
+ return L.push(...B), L;
371
+ }, "getTasks"), Ft = /* @__PURE__ */ n(function() {
372
+ const t = [];
373
+ return L.forEach((s) => {
374
+ s.people && t.push(...s.people);
375
+ }), [...new Set(t)].sort();
376
+ }, "updateActors"), Vt = /* @__PURE__ */ n(function(t, e) {
377
+ const s = e.substr(1).split(":");
378
+ let c = 0, r = [];
379
+ s.length === 1 ? (c = Number(s[0]), r = []) : (c = Number(s[0]), r = s[1].split(","));
380
+ const f = r.map((y) => y.trim()), u = {
381
+ section: V,
382
+ type: V,
383
+ people: f,
384
+ task: t,
385
+ score: c
386
+ };
387
+ B.push(u);
388
+ }, "addTask"), Rt = /* @__PURE__ */ n(function(t) {
389
+ const e = {
390
+ section: V,
391
+ type: V,
392
+ description: t,
393
+ task: t,
394
+ classes: []
395
+ };
396
+ L.push(e);
397
+ }, "addTaskOrg"), it = /* @__PURE__ */ n(function() {
398
+ const t = /* @__PURE__ */ n(function(s) {
399
+ return B[s].processed;
400
+ }, "compileTask");
401
+ let e = !0;
402
+ for (const [s, c] of B.entries())
403
+ t(s), e = e && c.processed;
404
+ return e;
405
+ }, "compileTasks"), Lt = /* @__PURE__ */ n(function() {
406
+ return Ft();
407
+ }, "getActors"), rt = {
408
+ getConfig: /* @__PURE__ */ n(() => R().journey, "getConfig"),
409
+ clear: Ct,
410
+ setDiagramTitle: St,
411
+ getDiagramTitle: Tt,
412
+ setAccTitle: wt,
413
+ getAccTitle: bt,
414
+ setAccDescription: vt,
415
+ getAccDescription: _t,
416
+ addSection: Pt,
417
+ getSections: It,
418
+ getTasks: At,
419
+ addTask: Vt,
420
+ addTaskOrg: Rt,
421
+ getActors: Lt
422
+ }, Bt = /* @__PURE__ */ n((t) => `.label {
423
+ font-family: ${t.fontFamily};
424
+ color: ${t.textColor};
425
+ }
426
+ .mouth {
427
+ stroke: #666;
428
+ }
429
+
430
+ line {
431
+ stroke: ${t.textColor}
432
+ }
433
+
434
+ .legend {
435
+ fill: ${t.textColor};
436
+ font-family: ${t.fontFamily};
437
+ }
438
+
439
+ .label text {
440
+ fill: #333;
441
+ }
442
+ .label {
443
+ color: ${t.textColor}
444
+ }
445
+
446
+ .face {
447
+ ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
448
+ stroke: #999;
449
+ }
450
+
451
+ .node rect,
452
+ .node circle,
453
+ .node ellipse,
454
+ .node polygon,
455
+ .node path {
456
+ fill: ${t.mainBkg};
457
+ stroke: ${t.nodeBorder};
458
+ stroke-width: 1px;
459
+ }
460
+
461
+ .node .label {
462
+ text-align: center;
463
+ }
464
+ .node.clickable {
465
+ cursor: pointer;
466
+ }
467
+
468
+ .arrowheadPath {
469
+ fill: ${t.arrowheadColor};
470
+ }
471
+
472
+ .edgePath .path {
473
+ stroke: ${t.lineColor};
474
+ stroke-width: 1.5px;
475
+ }
476
+
477
+ .flowchart-link {
478
+ stroke: ${t.lineColor};
479
+ fill: none;
480
+ }
481
+
482
+ .edgeLabel {
483
+ background-color: ${t.edgeLabelBackground};
484
+ rect {
485
+ opacity: 0.5;
486
+ }
487
+ text-align: center;
488
+ }
489
+
490
+ .cluster rect {
491
+ }
492
+
493
+ .cluster text {
494
+ fill: ${t.titleColor};
495
+ }
496
+
497
+ div.mermaidTooltip {
498
+ position: absolute;
499
+ text-align: center;
500
+ max-width: 200px;
501
+ padding: 2px;
502
+ font-family: ${t.fontFamily};
503
+ font-size: 12px;
504
+ background: ${t.tertiaryColor};
505
+ border: 1px solid ${t.border2};
506
+ border-radius: 2px;
507
+ pointer-events: none;
508
+ z-index: 100;
509
+ }
510
+
511
+ .task-type-0, .section-type-0 {
512
+ ${t.fillType0 ? `fill: ${t.fillType0}` : ""};
513
+ }
514
+ .task-type-1, .section-type-1 {
515
+ ${t.fillType0 ? `fill: ${t.fillType1}` : ""};
516
+ }
517
+ .task-type-2, .section-type-2 {
518
+ ${t.fillType0 ? `fill: ${t.fillType2}` : ""};
519
+ }
520
+ .task-type-3, .section-type-3 {
521
+ ${t.fillType0 ? `fill: ${t.fillType3}` : ""};
522
+ }
523
+ .task-type-4, .section-type-4 {
524
+ ${t.fillType0 ? `fill: ${t.fillType4}` : ""};
525
+ }
526
+ .task-type-5, .section-type-5 {
527
+ ${t.fillType0 ? `fill: ${t.fillType5}` : ""};
528
+ }
529
+ .task-type-6, .section-type-6 {
530
+ ${t.fillType0 ? `fill: ${t.fillType6}` : ""};
531
+ }
532
+ .task-type-7, .section-type-7 {
533
+ ${t.fillType0 ? `fill: ${t.fillType7}` : ""};
534
+ }
535
+
536
+ .actor-0 {
537
+ ${t.actor0 ? `fill: ${t.actor0}` : ""};
538
+ }
539
+ .actor-1 {
540
+ ${t.actor1 ? `fill: ${t.actor1}` : ""};
541
+ }
542
+ .actor-2 {
543
+ ${t.actor2 ? `fill: ${t.actor2}` : ""};
544
+ }
545
+ .actor-3 {
546
+ ${t.actor3 ? `fill: ${t.actor3}` : ""};
547
+ }
548
+ .actor-4 {
549
+ ${t.actor4 ? `fill: ${t.actor4}` : ""};
550
+ }
551
+ .actor-5 {
552
+ ${t.actor5 ? `fill: ${t.actor5}` : ""};
553
+ }
554
+ ${kt()}
555
+ `, "getStyles"), jt = Bt, J = /* @__PURE__ */ n(function(t, e) {
556
+ return xt(t, e);
557
+ }, "drawRect"), Nt = /* @__PURE__ */ n(function(t, e) {
558
+ const c = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = t.append("g");
559
+ r.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), r.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
560
+ function f(g) {
561
+ const m = et().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
562
+ g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
563
+ }
564
+ n(f, "smile");
565
+ function u(g) {
566
+ const m = et().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
567
+ g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
568
+ }
569
+ n(u, "sad");
570
+ function y(g) {
571
+ g.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");
572
+ }
573
+ return n(y, "ambivalent"), e.score > 3 ? f(r) : e.score < 3 ? u(r) : y(r), c;
574
+ }, "drawFace"), ot = /* @__PURE__ */ n(function(t, e) {
575
+ const s = t.append("circle");
576
+ return s.attr("cx", e.cx), s.attr("cy", e.cy), s.attr("class", "actor-" + e.pos), s.attr("fill", e.fill), s.attr("stroke", e.stroke), s.attr("r", e.r), s.class !== void 0 && s.attr("class", s.class), e.title !== void 0 && s.append("title").text(e.title), s;
577
+ }, "drawCircle"), ct = /* @__PURE__ */ n(function(t, e) {
578
+ return mt(t, e);
579
+ }, "drawText"), zt = /* @__PURE__ */ n(function(t, e) {
580
+ function s(r, f, u, y, g) {
581
+ return r + "," + f + " " + (r + u) + "," + f + " " + (r + u) + "," + (f + y - g) + " " + (r + u - g * 1.2) + "," + (f + y) + " " + r + "," + (f + y);
582
+ }
583
+ n(s, "genPoints");
584
+ const c = t.append("polygon");
585
+ c.attr("points", s(e.x, e.y, 50, 20, 7)), c.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ct(t, e);
586
+ }, "drawLabel"), Wt = /* @__PURE__ */ n(function(t, e, s) {
587
+ const c = t.append("g"), r = lt();
588
+ r.x = e.x, r.y = e.y, r.fill = e.fill, r.width = s.width * e.taskCount + // width of the tasks
589
+ s.diagramMarginX * (e.taskCount - 1), r.height = s.height, r.class = "journey-section section-type-" + e.num, r.rx = 3, r.ry = 3, J(c, r), ht(s)(
590
+ e.text,
591
+ c,
592
+ r.x,
593
+ r.y,
594
+ r.width,
595
+ r.height,
596
+ { class: "journey-section section-type-" + e.num },
597
+ s,
598
+ e.colour
599
+ );
600
+ }, "drawSection"), nt = -1, Ot = /* @__PURE__ */ n(function(t, e, s) {
601
+ const c = e.x + s.width / 2, r = t.append("g");
602
+ nt++;
603
+ const f = 300 + 5 * 30;
604
+ r.append("line").attr("id", "task" + nt).attr("x1", c).attr("y1", e.y).attr("x2", c).attr("y2", f).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Nt(r, {
605
+ cx: c,
606
+ cy: 300 + (5 - e.score) * 30,
607
+ score: e.score
608
+ });
609
+ const u = lt();
610
+ u.x = e.x, u.y = e.y, u.fill = e.fill, u.width = s.width, u.height = s.height, u.class = "task task-type-" + e.num, u.rx = 3, u.ry = 3, J(r, u);
611
+ let y = e.x + 14;
612
+ e.people.forEach((g) => {
613
+ const m = e.actors[g].color, x = {
614
+ cx: y,
615
+ cy: e.y,
616
+ r: 7,
617
+ fill: m,
618
+ stroke: "#000",
619
+ title: g,
620
+ pos: e.actors[g].position
621
+ };
622
+ ot(r, x), y += 10;
623
+ }), ht(s)(
624
+ e.task,
625
+ r,
626
+ u.x,
627
+ u.y,
628
+ u.width,
629
+ u.height,
630
+ { class: "task" },
631
+ s,
632
+ e.colour
633
+ );
634
+ }, "drawTask"), Yt = /* @__PURE__ */ n(function(t, e) {
635
+ gt(t, e);
636
+ }, "drawBackgroundRect"), ht = /* @__PURE__ */ function() {
637
+ function t(r, f, u, y, g, m, x, h) {
638
+ const i = f.append("text").attr("x", u + g / 2).attr("y", y + m / 2 + 5).style("font-color", h).style("text-anchor", "middle").text(r);
639
+ c(i, x);
640
+ }
641
+ n(t, "byText");
642
+ function e(r, f, u, y, g, m, x, h, i) {
643
+ const { taskFontSize: a, taskFontFamily: l } = h, d = r.split(/<br\s*\/?>/gi);
644
+ for (let p = 0; p < d.length; p++) {
645
+ const o = p * a - a * (d.length - 1) / 2, b = f.append("text").attr("x", u + g / 2).attr("y", y).attr("fill", i).style("text-anchor", "middle").style("font-size", a).style("font-family", l);
646
+ b.append("tspan").attr("x", u + g / 2).attr("dy", o).text(d[p]), b.attr("y", y + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), c(b, x);
647
+ }
648
+ }
649
+ n(e, "byTspan");
650
+ function s(r, f, u, y, g, m, x, h) {
651
+ const i = f.append("switch"), l = i.append("foreignObject").attr("x", u).attr("y", y).attr("width", g).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
652
+ l.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, i, u, y, g, m, x, h), c(l, x);
653
+ }
654
+ n(s, "byFo");
655
+ function c(r, f) {
656
+ for (const u in f)
657
+ u in f && r.attr(u, f[u]);
658
+ }
659
+ return n(c, "_setTextAttrs"), function(r) {
660
+ return r.textPlacement === "fo" ? s : r.textPlacement === "old" ? t : e;
661
+ };
662
+ }(), qt = /* @__PURE__ */ n(function(t) {
663
+ t.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");
664
+ }, "initGraphics"), j = {
665
+ drawRect: J,
666
+ drawCircle: ot,
667
+ drawSection: Wt,
668
+ drawText: ct,
669
+ drawLabel: zt,
670
+ drawTask: Ot,
671
+ drawBackgroundRect: Yt,
672
+ initGraphics: qt
673
+ }, Xt = /* @__PURE__ */ n(function(t) {
674
+ Object.keys(t).forEach(function(s) {
675
+ $[s] = t[s];
676
+ });
677
+ }, "setConf"), E = {}, W = 0;
678
+ function ut(t) {
679
+ const e = R().journey, s = e.maxLabelWidth;
680
+ W = 0;
681
+ let c = 60;
682
+ Object.keys(E).forEach((r) => {
683
+ const f = E[r].color, u = {
684
+ cx: 20,
685
+ cy: c,
686
+ r: 7,
687
+ fill: f,
688
+ stroke: "#000",
689
+ pos: E[r].position
690
+ };
691
+ j.drawCircle(t, u);
692
+ let y = t.append("text").attr("visibility", "hidden").text(r);
693
+ const g = y.node().getBoundingClientRect().width;
694
+ y.remove();
695
+ let m = [];
696
+ if (g <= s)
697
+ m = [r];
698
+ else {
699
+ const x = r.split(" ");
700
+ let h = "";
701
+ y = t.append("text").attr("visibility", "hidden"), x.forEach((i) => {
702
+ const a = h ? `${h} ${i}` : i;
703
+ if (y.text(a), y.node().getBoundingClientRect().width > s) {
704
+ if (h && m.push(h), h = i, y.text(i), y.node().getBoundingClientRect().width > s) {
705
+ let d = "";
706
+ for (const p of i)
707
+ d += p, y.text(d + "-"), y.node().getBoundingClientRect().width > s && (m.push(d.slice(0, -1) + "-"), d = p);
708
+ h = d;
709
+ }
710
+ } else
711
+ h = a;
712
+ }), h && m.push(h), y.remove();
713
+ }
714
+ m.forEach((x, h) => {
715
+ const i = {
716
+ x: 40,
717
+ y: c + 7 + h * 20,
718
+ fill: "#666",
719
+ text: x,
720
+ textMargin: e.boxTextMargin ?? 5
721
+ }, l = j.drawText(t, i).node().getBoundingClientRect().width;
722
+ l > W && l > e.leftMargin - l && (W = l);
723
+ }), c += Math.max(20, m.length * 20);
724
+ });
725
+ }
726
+ n(ut, "drawActorLegend");
727
+ var $ = R().journey, P = 0, Gt = /* @__PURE__ */ n(function(t, e, s, c) {
728
+ const r = R(), f = r.journey.titleColor, u = r.journey.titleFontSize, y = r.journey.titleFontFamily, g = r.securityLevel;
729
+ let m;
730
+ g === "sandbox" && (m = G("#i" + e));
731
+ const x = g === "sandbox" ? G(m.nodes()[0].contentDocument.body) : G("body");
732
+ S.init();
733
+ const h = x.select("#" + e);
734
+ j.initGraphics(h);
735
+ const i = c.db.getTasks(), a = c.db.getDiagramTitle(), l = c.db.getActors();
736
+ for (const C in E)
737
+ delete E[C];
738
+ let d = 0;
739
+ l.forEach((C) => {
740
+ E[C] = {
741
+ color: $.actorColours[d % $.actorColours.length],
742
+ position: d
743
+ }, d++;
744
+ }), ut(h), P = $.leftMargin + W, S.insert(0, 0, P, Object.keys(E).length * 50), Ht(h, i, 0);
745
+ const p = S.getBounds();
746
+ a && h.append("text").text(a).attr("x", P).attr("font-size", u).attr("font-weight", "bold").attr("y", 25).attr("fill", f).attr("font-family", y);
747
+ const o = p.stopy - p.starty + 2 * $.diagramMarginY, b = P + p.stopx + 2 * $.diagramMarginX;
748
+ $t(h, o, b, $.useMaxWidth), h.append("line").attr("x1", P).attr("y1", $.height * 4).attr("x2", b - P - 4).attr("y2", $.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
749
+ const k = a ? 70 : 0;
750
+ h.attr("viewBox", `${p.startx} -25 ${b} ${o + k}`), h.attr("preserveAspectRatio", "xMinYMin meet"), h.attr("height", o + k + 25);
751
+ }, "draw"), S = {
752
+ data: {
753
+ startx: void 0,
754
+ stopx: void 0,
755
+ starty: void 0,
756
+ stopy: void 0
757
+ },
758
+ verticalPos: 0,
759
+ sequenceItems: [],
760
+ init: /* @__PURE__ */ n(function() {
761
+ this.sequenceItems = [], this.data = {
762
+ startx: void 0,
763
+ stopx: void 0,
764
+ starty: void 0,
765
+ stopy: void 0
766
+ }, this.verticalPos = 0;
767
+ }, "init"),
768
+ updateVal: /* @__PURE__ */ n(function(t, e, s, c) {
769
+ t[e] === void 0 ? t[e] = s : t[e] = c(s, t[e]);
770
+ }, "updateVal"),
771
+ updateBounds: /* @__PURE__ */ n(function(t, e, s, c) {
772
+ const r = R().journey, f = this;
773
+ let u = 0;
774
+ function y(g) {
775
+ return /* @__PURE__ */ n(function(x) {
776
+ u++;
777
+ const h = f.sequenceItems.length - u + 1;
778
+ f.updateVal(x, "starty", e - h * r.boxMargin, Math.min), f.updateVal(x, "stopy", c + h * r.boxMargin, Math.max), f.updateVal(S.data, "startx", t - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopx", s + h * r.boxMargin, Math.max), g !== "activation" && (f.updateVal(x, "startx", t - h * r.boxMargin, Math.min), f.updateVal(x, "stopx", s + h * r.boxMargin, Math.max), f.updateVal(S.data, "starty", e - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopy", c + h * r.boxMargin, Math.max));
779
+ }, "updateItemBounds");
780
+ }
781
+ n(y, "updateFn"), this.sequenceItems.forEach(y());
782
+ }, "updateBounds"),
783
+ insert: /* @__PURE__ */ n(function(t, e, s, c) {
784
+ const r = Math.min(t, s), f = Math.max(t, s), u = Math.min(e, c), y = Math.max(e, c);
785
+ this.updateVal(S.data, "startx", r, Math.min), this.updateVal(S.data, "starty", u, Math.min), this.updateVal(S.data, "stopx", f, Math.max), this.updateVal(S.data, "stopy", y, Math.max), this.updateBounds(r, u, f, y);
786
+ }, "insert"),
787
+ bumpVerticalPos: /* @__PURE__ */ n(function(t) {
788
+ this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
789
+ }, "bumpVerticalPos"),
790
+ getVerticalPos: /* @__PURE__ */ n(function() {
791
+ return this.verticalPos;
792
+ }, "getVerticalPos"),
793
+ getBounds: /* @__PURE__ */ n(function() {
794
+ return this.data;
795
+ }, "getBounds")
796
+ }, H = $.sectionFills, st = $.sectionColours, Ht = /* @__PURE__ */ n(function(t, e, s) {
797
+ const c = R().journey;
798
+ let r = "";
799
+ const f = c.height * 2 + c.diagramMarginY, u = s + f;
800
+ let y = 0, g = "#CCC", m = "black", x = 0;
801
+ for (const [h, i] of e.entries()) {
802
+ if (r !== i.section) {
803
+ g = H[y % H.length], x = y % H.length, m = st[y % st.length];
804
+ let l = 0;
805
+ const d = i.section;
806
+ for (let o = h; o < e.length && e[o].section == d; o++)
807
+ l = l + 1;
808
+ const p = {
809
+ x: h * c.taskMargin + h * c.width + P,
810
+ y: 50,
811
+ text: i.section,
812
+ fill: g,
813
+ num: x,
814
+ colour: m,
815
+ taskCount: l
816
+ };
817
+ j.drawSection(t, p, c), r = i.section, y++;
818
+ }
819
+ const a = i.people.reduce((l, d) => (E[d] && (l[d] = E[d]), l), {});
820
+ i.x = h * c.taskMargin + h * c.width + P, i.y = u, i.width = c.diagramMarginX, i.height = c.diagramMarginY, i.colour = m, i.fill = g, i.num = x, i.actors = a, j.drawTask(t, i, c), S.insert(i.x, i.y, i.x + i.width + c.taskMargin, 300 + 5 * 30);
821
+ }
822
+ }, "drawTasks"), at = {
823
+ setConf: Xt,
824
+ draw: Gt
825
+ }, Qt = {
826
+ parser: Et,
827
+ db: rt,
828
+ renderer: at,
829
+ styles: jt,
830
+ init: /* @__PURE__ */ n((t) => {
831
+ at.setConf(t.journey), rt.clear();
832
+ }, "init")
833
+ };
834
+ export {
835
+ Qt as diagram
836
+ };
src/backend/gradio_dropdownplus/templates/component/kanban-definition-KOZQBZVT-CAZruoIJ.js ADDED
@@ -0,0 +1,720 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { g as fe } from "./chunk-GLLZNHP4-DAmLcc0i.js";
2
+ import { _ as c, l as te, c as W, H as ye, af as be, ag as me, ah as _e, V as Ee, F as K, i as G, t as ke, J as Se, W as Ne, X as le, Y as ce } from "./mermaid.core-DH6TRyjK.js";
3
+ var $ = function() {
4
+ var t = /* @__PURE__ */ c(function(_, s, n, a) {
5
+ for (n = n || {}, a = _.length; a--; n[_[a]] = s) ;
6
+ return n;
7
+ }, "o"), g = [1, 4], d = [1, 13], r = [1, 12], p = [1, 15], E = [1, 16], f = [1, 20], h = [1, 19], L = [6, 7, 8], C = [1, 26], w = [1, 24], N = [1, 25], i = [6, 7, 11], H = [1, 31], x = [6, 7, 11, 24], P = [1, 6, 13, 16, 17, 20, 23], M = [1, 35], U = [1, 36], A = [1, 6, 7, 11, 13, 16, 17, 20, 23], j = [1, 38], V = {
8
+ trace: /* @__PURE__ */ c(function() {
9
+ }, "trace"),
10
+ yy: {},
11
+ symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, KANBAN: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, shapeData: 15, ICON: 16, CLASS: 17, nodeWithId: 18, nodeWithoutId: 19, NODE_DSTART: 20, NODE_DESCR: 21, NODE_DEND: 22, NODE_ID: 23, SHAPE_DATA: 24, $accept: 0, $end: 1 },
12
+ terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "KANBAN", 11: "EOF", 13: "SPACELIST", 16: "ICON", 17: "CLASS", 20: "NODE_DSTART", 21: "NODE_DESCR", 22: "NODE_DEND", 23: "NODE_ID", 24: "SHAPE_DATA" },
13
+ productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 3], [12, 2], [12, 2], [12, 2], [12, 1], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [19, 3], [18, 1], [18, 4], [15, 2], [15, 1]],
14
+ performAction: /* @__PURE__ */ c(function(s, n, a, o, u, e, B) {
15
+ var l = e.length - 1;
16
+ switch (u) {
17
+ case 6:
18
+ case 7:
19
+ return o;
20
+ case 8:
21
+ o.getLogger().trace("Stop NL ");
22
+ break;
23
+ case 9:
24
+ o.getLogger().trace("Stop EOF ");
25
+ break;
26
+ case 11:
27
+ o.getLogger().trace("Stop NL2 ");
28
+ break;
29
+ case 12:
30
+ o.getLogger().trace("Stop EOF2 ");
31
+ break;
32
+ case 15:
33
+ o.getLogger().info("Node: ", e[l - 1].id), o.addNode(e[l - 2].length, e[l - 1].id, e[l - 1].descr, e[l - 1].type, e[l]);
34
+ break;
35
+ case 16:
36
+ o.getLogger().info("Node: ", e[l].id), o.addNode(e[l - 1].length, e[l].id, e[l].descr, e[l].type);
37
+ break;
38
+ case 17:
39
+ o.getLogger().trace("Icon: ", e[l]), o.decorateNode({ icon: e[l] });
40
+ break;
41
+ case 18:
42
+ case 23:
43
+ o.decorateNode({ class: e[l] });
44
+ break;
45
+ case 19:
46
+ o.getLogger().trace("SPACELIST");
47
+ break;
48
+ case 20:
49
+ o.getLogger().trace("Node: ", e[l - 1].id), o.addNode(0, e[l - 1].id, e[l - 1].descr, e[l - 1].type, e[l]);
50
+ break;
51
+ case 21:
52
+ o.getLogger().trace("Node: ", e[l].id), o.addNode(0, e[l].id, e[l].descr, e[l].type);
53
+ break;
54
+ case 22:
55
+ o.decorateNode({ icon: e[l] });
56
+ break;
57
+ case 27:
58
+ o.getLogger().trace("node found ..", e[l - 2]), this.$ = { id: e[l - 1], descr: e[l - 1], type: o.getType(e[l - 2], e[l]) };
59
+ break;
60
+ case 28:
61
+ this.$ = { id: e[l], descr: e[l], type: 0 };
62
+ break;
63
+ case 29:
64
+ o.getLogger().trace("node found ..", e[l - 3]), this.$ = { id: e[l - 3], descr: e[l - 1], type: o.getType(e[l - 2], e[l]) };
65
+ break;
66
+ case 30:
67
+ this.$ = e[l - 1] + e[l];
68
+ break;
69
+ case 31:
70
+ this.$ = e[l];
71
+ break;
72
+ }
73
+ }, "anonymous"),
74
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: g }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: g }, { 6: d, 7: [1, 10], 9: 9, 12: 11, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, t(L, [2, 3]), { 1: [2, 2] }, t(L, [2, 4]), t(L, [2, 5]), { 1: [2, 6], 6: d, 12: 21, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, { 6: d, 9: 22, 12: 11, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, { 6: C, 7: w, 10: 23, 11: N }, t(i, [2, 24], { 18: 17, 19: 18, 14: 27, 16: [1, 28], 17: [1, 29], 20: f, 23: h }), t(i, [2, 19]), t(i, [2, 21], { 15: 30, 24: H }), t(i, [2, 22]), t(i, [2, 23]), t(x, [2, 25]), t(x, [2, 26]), t(x, [2, 28], { 20: [1, 32] }), { 21: [1, 33] }, { 6: C, 7: w, 10: 34, 11: N }, { 1: [2, 7], 6: d, 12: 21, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, t(P, [2, 14], { 7: M, 11: U }), t(A, [2, 8]), t(A, [2, 9]), t(A, [2, 10]), t(i, [2, 16], { 15: 37, 24: H }), t(i, [2, 17]), t(i, [2, 18]), t(i, [2, 20], { 24: j }), t(x, [2, 31]), { 21: [1, 39] }, { 22: [1, 40] }, t(P, [2, 13], { 7: M, 11: U }), t(A, [2, 11]), t(A, [2, 12]), t(i, [2, 15], { 24: j }), t(x, [2, 30]), { 22: [1, 41] }, t(x, [2, 27]), t(x, [2, 29])],
75
+ defaultActions: { 2: [2, 1], 6: [2, 2] },
76
+ parseError: /* @__PURE__ */ c(function(s, n) {
77
+ if (n.recoverable)
78
+ this.trace(s);
79
+ else {
80
+ var a = new Error(s);
81
+ throw a.hash = n, a;
82
+ }
83
+ }, "parseError"),
84
+ parse: /* @__PURE__ */ c(function(s) {
85
+ var n = this, a = [0], o = [], u = [null], e = [], B = this.table, l = "", z = 0, ie = 0, ue = 2, re = 1, ge = e.slice.call(arguments, 1), b = Object.create(this.lexer), T = { yy: {} };
86
+ for (var J in this.yy)
87
+ Object.prototype.hasOwnProperty.call(this.yy, J) && (T.yy[J] = this.yy[J]);
88
+ b.setInput(s, T.yy), T.yy.lexer = b, T.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
89
+ var q = b.yylloc;
90
+ e.push(q);
91
+ var de = b.options && b.options.ranges;
92
+ typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
93
+ function pe(S) {
94
+ a.length = a.length - 2 * S, u.length = u.length - S, e.length = e.length - S;
95
+ }
96
+ c(pe, "popStack");
97
+ function ae() {
98
+ var S;
99
+ return S = o.pop() || b.lex() || re, typeof S != "number" && (S instanceof Array && (o = S, S = o.pop()), S = n.symbols_[S] || S), S;
100
+ }
101
+ c(ae, "lex");
102
+ for (var k, R, v, Q, F = {}, X, I, oe, Y; ; ) {
103
+ if (R = a[a.length - 1], this.defaultActions[R] ? v = this.defaultActions[R] : ((k === null || typeof k > "u") && (k = ae()), v = B[R] && B[R][k]), typeof v > "u" || !v.length || !v[0]) {
104
+ var Z = "";
105
+ Y = [];
106
+ for (X in B[R])
107
+ this.terminals_[X] && X > ue && Y.push("'" + this.terminals_[X] + "'");
108
+ b.showPosition ? Z = "Parse error on line " + (z + 1) + `:
109
+ ` + b.showPosition() + `
110
+ Expecting ` + Y.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : Z = "Parse error on line " + (z + 1) + ": Unexpected " + (k == re ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(Z, {
111
+ text: b.match,
112
+ token: this.terminals_[k] || k,
113
+ line: b.yylineno,
114
+ loc: q,
115
+ expected: Y
116
+ });
117
+ }
118
+ if (v[0] instanceof Array && v.length > 1)
119
+ throw new Error("Parse Error: multiple actions possible at state: " + R + ", token: " + k);
120
+ switch (v[0]) {
121
+ case 1:
122
+ a.push(k), u.push(b.yytext), e.push(b.yylloc), a.push(v[1]), k = null, ie = b.yyleng, l = b.yytext, z = b.yylineno, q = b.yylloc;
123
+ break;
124
+ case 2:
125
+ if (I = this.productions_[v[1]][1], F.$ = u[u.length - I], F._$ = {
126
+ first_line: e[e.length - (I || 1)].first_line,
127
+ last_line: e[e.length - 1].last_line,
128
+ first_column: e[e.length - (I || 1)].first_column,
129
+ last_column: e[e.length - 1].last_column
130
+ }, de && (F._$.range = [
131
+ e[e.length - (I || 1)].range[0],
132
+ e[e.length - 1].range[1]
133
+ ]), Q = this.performAction.apply(F, [
134
+ l,
135
+ ie,
136
+ z,
137
+ T.yy,
138
+ v[1],
139
+ u,
140
+ e
141
+ ].concat(ge)), typeof Q < "u")
142
+ return Q;
143
+ I && (a = a.slice(0, -1 * I * 2), u = u.slice(0, -1 * I), e = e.slice(0, -1 * I)), a.push(this.productions_[v[1]][0]), u.push(F.$), e.push(F._$), oe = B[a[a.length - 2]][a[a.length - 1]], a.push(oe);
144
+ break;
145
+ case 3:
146
+ return !0;
147
+ }
148
+ }
149
+ return !0;
150
+ }, "parse")
151
+ }, m = /* @__PURE__ */ function() {
152
+ var _ = {
153
+ EOF: 1,
154
+ parseError: /* @__PURE__ */ c(function(n, a) {
155
+ if (this.yy.parser)
156
+ this.yy.parser.parseError(n, a);
157
+ else
158
+ throw new Error(n);
159
+ }, "parseError"),
160
+ // resets the lexer, sets new input
161
+ setInput: /* @__PURE__ */ c(function(s, n) {
162
+ return this.yy = n || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
163
+ first_line: 1,
164
+ first_column: 0,
165
+ last_line: 1,
166
+ last_column: 0
167
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
168
+ }, "setInput"),
169
+ // consumes and returns one char from the input
170
+ input: /* @__PURE__ */ c(function() {
171
+ var s = this._input[0];
172
+ this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
173
+ var n = s.match(/(?:\r\n?|\n).*/g);
174
+ return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
175
+ }, "input"),
176
+ // unshifts one char (or a string) into the input
177
+ unput: /* @__PURE__ */ c(function(s) {
178
+ var n = s.length, a = s.split(/(?:\r\n?|\n)/g);
179
+ this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
180
+ var o = this.match.split(/(?:\r\n?|\n)/g);
181
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
182
+ var u = this.yylloc.range;
183
+ return this.yylloc = {
184
+ first_line: this.yylloc.first_line,
185
+ last_line: this.yylineno + 1,
186
+ first_column: this.yylloc.first_column,
187
+ last_column: a ? (a.length === o.length ? this.yylloc.first_column : 0) + o[o.length - a.length].length - a[0].length : this.yylloc.first_column - n
188
+ }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
189
+ }, "unput"),
190
+ // When called from action, caches matched text and appends it on next action
191
+ more: /* @__PURE__ */ c(function() {
192
+ return this._more = !0, this;
193
+ }, "more"),
194
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
195
+ reject: /* @__PURE__ */ c(function() {
196
+ if (this.options.backtrack_lexer)
197
+ this._backtrack = !0;
198
+ else
199
+ return 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).
200
+ ` + this.showPosition(), {
201
+ text: "",
202
+ token: null,
203
+ line: this.yylineno
204
+ });
205
+ return this;
206
+ }, "reject"),
207
+ // retain first n characters of the match
208
+ less: /* @__PURE__ */ c(function(s) {
209
+ this.unput(this.match.slice(s));
210
+ }, "less"),
211
+ // displays already matched input, i.e. for error messages
212
+ pastInput: /* @__PURE__ */ c(function() {
213
+ var s = this.matched.substr(0, this.matched.length - this.match.length);
214
+ return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
215
+ }, "pastInput"),
216
+ // displays upcoming input, i.e. for error messages
217
+ upcomingInput: /* @__PURE__ */ c(function() {
218
+ var s = this.match;
219
+ return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
220
+ }, "upcomingInput"),
221
+ // displays the character position where the lexing error occurred, i.e. for error messages
222
+ showPosition: /* @__PURE__ */ c(function() {
223
+ var s = this.pastInput(), n = new Array(s.length + 1).join("-");
224
+ return s + this.upcomingInput() + `
225
+ ` + n + "^";
226
+ }, "showPosition"),
227
+ // test the lexed token: return FALSE when not a match, otherwise return token
228
+ test_match: /* @__PURE__ */ c(function(s, n) {
229
+ var a, o, u;
230
+ if (this.options.backtrack_lexer && (u = {
231
+ yylineno: this.yylineno,
232
+ yylloc: {
233
+ first_line: this.yylloc.first_line,
234
+ last_line: this.last_line,
235
+ first_column: this.yylloc.first_column,
236
+ last_column: this.yylloc.last_column
237
+ },
238
+ yytext: this.yytext,
239
+ match: this.match,
240
+ matches: this.matches,
241
+ matched: this.matched,
242
+ yyleng: this.yyleng,
243
+ offset: this.offset,
244
+ _more: this._more,
245
+ _input: this._input,
246
+ yy: this.yy,
247
+ conditionStack: this.conditionStack.slice(0),
248
+ done: this.done
249
+ }, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), o = s[0].match(/(?:\r\n?|\n).*/g), o && (this.yylineno += o.length), this.yylloc = {
250
+ first_line: this.yylloc.last_line,
251
+ last_line: this.yylineno + 1,
252
+ first_column: this.yylloc.last_column,
253
+ last_column: o ? o[o.length - 1].length - o[o.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
254
+ }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a)
255
+ return a;
256
+ if (this._backtrack) {
257
+ for (var e in u)
258
+ this[e] = u[e];
259
+ return !1;
260
+ }
261
+ return !1;
262
+ }, "test_match"),
263
+ // return next match in input
264
+ next: /* @__PURE__ */ c(function() {
265
+ if (this.done)
266
+ return this.EOF;
267
+ this._input || (this.done = !0);
268
+ var s, n, a, o;
269
+ this._more || (this.yytext = "", this.match = "");
270
+ for (var u = this._currentRules(), e = 0; e < u.length; e++)
271
+ if (a = this._input.match(this.rules[u[e]]), a && (!n || a[0].length > n[0].length)) {
272
+ if (n = a, o = e, this.options.backtrack_lexer) {
273
+ if (s = this.test_match(a, u[e]), s !== !1)
274
+ return s;
275
+ if (this._backtrack) {
276
+ n = !1;
277
+ continue;
278
+ } else
279
+ return !1;
280
+ } else if (!this.options.flex)
281
+ break;
282
+ }
283
+ return n ? (s = this.test_match(n, u[o]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
284
+ ` + this.showPosition(), {
285
+ text: "",
286
+ token: null,
287
+ line: this.yylineno
288
+ });
289
+ }, "next"),
290
+ // return next match that has a token
291
+ lex: /* @__PURE__ */ c(function() {
292
+ var n = this.next();
293
+ return n || this.lex();
294
+ }, "lex"),
295
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
296
+ begin: /* @__PURE__ */ c(function(n) {
297
+ this.conditionStack.push(n);
298
+ }, "begin"),
299
+ // pop the previously active lexer condition state off the condition stack
300
+ popState: /* @__PURE__ */ c(function() {
301
+ var n = this.conditionStack.length - 1;
302
+ return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
303
+ }, "popState"),
304
+ // produce the lexer rule set which is active for the currently active lexer condition state
305
+ _currentRules: /* @__PURE__ */ c(function() {
306
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
307
+ }, "_currentRules"),
308
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
309
+ topState: /* @__PURE__ */ c(function(n) {
310
+ return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
311
+ }, "topState"),
312
+ // alias for begin(condition)
313
+ pushState: /* @__PURE__ */ c(function(n) {
314
+ this.begin(n);
315
+ }, "pushState"),
316
+ // return the number of states currently on the stack
317
+ stateStackSize: /* @__PURE__ */ c(function() {
318
+ return this.conditionStack.length;
319
+ }, "stateStackSize"),
320
+ options: { "case-insensitive": !0 },
321
+ performAction: /* @__PURE__ */ c(function(n, a, o, u) {
322
+ switch (o) {
323
+ case 0:
324
+ return this.pushState("shapeData"), a.yytext = "", 24;
325
+ case 1:
326
+ return this.pushState("shapeDataStr"), 24;
327
+ case 2:
328
+ return this.popState(), 24;
329
+ case 3:
330
+ const e = /\n\s*/g;
331
+ return a.yytext = a.yytext.replace(e, "<br/>"), 24;
332
+ case 4:
333
+ return 24;
334
+ case 5:
335
+ this.popState();
336
+ break;
337
+ case 6:
338
+ return n.getLogger().trace("Found comment", a.yytext), 6;
339
+ case 7:
340
+ return 8;
341
+ case 8:
342
+ this.begin("CLASS");
343
+ break;
344
+ case 9:
345
+ return this.popState(), 17;
346
+ case 10:
347
+ this.popState();
348
+ break;
349
+ case 11:
350
+ n.getLogger().trace("Begin icon"), this.begin("ICON");
351
+ break;
352
+ case 12:
353
+ return n.getLogger().trace("SPACELINE"), 6;
354
+ case 13:
355
+ return 7;
356
+ case 14:
357
+ return 16;
358
+ case 15:
359
+ n.getLogger().trace("end icon"), this.popState();
360
+ break;
361
+ case 16:
362
+ return n.getLogger().trace("Exploding node"), this.begin("NODE"), 20;
363
+ case 17:
364
+ return n.getLogger().trace("Cloud"), this.begin("NODE"), 20;
365
+ case 18:
366
+ return n.getLogger().trace("Explosion Bang"), this.begin("NODE"), 20;
367
+ case 19:
368
+ return n.getLogger().trace("Cloud Bang"), this.begin("NODE"), 20;
369
+ case 20:
370
+ return this.begin("NODE"), 20;
371
+ case 21:
372
+ return this.begin("NODE"), 20;
373
+ case 22:
374
+ return this.begin("NODE"), 20;
375
+ case 23:
376
+ return this.begin("NODE"), 20;
377
+ case 24:
378
+ return 13;
379
+ case 25:
380
+ return 23;
381
+ case 26:
382
+ return 11;
383
+ case 27:
384
+ this.begin("NSTR2");
385
+ break;
386
+ case 28:
387
+ return "NODE_DESCR";
388
+ case 29:
389
+ this.popState();
390
+ break;
391
+ case 30:
392
+ n.getLogger().trace("Starting NSTR"), this.begin("NSTR");
393
+ break;
394
+ case 31:
395
+ return n.getLogger().trace("description:", a.yytext), "NODE_DESCR";
396
+ case 32:
397
+ this.popState();
398
+ break;
399
+ case 33:
400
+ return this.popState(), n.getLogger().trace("node end ))"), "NODE_DEND";
401
+ case 34:
402
+ return this.popState(), n.getLogger().trace("node end )"), "NODE_DEND";
403
+ case 35:
404
+ return this.popState(), n.getLogger().trace("node end ...", a.yytext), "NODE_DEND";
405
+ case 36:
406
+ return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
407
+ case 37:
408
+ return this.popState(), n.getLogger().trace("node end (-"), "NODE_DEND";
409
+ case 38:
410
+ return this.popState(), n.getLogger().trace("node end (-"), "NODE_DEND";
411
+ case 39:
412
+ return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
413
+ case 40:
414
+ return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
415
+ case 41:
416
+ return n.getLogger().trace("Long description:", a.yytext), 21;
417
+ case 42:
418
+ return n.getLogger().trace("Long description:", a.yytext), 21;
419
+ }
420
+ }, "anonymous"),
421
+ rules: [/^(?:@\{)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^\"]+)/i, /^(?:[^}^"]+)/i, /^(?:\})/i, /^(?:\s*%%.*)/i, /^(?:kanban\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}@]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
422
+ conditions: { shapeDataEndBracket: { rules: [], inclusive: !1 }, shapeDataStr: { rules: [2, 3], inclusive: !1 }, shapeData: { rules: [1, 4, 5], inclusive: !1 }, CLASS: { rules: [9, 10], inclusive: !1 }, ICON: { rules: [14, 15], inclusive: !1 }, NSTR2: { rules: [28, 29], inclusive: !1 }, NSTR: { rules: [31, 32], inclusive: !1 }, NODE: { rules: [27, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: !1 }, INITIAL: { rules: [0, 6, 7, 8, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], inclusive: !0 } }
423
+ };
424
+ return _;
425
+ }();
426
+ V.lexer = m;
427
+ function O() {
428
+ this.yy = {};
429
+ }
430
+ return c(O, "Parser"), O.prototype = V, V.Parser = O, new O();
431
+ }();
432
+ $.parser = $;
433
+ var xe = $, D = [], ne = [], ee = 0, se = {}, ve = /* @__PURE__ */ c(() => {
434
+ D = [], ne = [], ee = 0, se = {};
435
+ }, "clear"), De = /* @__PURE__ */ c((t) => {
436
+ if (D.length === 0)
437
+ return null;
438
+ const g = D[0].level;
439
+ let d = null;
440
+ for (let r = D.length - 1; r >= 0; r--)
441
+ if (D[r].level === g && !d && (d = D[r]), D[r].level < g)
442
+ throw new Error('Items without section detected, found section ("' + D[r].label + '")');
443
+ return t === (d == null ? void 0 : d.level) ? null : d;
444
+ }, "getSection"), he = /* @__PURE__ */ c(function() {
445
+ return ne;
446
+ }, "getSections"), Le = /* @__PURE__ */ c(function() {
447
+ const t = [], g = [], d = he(), r = W();
448
+ for (const p of d) {
449
+ const E = {
450
+ id: p.id,
451
+ label: G(p.label ?? "", r),
452
+ isGroup: !0,
453
+ ticket: p.ticket,
454
+ shape: "kanbanSection",
455
+ level: p.level,
456
+ look: r.look
457
+ };
458
+ g.push(E);
459
+ const f = D.filter((h) => h.parentId === p.id);
460
+ for (const h of f) {
461
+ const L = {
462
+ id: h.id,
463
+ parentId: p.id,
464
+ label: G(h.label ?? "", r),
465
+ isGroup: !1,
466
+ ticket: h == null ? void 0 : h.ticket,
467
+ priority: h == null ? void 0 : h.priority,
468
+ assigned: h == null ? void 0 : h.assigned,
469
+ icon: h == null ? void 0 : h.icon,
470
+ shape: "kanbanItem",
471
+ level: h.level,
472
+ rx: 5,
473
+ ry: 5,
474
+ cssStyles: ["text-align: left"]
475
+ };
476
+ g.push(L);
477
+ }
478
+ }
479
+ return { nodes: g, edges: t, other: {}, config: W() };
480
+ }, "getData"), Oe = /* @__PURE__ */ c((t, g, d, r, p) => {
481
+ var C, w;
482
+ const E = W();
483
+ let f = ((C = E.mindmap) == null ? void 0 : C.padding) ?? K.mindmap.padding;
484
+ switch (r) {
485
+ case y.ROUNDED_RECT:
486
+ case y.RECT:
487
+ case y.HEXAGON:
488
+ f *= 2;
489
+ }
490
+ const h = {
491
+ id: G(g, E) || "kbn" + ee++,
492
+ level: t,
493
+ label: G(d, E),
494
+ width: ((w = E.mindmap) == null ? void 0 : w.maxNodeWidth) ?? K.mindmap.maxNodeWidth,
495
+ padding: f,
496
+ isGroup: !1
497
+ };
498
+ if (p !== void 0) {
499
+ let N;
500
+ p.includes(`
501
+ `) ? N = p + `
502
+ ` : N = `{
503
+ ` + p + `
504
+ }`;
505
+ const i = ke(N, { schema: Se });
506
+ if (i.shape && (i.shape !== i.shape.toLowerCase() || i.shape.includes("_")))
507
+ throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);
508
+ i != null && i.shape && i.shape === "kanbanItem" && (h.shape = i == null ? void 0 : i.shape), i != null && i.label && (h.label = i == null ? void 0 : i.label), i != null && i.icon && (h.icon = i == null ? void 0 : i.icon.toString()), i != null && i.assigned && (h.assigned = i == null ? void 0 : i.assigned.toString()), i != null && i.ticket && (h.ticket = i == null ? void 0 : i.ticket.toString()), i != null && i.priority && (h.priority = i == null ? void 0 : i.priority);
509
+ }
510
+ const L = De(t);
511
+ L ? h.parentId = L.id || "kbn" + ee++ : ne.push(h), D.push(h);
512
+ }, "addNode"), y = {
513
+ DEFAULT: 0,
514
+ NO_BORDER: 0,
515
+ ROUNDED_RECT: 1,
516
+ RECT: 2,
517
+ CIRCLE: 3,
518
+ CLOUD: 4,
519
+ BANG: 5,
520
+ HEXAGON: 6
521
+ }, Ie = /* @__PURE__ */ c((t, g) => {
522
+ switch (te.debug("In get type", t, g), t) {
523
+ case "[":
524
+ return y.RECT;
525
+ case "(":
526
+ return g === ")" ? y.ROUNDED_RECT : y.CLOUD;
527
+ case "((":
528
+ return y.CIRCLE;
529
+ case ")":
530
+ return y.CLOUD;
531
+ case "))":
532
+ return y.BANG;
533
+ case "{{":
534
+ return y.HEXAGON;
535
+ default:
536
+ return y.DEFAULT;
537
+ }
538
+ }, "getType"), Ce = /* @__PURE__ */ c((t, g) => {
539
+ se[t] = g;
540
+ }, "setElementForId"), we = /* @__PURE__ */ c((t) => {
541
+ if (!t)
542
+ return;
543
+ const g = W(), d = D[D.length - 1];
544
+ t.icon && (d.icon = G(t.icon, g)), t.class && (d.cssClasses = G(t.class, g));
545
+ }, "decorateNode"), Ae = /* @__PURE__ */ c((t) => {
546
+ switch (t) {
547
+ case y.DEFAULT:
548
+ return "no-border";
549
+ case y.RECT:
550
+ return "rect";
551
+ case y.ROUNDED_RECT:
552
+ return "rounded-rect";
553
+ case y.CIRCLE:
554
+ return "circle";
555
+ case y.CLOUD:
556
+ return "cloud";
557
+ case y.BANG:
558
+ return "bang";
559
+ case y.HEXAGON:
560
+ return "hexgon";
561
+ default:
562
+ return "no-border";
563
+ }
564
+ }, "type2Str"), Te = /* @__PURE__ */ c(() => te, "getLogger"), Re = /* @__PURE__ */ c((t) => se[t], "getElementById"), Pe = {
565
+ clear: ve,
566
+ addNode: Oe,
567
+ getSections: he,
568
+ getData: Le,
569
+ nodeType: y,
570
+ getType: Ie,
571
+ setElementForId: Ce,
572
+ decorateNode: we,
573
+ type2Str: Ae,
574
+ getLogger: Te,
575
+ getElementById: Re
576
+ }, Ve = Pe, Be = /* @__PURE__ */ c(async (t, g, d, r) => {
577
+ var M, U, A, j, V;
578
+ te.debug(`Rendering kanban diagram
579
+ ` + t);
580
+ const E = r.db.getData(), f = W();
581
+ f.htmlLabels = !1;
582
+ const h = ye(g), L = h.append("g");
583
+ L.attr("class", "sections");
584
+ const C = h.append("g");
585
+ C.attr("class", "items");
586
+ const w = E.nodes.filter(
587
+ // TODO: TypeScript 5.5 will infer this predicate automatically
588
+ (m) => m.isGroup
589
+ );
590
+ let N = 0;
591
+ const i = 10, H = [];
592
+ let x = 25;
593
+ for (const m of w) {
594
+ const O = ((M = f == null ? void 0 : f.kanban) == null ? void 0 : M.sectionWidth) || 200;
595
+ N = N + 1, m.x = O * N + (N - 1) * i / 2, m.width = O, m.y = 0, m.height = O * 3, m.rx = 5, m.ry = 5, m.cssClasses = m.cssClasses + " section-" + N;
596
+ const _ = await be(L, m);
597
+ x = Math.max(x, (U = _ == null ? void 0 : _.labelBBox) == null ? void 0 : U.height), H.push(_);
598
+ }
599
+ let P = 0;
600
+ for (const m of w) {
601
+ const O = H[P];
602
+ P = P + 1;
603
+ const _ = ((A = f == null ? void 0 : f.kanban) == null ? void 0 : A.sectionWidth) || 200, s = -_ * 3 / 2 + x;
604
+ let n = s;
605
+ const a = E.nodes.filter((e) => e.parentId === m.id);
606
+ for (const e of a) {
607
+ if (e.isGroup)
608
+ throw new Error("Groups within groups are not allowed in Kanban diagrams");
609
+ e.x = m.x, e.width = _ - 1.5 * i;
610
+ const l = (await me(C, e, { config: f })).node().getBBox();
611
+ e.y = n + l.height / 2, await _e(e), n = e.y + l.height / 2 + i / 2;
612
+ }
613
+ const o = O.cluster.select("rect"), u = Math.max(n - s + 3 * i, 50) + (x - 25);
614
+ o.attr("height", u);
615
+ }
616
+ Ee(
617
+ void 0,
618
+ h,
619
+ ((j = f.mindmap) == null ? void 0 : j.padding) ?? K.kanban.padding,
620
+ ((V = f.mindmap) == null ? void 0 : V.useMaxWidth) ?? K.kanban.useMaxWidth
621
+ );
622
+ }, "draw"), Fe = {
623
+ draw: Be
624
+ }, Ge = /* @__PURE__ */ c((t) => {
625
+ let g = "";
626
+ for (let r = 0; r < t.THEME_COLOR_LIMIT; r++)
627
+ t["lineColor" + r] = t["lineColor" + r] || t["cScaleInv" + r], Ne(t["lineColor" + r]) ? t["lineColor" + r] = le(t["lineColor" + r], 20) : t["lineColor" + r] = ce(t["lineColor" + r], 20);
628
+ const d = /* @__PURE__ */ c((r, p) => t.darkMode ? ce(r, p) : le(r, p), "adjuster");
629
+ for (let r = 0; r < t.THEME_COLOR_LIMIT; r++) {
630
+ const p = "" + (17 - 3 * r);
631
+ g += `
632
+ .section-${r - 1} rect, .section-${r - 1} path, .section-${r - 1} circle, .section-${r - 1} polygon, .section-${r - 1} path {
633
+ fill: ${d(t["cScale" + r], 10)};
634
+ stroke: ${d(t["cScale" + r], 10)};
635
+
636
+ }
637
+ .section-${r - 1} text {
638
+ fill: ${t["cScaleLabel" + r]};
639
+ }
640
+ .node-icon-${r - 1} {
641
+ font-size: 40px;
642
+ color: ${t["cScaleLabel" + r]};
643
+ }
644
+ .section-edge-${r - 1}{
645
+ stroke: ${t["cScale" + r]};
646
+ }
647
+ .edge-depth-${r - 1}{
648
+ stroke-width: ${p};
649
+ }
650
+ .section-${r - 1} line {
651
+ stroke: ${t["cScaleInv" + r]} ;
652
+ stroke-width: 3;
653
+ }
654
+
655
+ .disabled, .disabled circle, .disabled text {
656
+ fill: lightgray;
657
+ }
658
+ .disabled text {
659
+ fill: #efefef;
660
+ }
661
+
662
+ .node rect,
663
+ .node circle,
664
+ .node ellipse,
665
+ .node polygon,
666
+ .node path {
667
+ fill: ${t.background};
668
+ stroke: ${t.nodeBorder};
669
+ stroke-width: 1px;
670
+ }
671
+
672
+ .kanban-ticket-link {
673
+ fill: ${t.background};
674
+ stroke: ${t.nodeBorder};
675
+ text-decoration: underline;
676
+ }
677
+ `;
678
+ }
679
+ return g;
680
+ }, "genSections"), He = /* @__PURE__ */ c((t) => `
681
+ .edge {
682
+ stroke-width: 3;
683
+ }
684
+ ${Ge(t)}
685
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
686
+ fill: ${t.git0};
687
+ }
688
+ .section-root text {
689
+ fill: ${t.gitBranchLabel0};
690
+ }
691
+ .icon-container {
692
+ height:100%;
693
+ display: flex;
694
+ justify-content: center;
695
+ align-items: center;
696
+ }
697
+ .edge {
698
+ fill: none;
699
+ }
700
+ .cluster-label, .label {
701
+ color: ${t.textColor};
702
+ fill: ${t.textColor};
703
+ }
704
+ .kanban-label {
705
+ dy: 1em;
706
+ alignment-baseline: middle;
707
+ text-anchor: middle;
708
+ dominant-baseline: middle;
709
+ text-align: center;
710
+ }
711
+ ${fe()}
712
+ `, "getStyles"), Me = He, We = {
713
+ db: Ve,
714
+ renderer: Fe,
715
+ parser: xe,
716
+ styles: Me
717
+ };
718
+ export {
719
+ We as diagram
720
+ };
src/backend/gradio_dropdownplus/templates/component/layout-C7Nz_rwh.js ADDED
@@ -0,0 +1,1324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { G as g } from "./graph-Ngrd9eu7.js";
2
+ import { b as Te, p as ce, q as le, g as X, e as ee, l as j, o as Ie, s as Me, c as Se, u as Fe, d as f, i as m, f as _, v as x, r as M } from "./_baseUniq-DFIPcCrY.js";
3
+ import { f as O, b as he, a as je, c as Ve, d as Ae, t as V, m as w, e as P, h as ve, g as z, l as T, i as Be } from "./_basePickBy-LaQQ5Y1-.js";
4
+ import { b6 as Ge, b7 as Ye, b8 as De, aR as qe, b9 as $e, aV as pe, aU as we, ba as We, aQ as q, aA as Xe, aX as ze, aC as Ue, bb as $ } from "./mermaid.core-DH6TRyjK.js";
5
+ function He(e) {
6
+ return Ge(Ye(e, void 0, O), e + "");
7
+ }
8
+ var Je = 1, Qe = 4;
9
+ function Ze(e) {
10
+ return Te(e, Je | Qe);
11
+ }
12
+ function Ke(e, n) {
13
+ return e == null ? e : De(e, ce(n), qe);
14
+ }
15
+ function en(e, n) {
16
+ return e && le(e, ce(n));
17
+ }
18
+ function nn(e, n) {
19
+ return e > n;
20
+ }
21
+ function S(e, n) {
22
+ var r = {};
23
+ return n = X(n), le(e, function(t, a, i) {
24
+ $e(r, a, n(t, a, i));
25
+ }), r;
26
+ }
27
+ function y(e) {
28
+ return e && e.length ? he(e, pe, nn) : void 0;
29
+ }
30
+ function U(e, n) {
31
+ return e && e.length ? he(e, X(n), je) : void 0;
32
+ }
33
+ function rn(e, n) {
34
+ var r = e.length;
35
+ for (e.sort(n); r--; )
36
+ e[r] = e[r].value;
37
+ return e;
38
+ }
39
+ function tn(e, n) {
40
+ if (e !== n) {
41
+ var r = e !== void 0, t = e === null, a = e === e, i = ee(e), o = n !== void 0, u = n === null, d = n === n, s = ee(n);
42
+ if (!u && !s && !i && e > n || i && o && d && !u && !s || t && o && d || !r && d || !a)
43
+ return 1;
44
+ if (!t && !i && !s && e < n || s && r && a && !t && !i || u && r && a || !o && a || !d)
45
+ return -1;
46
+ }
47
+ return 0;
48
+ }
49
+ function an(e, n, r) {
50
+ for (var t = -1, a = e.criteria, i = n.criteria, o = a.length, u = r.length; ++t < o; ) {
51
+ var d = tn(a[t], i[t]);
52
+ if (d) {
53
+ if (t >= u)
54
+ return d;
55
+ var s = r[t];
56
+ return d * (s == "desc" ? -1 : 1);
57
+ }
58
+ }
59
+ return e.index - n.index;
60
+ }
61
+ function on(e, n, r) {
62
+ n.length ? n = j(n, function(i) {
63
+ return we(i) ? function(o) {
64
+ return Ie(o, i.length === 1 ? i[0] : i);
65
+ } : i;
66
+ }) : n = [pe];
67
+ var t = -1;
68
+ n = j(n, We(X));
69
+ var a = Ve(e, function(i, o, u) {
70
+ var d = j(n, function(s) {
71
+ return s(i);
72
+ });
73
+ return { criteria: d, index: ++t, value: i };
74
+ });
75
+ return rn(a, function(i, o) {
76
+ return an(i, o, r);
77
+ });
78
+ }
79
+ function un(e, n) {
80
+ return Ae(e, n, function(r, t) {
81
+ return Me(e, t);
82
+ });
83
+ }
84
+ var I = He(function(e, n) {
85
+ return e == null ? {} : un(e, n);
86
+ }), dn = Math.ceil, sn = Math.max;
87
+ function fn(e, n, r, t) {
88
+ for (var a = -1, i = sn(dn((n - e) / (r || 1)), 0), o = Array(i); i--; )
89
+ o[++a] = e, e += r;
90
+ return o;
91
+ }
92
+ function cn(e) {
93
+ return function(n, r, t) {
94
+ return t && typeof t != "number" && q(n, r, t) && (r = t = void 0), n = V(n), r === void 0 ? (r = n, n = 0) : r = V(r), t = t === void 0 ? n < r ? 1 : -1 : V(t), fn(n, r, t);
95
+ };
96
+ }
97
+ var E = cn(), R = Xe(function(e, n) {
98
+ if (e == null)
99
+ return [];
100
+ var r = n.length;
101
+ return r > 1 && q(e, n[0], n[1]) ? n = [] : r > 2 && q(n[0], n[1], n[2]) && (n = [n[0]]), on(e, Se(n), []);
102
+ }), ln = 0;
103
+ function H(e) {
104
+ var n = ++ln;
105
+ return Fe(e) + n;
106
+ }
107
+ function hn(e, n, r) {
108
+ for (var t = -1, a = e.length, i = n.length, o = {}; ++t < a; ) {
109
+ var u = t < i ? n[t] : void 0;
110
+ r(o, e[t], u);
111
+ }
112
+ return o;
113
+ }
114
+ function vn(e, n) {
115
+ return hn(e || [], n || [], ze);
116
+ }
117
+ class pn {
118
+ constructor() {
119
+ var n = {};
120
+ n._next = n._prev = n, this._sentinel = n;
121
+ }
122
+ dequeue() {
123
+ var n = this._sentinel, r = n._prev;
124
+ if (r !== n)
125
+ return ne(r), r;
126
+ }
127
+ enqueue(n) {
128
+ var r = this._sentinel;
129
+ n._prev && n._next && ne(n), n._next = r._next, r._next._prev = n, r._next = n, n._prev = r;
130
+ }
131
+ toString() {
132
+ for (var n = [], r = this._sentinel, t = r._prev; t !== r; )
133
+ n.push(JSON.stringify(t, wn)), t = t._prev;
134
+ return "[" + n.join(", ") + "]";
135
+ }
136
+ }
137
+ function ne(e) {
138
+ e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
139
+ }
140
+ function wn(e, n) {
141
+ if (e !== "_next" && e !== "_prev")
142
+ return n;
143
+ }
144
+ var bn = Ue(1);
145
+ function mn(e, n) {
146
+ if (e.nodeCount() <= 1)
147
+ return [];
148
+ var r = yn(e, n || bn), t = gn(r.graph, r.buckets, r.zeroIdx);
149
+ return O(
150
+ w(t, function(a) {
151
+ return e.outEdges(a.v, a.w);
152
+ })
153
+ );
154
+ }
155
+ function gn(e, n, r) {
156
+ for (var t = [], a = n[n.length - 1], i = n[0], o; e.nodeCount(); ) {
157
+ for (; o = i.dequeue(); )
158
+ A(e, n, r, o);
159
+ for (; o = a.dequeue(); )
160
+ A(e, n, r, o);
161
+ if (e.nodeCount()) {
162
+ for (var u = n.length - 2; u > 0; --u)
163
+ if (o = n[u].dequeue(), o) {
164
+ t = t.concat(A(e, n, r, o, !0));
165
+ break;
166
+ }
167
+ }
168
+ }
169
+ return t;
170
+ }
171
+ function A(e, n, r, t, a) {
172
+ var i = a ? [] : void 0;
173
+ return f(e.inEdges(t.v), function(o) {
174
+ var u = e.edge(o), d = e.node(o.v);
175
+ a && i.push({ v: o.v, w: o.w }), d.out -= u, W(n, r, d);
176
+ }), f(e.outEdges(t.v), function(o) {
177
+ var u = e.edge(o), d = o.w, s = e.node(d);
178
+ s.in -= u, W(n, r, s);
179
+ }), e.removeNode(t.v), i;
180
+ }
181
+ function yn(e, n) {
182
+ var r = new g(), t = 0, a = 0;
183
+ f(e.nodes(), function(u) {
184
+ r.setNode(u, { v: u, in: 0, out: 0 });
185
+ }), f(e.edges(), function(u) {
186
+ var d = r.edge(u.v, u.w) || 0, s = n(u), c = d + s;
187
+ r.setEdge(u.v, u.w, c), a = Math.max(a, r.node(u.v).out += s), t = Math.max(t, r.node(u.w).in += s);
188
+ });
189
+ var i = E(a + t + 3).map(function() {
190
+ return new pn();
191
+ }), o = t + 1;
192
+ return f(r.nodes(), function(u) {
193
+ W(i, o, r.node(u));
194
+ }), { graph: r, buckets: i, zeroIdx: o };
195
+ }
196
+ function W(e, n, r) {
197
+ r.out ? r.in ? e[r.out - r.in + n].enqueue(r) : e[e.length - 1].enqueue(r) : e[0].enqueue(r);
198
+ }
199
+ function kn(e) {
200
+ var n = e.graph().acyclicer === "greedy" ? mn(e, r(e)) : xn(e);
201
+ f(n, function(t) {
202
+ var a = e.edge(t);
203
+ e.removeEdge(t), a.forwardName = t.name, a.reversed = !0, e.setEdge(t.w, t.v, a, H("rev"));
204
+ });
205
+ function r(t) {
206
+ return function(a) {
207
+ return t.edge(a).weight;
208
+ };
209
+ }
210
+ }
211
+ function xn(e) {
212
+ var n = [], r = {}, t = {};
213
+ function a(i) {
214
+ Object.prototype.hasOwnProperty.call(t, i) || (t[i] = !0, r[i] = !0, f(e.outEdges(i), function(o) {
215
+ Object.prototype.hasOwnProperty.call(r, o.w) ? n.push(o) : a(o.w);
216
+ }), delete r[i]);
217
+ }
218
+ return f(e.nodes(), a), n;
219
+ }
220
+ function En(e) {
221
+ f(e.edges(), function(n) {
222
+ var r = e.edge(n);
223
+ if (r.reversed) {
224
+ e.removeEdge(n);
225
+ var t = r.forwardName;
226
+ delete r.reversed, delete r.forwardName, e.setEdge(n.w, n.v, r, t);
227
+ }
228
+ });
229
+ }
230
+ function L(e, n, r, t) {
231
+ var a;
232
+ do
233
+ a = H(t);
234
+ while (e.hasNode(a));
235
+ return r.dummy = n, e.setNode(a, r), a;
236
+ }
237
+ function On(e) {
238
+ var n = new g().setGraph(e.graph());
239
+ return f(e.nodes(), function(r) {
240
+ n.setNode(r, e.node(r));
241
+ }), f(e.edges(), function(r) {
242
+ var t = n.edge(r.v, r.w) || { weight: 0, minlen: 1 }, a = e.edge(r);
243
+ n.setEdge(r.v, r.w, {
244
+ weight: t.weight + a.weight,
245
+ minlen: Math.max(t.minlen, a.minlen)
246
+ });
247
+ }), n;
248
+ }
249
+ function be(e) {
250
+ var n = new g({ multigraph: e.isMultigraph() }).setGraph(e.graph());
251
+ return f(e.nodes(), function(r) {
252
+ e.children(r).length || n.setNode(r, e.node(r));
253
+ }), f(e.edges(), function(r) {
254
+ n.setEdge(r, e.edge(r));
255
+ }), n;
256
+ }
257
+ function re(e, n) {
258
+ var r = e.x, t = e.y, a = n.x - r, i = n.y - t, o = e.width / 2, u = e.height / 2;
259
+ if (!a && !i)
260
+ throw new Error("Not possible to find intersection inside of the rectangle");
261
+ var d, s;
262
+ return Math.abs(i) * o > Math.abs(a) * u ? (i < 0 && (u = -u), d = u * a / i, s = u) : (a < 0 && (o = -o), d = o, s = o * i / a), { x: r + d, y: t + s };
263
+ }
264
+ function F(e) {
265
+ var n = w(E(me(e) + 1), function() {
266
+ return [];
267
+ });
268
+ return f(e.nodes(), function(r) {
269
+ var t = e.node(r), a = t.rank;
270
+ m(a) || (n[a][t.order] = r);
271
+ }), n;
272
+ }
273
+ function Ln(e) {
274
+ var n = P(
275
+ w(e.nodes(), function(r) {
276
+ return e.node(r).rank;
277
+ })
278
+ );
279
+ f(e.nodes(), function(r) {
280
+ var t = e.node(r);
281
+ ve(t, "rank") && (t.rank -= n);
282
+ });
283
+ }
284
+ function Nn(e) {
285
+ var n = P(
286
+ w(e.nodes(), function(i) {
287
+ return e.node(i).rank;
288
+ })
289
+ ), r = [];
290
+ f(e.nodes(), function(i) {
291
+ var o = e.node(i).rank - n;
292
+ r[o] || (r[o] = []), r[o].push(i);
293
+ });
294
+ var t = 0, a = e.graph().nodeRankFactor;
295
+ f(r, function(i, o) {
296
+ m(i) && o % a !== 0 ? --t : t && f(i, function(u) {
297
+ e.node(u).rank += t;
298
+ });
299
+ });
300
+ }
301
+ function te(e, n, r, t) {
302
+ var a = {
303
+ width: 0,
304
+ height: 0
305
+ };
306
+ return arguments.length >= 4 && (a.rank = r, a.order = t), L(e, "border", a, n);
307
+ }
308
+ function me(e) {
309
+ return y(
310
+ w(e.nodes(), function(n) {
311
+ var r = e.node(n).rank;
312
+ if (!m(r))
313
+ return r;
314
+ })
315
+ );
316
+ }
317
+ function Pn(e, n) {
318
+ var r = { lhs: [], rhs: [] };
319
+ return f(e, function(t) {
320
+ n(t) ? r.lhs.push(t) : r.rhs.push(t);
321
+ }), r;
322
+ }
323
+ function Cn(e, n) {
324
+ return n();
325
+ }
326
+ function _n(e) {
327
+ function n(r) {
328
+ var t = e.children(r), a = e.node(r);
329
+ if (t.length && f(t, n), Object.prototype.hasOwnProperty.call(a, "minRank")) {
330
+ a.borderLeft = [], a.borderRight = [];
331
+ for (var i = a.minRank, o = a.maxRank + 1; i < o; ++i)
332
+ ae(e, "borderLeft", "_bl", r, a, i), ae(e, "borderRight", "_br", r, a, i);
333
+ }
334
+ }
335
+ f(e.children(), n);
336
+ }
337
+ function ae(e, n, r, t, a, i) {
338
+ var o = { width: 0, height: 0, rank: i, borderType: n }, u = a[n][i - 1], d = L(e, "border", o, r);
339
+ a[n][i] = d, e.setParent(d, t), u && e.setEdge(u, d, { weight: 1 });
340
+ }
341
+ function Rn(e) {
342
+ var n = e.graph().rankdir.toLowerCase();
343
+ (n === "lr" || n === "rl") && ge(e);
344
+ }
345
+ function Tn(e) {
346
+ var n = e.graph().rankdir.toLowerCase();
347
+ (n === "bt" || n === "rl") && In(e), (n === "lr" || n === "rl") && (Mn(e), ge(e));
348
+ }
349
+ function ge(e) {
350
+ f(e.nodes(), function(n) {
351
+ ie(e.node(n));
352
+ }), f(e.edges(), function(n) {
353
+ ie(e.edge(n));
354
+ });
355
+ }
356
+ function ie(e) {
357
+ var n = e.width;
358
+ e.width = e.height, e.height = n;
359
+ }
360
+ function In(e) {
361
+ f(e.nodes(), function(n) {
362
+ B(e.node(n));
363
+ }), f(e.edges(), function(n) {
364
+ var r = e.edge(n);
365
+ f(r.points, B), Object.prototype.hasOwnProperty.call(r, "y") && B(r);
366
+ });
367
+ }
368
+ function B(e) {
369
+ e.y = -e.y;
370
+ }
371
+ function Mn(e) {
372
+ f(e.nodes(), function(n) {
373
+ G(e.node(n));
374
+ }), f(e.edges(), function(n) {
375
+ var r = e.edge(n);
376
+ f(r.points, G), Object.prototype.hasOwnProperty.call(r, "x") && G(r);
377
+ });
378
+ }
379
+ function G(e) {
380
+ var n = e.x;
381
+ e.x = e.y, e.y = n;
382
+ }
383
+ function Sn(e) {
384
+ e.graph().dummyChains = [], f(e.edges(), function(n) {
385
+ Fn(e, n);
386
+ });
387
+ }
388
+ function Fn(e, n) {
389
+ var r = n.v, t = e.node(r).rank, a = n.w, i = e.node(a).rank, o = n.name, u = e.edge(n), d = u.labelRank;
390
+ if (i !== t + 1) {
391
+ e.removeEdge(n);
392
+ var s = void 0, c, l;
393
+ for (l = 0, ++t; t < i; ++l, ++t)
394
+ u.points = [], s = {
395
+ width: 0,
396
+ height: 0,
397
+ edgeLabel: u,
398
+ edgeObj: n,
399
+ rank: t
400
+ }, c = L(e, "edge", s, "_d"), t === d && (s.width = u.width, s.height = u.height, s.dummy = "edge-label", s.labelpos = u.labelpos), e.setEdge(r, c, { weight: u.weight }, o), l === 0 && e.graph().dummyChains.push(c), r = c;
401
+ e.setEdge(r, a, { weight: u.weight }, o);
402
+ }
403
+ }
404
+ function jn(e) {
405
+ f(e.graph().dummyChains, function(n) {
406
+ var r = e.node(n), t = r.edgeLabel, a;
407
+ for (e.setEdge(r.edgeObj, t); r.dummy; )
408
+ a = e.successors(n)[0], e.removeNode(n), t.points.push({ x: r.x, y: r.y }), r.dummy === "edge-label" && (t.x = r.x, t.y = r.y, t.width = r.width, t.height = r.height), n = a, r = e.node(n);
409
+ });
410
+ }
411
+ function J(e) {
412
+ var n = {};
413
+ function r(t) {
414
+ var a = e.node(t);
415
+ if (Object.prototype.hasOwnProperty.call(n, t))
416
+ return a.rank;
417
+ n[t] = !0;
418
+ var i = P(
419
+ w(e.outEdges(t), function(o) {
420
+ return r(o.w) - e.edge(o).minlen;
421
+ })
422
+ );
423
+ return (i === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3
424
+ i === void 0 || // return value of _.map([]) for Lodash 4
425
+ i === null) && (i = 0), a.rank = i;
426
+ }
427
+ f(e.sources(), r);
428
+ }
429
+ function C(e, n) {
430
+ return e.node(n.w).rank - e.node(n.v).rank - e.edge(n).minlen;
431
+ }
432
+ function ye(e) {
433
+ var n = new g({ directed: !1 }), r = e.nodes()[0], t = e.nodeCount();
434
+ n.setNode(r, {});
435
+ for (var a, i; Vn(n, e) < t; )
436
+ a = An(n, e), i = n.hasNode(a.v) ? C(e, a) : -C(e, a), Bn(n, e, i);
437
+ return n;
438
+ }
439
+ function Vn(e, n) {
440
+ function r(t) {
441
+ f(n.nodeEdges(t), function(a) {
442
+ var i = a.v, o = t === i ? a.w : i;
443
+ !e.hasNode(o) && !C(n, a) && (e.setNode(o, {}), e.setEdge(t, o, {}), r(o));
444
+ });
445
+ }
446
+ return f(e.nodes(), r), e.nodeCount();
447
+ }
448
+ function An(e, n) {
449
+ return U(n.edges(), function(r) {
450
+ if (e.hasNode(r.v) !== e.hasNode(r.w))
451
+ return C(n, r);
452
+ });
453
+ }
454
+ function Bn(e, n, r) {
455
+ f(e.nodes(), function(t) {
456
+ n.node(t).rank += r;
457
+ });
458
+ }
459
+ function Gn() {
460
+ }
461
+ Gn.prototype = new Error();
462
+ function ke(e, n, r) {
463
+ we(n) || (n = [n]);
464
+ var t = (e.isDirected() ? e.successors : e.neighbors).bind(e), a = [], i = {};
465
+ return f(n, function(o) {
466
+ if (!e.hasNode(o))
467
+ throw new Error("Graph does not have node: " + o);
468
+ xe(e, o, r === "post", i, t, a);
469
+ }), a;
470
+ }
471
+ function xe(e, n, r, t, a, i) {
472
+ Object.prototype.hasOwnProperty.call(t, n) || (t[n] = !0, r || i.push(n), f(a(n), function(o) {
473
+ xe(e, o, r, t, a, i);
474
+ }), r && i.push(n));
475
+ }
476
+ function Yn(e, n) {
477
+ return ke(e, n, "post");
478
+ }
479
+ function Dn(e, n) {
480
+ return ke(e, n, "pre");
481
+ }
482
+ k.initLowLimValues = Z;
483
+ k.initCutValues = Q;
484
+ k.calcCutValue = Ee;
485
+ k.leaveEdge = Le;
486
+ k.enterEdge = Ne;
487
+ k.exchangeEdges = Pe;
488
+ function k(e) {
489
+ e = On(e), J(e);
490
+ var n = ye(e);
491
+ Z(n), Q(n, e);
492
+ for (var r, t; r = Le(n); )
493
+ t = Ne(n, e, r), Pe(n, e, r, t);
494
+ }
495
+ function Q(e, n) {
496
+ var r = Yn(e, e.nodes());
497
+ r = r.slice(0, r.length - 1), f(r, function(t) {
498
+ qn(e, n, t);
499
+ });
500
+ }
501
+ function qn(e, n, r) {
502
+ var t = e.node(r), a = t.parent;
503
+ e.edge(r, a).cutvalue = Ee(e, n, r);
504
+ }
505
+ function Ee(e, n, r) {
506
+ var t = e.node(r), a = t.parent, i = !0, o = n.edge(r, a), u = 0;
507
+ return o || (i = !1, o = n.edge(a, r)), u = o.weight, f(n.nodeEdges(r), function(d) {
508
+ var s = d.v === r, c = s ? d.w : d.v;
509
+ if (c !== a) {
510
+ var l = s === i, h = n.edge(d).weight;
511
+ if (u += l ? h : -h, Wn(e, r, c)) {
512
+ var v = e.edge(r, c).cutvalue;
513
+ u += l ? -v : v;
514
+ }
515
+ }
516
+ }), u;
517
+ }
518
+ function Z(e, n) {
519
+ arguments.length < 2 && (n = e.nodes()[0]), Oe(e, {}, 1, n);
520
+ }
521
+ function Oe(e, n, r, t, a) {
522
+ var i = r, o = e.node(t);
523
+ return n[t] = !0, f(e.neighbors(t), function(u) {
524
+ Object.prototype.hasOwnProperty.call(n, u) || (r = Oe(e, n, r, u, t));
525
+ }), o.low = i, o.lim = r++, a ? o.parent = a : delete o.parent, r;
526
+ }
527
+ function Le(e) {
528
+ return z(e.edges(), function(n) {
529
+ return e.edge(n).cutvalue < 0;
530
+ });
531
+ }
532
+ function Ne(e, n, r) {
533
+ var t = r.v, a = r.w;
534
+ n.hasEdge(t, a) || (t = r.w, a = r.v);
535
+ var i = e.node(t), o = e.node(a), u = i, d = !1;
536
+ i.lim > o.lim && (u = o, d = !0);
537
+ var s = _(n.edges(), function(c) {
538
+ return d === oe(e, e.node(c.v), u) && d !== oe(e, e.node(c.w), u);
539
+ });
540
+ return U(s, function(c) {
541
+ return C(n, c);
542
+ });
543
+ }
544
+ function Pe(e, n, r, t) {
545
+ var a = r.v, i = r.w;
546
+ e.removeEdge(a, i), e.setEdge(t.v, t.w, {}), Z(e), Q(e, n), $n(e, n);
547
+ }
548
+ function $n(e, n) {
549
+ var r = z(e.nodes(), function(a) {
550
+ return !n.node(a).parent;
551
+ }), t = Dn(e, r);
552
+ t = t.slice(1), f(t, function(a) {
553
+ var i = e.node(a).parent, o = n.edge(a, i), u = !1;
554
+ o || (o = n.edge(i, a), u = !0), n.node(a).rank = n.node(i).rank + (u ? o.minlen : -o.minlen);
555
+ });
556
+ }
557
+ function Wn(e, n, r) {
558
+ return e.hasEdge(n, r);
559
+ }
560
+ function oe(e, n, r) {
561
+ return r.low <= n.lim && n.lim <= r.lim;
562
+ }
563
+ function Xn(e) {
564
+ switch (e.graph().ranker) {
565
+ case "network-simplex":
566
+ ue(e);
567
+ break;
568
+ case "tight-tree":
569
+ Un(e);
570
+ break;
571
+ case "longest-path":
572
+ zn(e);
573
+ break;
574
+ default:
575
+ ue(e);
576
+ }
577
+ }
578
+ var zn = J;
579
+ function Un(e) {
580
+ J(e), ye(e);
581
+ }
582
+ function ue(e) {
583
+ k(e);
584
+ }
585
+ function Hn(e) {
586
+ var n = L(e, "root", {}, "_root"), r = Jn(e), t = y(x(r)) - 1, a = 2 * t + 1;
587
+ e.graph().nestingRoot = n, f(e.edges(), function(o) {
588
+ e.edge(o).minlen *= a;
589
+ });
590
+ var i = Qn(e) + 1;
591
+ f(e.children(), function(o) {
592
+ Ce(e, n, a, i, t, r, o);
593
+ }), e.graph().nodeRankFactor = a;
594
+ }
595
+ function Ce(e, n, r, t, a, i, o) {
596
+ var u = e.children(o);
597
+ if (!u.length) {
598
+ o !== n && e.setEdge(n, o, { weight: 0, minlen: r });
599
+ return;
600
+ }
601
+ var d = te(e, "_bt"), s = te(e, "_bb"), c = e.node(o);
602
+ e.setParent(d, o), c.borderTop = d, e.setParent(s, o), c.borderBottom = s, f(u, function(l) {
603
+ Ce(e, n, r, t, a, i, l);
604
+ var h = e.node(l), v = h.borderTop ? h.borderTop : l, p = h.borderBottom ? h.borderBottom : l, b = h.borderTop ? t : 2 * t, N = v !== p ? 1 : a - i[o] + 1;
605
+ e.setEdge(d, v, {
606
+ weight: b,
607
+ minlen: N,
608
+ nestingEdge: !0
609
+ }), e.setEdge(p, s, {
610
+ weight: b,
611
+ minlen: N,
612
+ nestingEdge: !0
613
+ });
614
+ }), e.parent(o) || e.setEdge(n, d, { weight: 0, minlen: a + i[o] });
615
+ }
616
+ function Jn(e) {
617
+ var n = {};
618
+ function r(t, a) {
619
+ var i = e.children(t);
620
+ i && i.length && f(i, function(o) {
621
+ r(o, a + 1);
622
+ }), n[t] = a;
623
+ }
624
+ return f(e.children(), function(t) {
625
+ r(t, 1);
626
+ }), n;
627
+ }
628
+ function Qn(e) {
629
+ return M(
630
+ e.edges(),
631
+ function(n, r) {
632
+ return n + e.edge(r).weight;
633
+ },
634
+ 0
635
+ );
636
+ }
637
+ function Zn(e) {
638
+ var n = e.graph();
639
+ e.removeNode(n.nestingRoot), delete n.nestingRoot, f(e.edges(), function(r) {
640
+ var t = e.edge(r);
641
+ t.nestingEdge && e.removeEdge(r);
642
+ });
643
+ }
644
+ function Kn(e, n, r) {
645
+ var t = {}, a;
646
+ f(r, function(i) {
647
+ for (var o = e.parent(i), u, d; o; ) {
648
+ if (u = e.parent(o), u ? (d = t[u], t[u] = o) : (d = a, a = o), d && d !== o) {
649
+ n.setEdge(d, o);
650
+ return;
651
+ }
652
+ o = u;
653
+ }
654
+ });
655
+ }
656
+ function er(e, n, r) {
657
+ var t = nr(e), a = new g({ compound: !0 }).setGraph({ root: t }).setDefaultNodeLabel(function(i) {
658
+ return e.node(i);
659
+ });
660
+ return f(e.nodes(), function(i) {
661
+ var o = e.node(i), u = e.parent(i);
662
+ (o.rank === n || o.minRank <= n && n <= o.maxRank) && (a.setNode(i), a.setParent(i, u || t), f(e[r](i), function(d) {
663
+ var s = d.v === i ? d.w : d.v, c = a.edge(s, i), l = m(c) ? 0 : c.weight;
664
+ a.setEdge(s, i, { weight: e.edge(d).weight + l });
665
+ }), Object.prototype.hasOwnProperty.call(o, "minRank") && a.setNode(i, {
666
+ borderLeft: o.borderLeft[n],
667
+ borderRight: o.borderRight[n]
668
+ }));
669
+ }), a;
670
+ }
671
+ function nr(e) {
672
+ for (var n; e.hasNode(n = H("_root")); ) ;
673
+ return n;
674
+ }
675
+ function rr(e, n) {
676
+ for (var r = 0, t = 1; t < n.length; ++t)
677
+ r += tr(e, n[t - 1], n[t]);
678
+ return r;
679
+ }
680
+ function tr(e, n, r) {
681
+ for (var t = vn(
682
+ r,
683
+ w(r, function(s, c) {
684
+ return c;
685
+ })
686
+ ), a = O(
687
+ w(n, function(s) {
688
+ return R(
689
+ w(e.outEdges(s), function(c) {
690
+ return { pos: t[c.w], weight: e.edge(c).weight };
691
+ }),
692
+ "pos"
693
+ );
694
+ })
695
+ ), i = 1; i < r.length; ) i <<= 1;
696
+ var o = 2 * i - 1;
697
+ i -= 1;
698
+ var u = w(new Array(o), function() {
699
+ return 0;
700
+ }), d = 0;
701
+ return f(
702
+ // @ts-expect-error
703
+ a.forEach(function(s) {
704
+ var c = s.pos + i;
705
+ u[c] += s.weight;
706
+ for (var l = 0; c > 0; )
707
+ c % 2 && (l += u[c + 1]), c = c - 1 >> 1, u[c] += s.weight;
708
+ d += s.weight * l;
709
+ })
710
+ ), d;
711
+ }
712
+ function ar(e) {
713
+ var n = {}, r = _(e.nodes(), function(u) {
714
+ return !e.children(u).length;
715
+ }), t = y(
716
+ w(r, function(u) {
717
+ return e.node(u).rank;
718
+ })
719
+ ), a = w(E(t + 1), function() {
720
+ return [];
721
+ });
722
+ function i(u) {
723
+ if (!ve(n, u)) {
724
+ n[u] = !0;
725
+ var d = e.node(u);
726
+ a[d.rank].push(u), f(e.successors(u), i);
727
+ }
728
+ }
729
+ var o = R(r, function(u) {
730
+ return e.node(u).rank;
731
+ });
732
+ return f(o, i), a;
733
+ }
734
+ function ir(e, n) {
735
+ return w(n, function(r) {
736
+ var t = e.inEdges(r);
737
+ if (t.length) {
738
+ var a = M(
739
+ t,
740
+ function(i, o) {
741
+ var u = e.edge(o), d = e.node(o.v);
742
+ return {
743
+ sum: i.sum + u.weight * d.order,
744
+ weight: i.weight + u.weight
745
+ };
746
+ },
747
+ { sum: 0, weight: 0 }
748
+ );
749
+ return {
750
+ v: r,
751
+ barycenter: a.sum / a.weight,
752
+ weight: a.weight
753
+ };
754
+ } else
755
+ return { v: r };
756
+ });
757
+ }
758
+ function or(e, n) {
759
+ var r = {};
760
+ f(e, function(a, i) {
761
+ var o = r[a.v] = {
762
+ indegree: 0,
763
+ in: [],
764
+ out: [],
765
+ vs: [a.v],
766
+ i
767
+ };
768
+ m(a.barycenter) || (o.barycenter = a.barycenter, o.weight = a.weight);
769
+ }), f(n.edges(), function(a) {
770
+ var i = r[a.v], o = r[a.w];
771
+ !m(i) && !m(o) && (o.indegree++, i.out.push(r[a.w]));
772
+ });
773
+ var t = _(r, function(a) {
774
+ return !a.indegree;
775
+ });
776
+ return ur(t);
777
+ }
778
+ function ur(e) {
779
+ var n = [];
780
+ function r(i) {
781
+ return function(o) {
782
+ o.merged || (m(o.barycenter) || m(i.barycenter) || o.barycenter >= i.barycenter) && dr(i, o);
783
+ };
784
+ }
785
+ function t(i) {
786
+ return function(o) {
787
+ o.in.push(i), --o.indegree === 0 && e.push(o);
788
+ };
789
+ }
790
+ for (; e.length; ) {
791
+ var a = e.pop();
792
+ n.push(a), f(a.in.reverse(), r(a)), f(a.out, t(a));
793
+ }
794
+ return w(
795
+ _(n, function(i) {
796
+ return !i.merged;
797
+ }),
798
+ function(i) {
799
+ return I(i, ["vs", "i", "barycenter", "weight"]);
800
+ }
801
+ );
802
+ }
803
+ function dr(e, n) {
804
+ var r = 0, t = 0;
805
+ e.weight && (r += e.barycenter * e.weight, t += e.weight), n.weight && (r += n.barycenter * n.weight, t += n.weight), e.vs = n.vs.concat(e.vs), e.barycenter = r / t, e.weight = t, e.i = Math.min(n.i, e.i), n.merged = !0;
806
+ }
807
+ function sr(e, n) {
808
+ var r = Pn(e, function(c) {
809
+ return Object.prototype.hasOwnProperty.call(c, "barycenter");
810
+ }), t = r.lhs, a = R(r.rhs, function(c) {
811
+ return -c.i;
812
+ }), i = [], o = 0, u = 0, d = 0;
813
+ t.sort(fr(!!n)), d = de(i, a, d), f(t, function(c) {
814
+ d += c.vs.length, i.push(c.vs), o += c.barycenter * c.weight, u += c.weight, d = de(i, a, d);
815
+ });
816
+ var s = { vs: O(i) };
817
+ return u && (s.barycenter = o / u, s.weight = u), s;
818
+ }
819
+ function de(e, n, r) {
820
+ for (var t; n.length && (t = T(n)).i <= r; )
821
+ n.pop(), e.push(t.vs), r++;
822
+ return r;
823
+ }
824
+ function fr(e) {
825
+ return function(n, r) {
826
+ return n.barycenter < r.barycenter ? -1 : n.barycenter > r.barycenter ? 1 : e ? r.i - n.i : n.i - r.i;
827
+ };
828
+ }
829
+ function _e(e, n, r, t) {
830
+ var a = e.children(n), i = e.node(n), o = i ? i.borderLeft : void 0, u = i ? i.borderRight : void 0, d = {};
831
+ o && (a = _(a, function(p) {
832
+ return p !== o && p !== u;
833
+ }));
834
+ var s = ir(e, a);
835
+ f(s, function(p) {
836
+ if (e.children(p.v).length) {
837
+ var b = _e(e, p.v, r, t);
838
+ d[p.v] = b, Object.prototype.hasOwnProperty.call(b, "barycenter") && lr(p, b);
839
+ }
840
+ });
841
+ var c = or(s, r);
842
+ cr(c, d);
843
+ var l = sr(c, t);
844
+ if (o && (l.vs = O([o, l.vs, u]), e.predecessors(o).length)) {
845
+ var h = e.node(e.predecessors(o)[0]), v = e.node(e.predecessors(u)[0]);
846
+ Object.prototype.hasOwnProperty.call(l, "barycenter") || (l.barycenter = 0, l.weight = 0), l.barycenter = (l.barycenter * l.weight + h.order + v.order) / (l.weight + 2), l.weight += 2;
847
+ }
848
+ return l;
849
+ }
850
+ function cr(e, n) {
851
+ f(e, function(r) {
852
+ r.vs = O(
853
+ r.vs.map(function(t) {
854
+ return n[t] ? n[t].vs : t;
855
+ })
856
+ );
857
+ });
858
+ }
859
+ function lr(e, n) {
860
+ m(e.barycenter) ? (e.barycenter = n.barycenter, e.weight = n.weight) : (e.barycenter = (e.barycenter * e.weight + n.barycenter * n.weight) / (e.weight + n.weight), e.weight += n.weight);
861
+ }
862
+ function hr(e) {
863
+ var n = me(e), r = se(e, E(1, n + 1), "inEdges"), t = se(e, E(n - 1, -1, -1), "outEdges"), a = ar(e);
864
+ fe(e, a);
865
+ for (var i = Number.POSITIVE_INFINITY, o, u = 0, d = 0; d < 4; ++u, ++d) {
866
+ vr(u % 2 ? r : t, u % 4 >= 2), a = F(e);
867
+ var s = rr(e, a);
868
+ s < i && (d = 0, o = Ze(a), i = s);
869
+ }
870
+ fe(e, o);
871
+ }
872
+ function se(e, n, r) {
873
+ return w(n, function(t) {
874
+ return er(e, t, r);
875
+ });
876
+ }
877
+ function vr(e, n) {
878
+ var r = new g();
879
+ f(e, function(t) {
880
+ var a = t.graph().root, i = _e(t, a, r, n);
881
+ f(i.vs, function(o, u) {
882
+ t.node(o).order = u;
883
+ }), Kn(t, r, i.vs);
884
+ });
885
+ }
886
+ function fe(e, n) {
887
+ f(n, function(r) {
888
+ f(r, function(t, a) {
889
+ e.node(t).order = a;
890
+ });
891
+ });
892
+ }
893
+ function pr(e) {
894
+ var n = br(e);
895
+ f(e.graph().dummyChains, function(r) {
896
+ for (var t = e.node(r), a = t.edgeObj, i = wr(e, n, a.v, a.w), o = i.path, u = i.lca, d = 0, s = o[d], c = !0; r !== a.w; ) {
897
+ if (t = e.node(r), c) {
898
+ for (; (s = o[d]) !== u && e.node(s).maxRank < t.rank; )
899
+ d++;
900
+ s === u && (c = !1);
901
+ }
902
+ if (!c) {
903
+ for (; d < o.length - 1 && e.node(s = o[d + 1]).minRank <= t.rank; )
904
+ d++;
905
+ s = o[d];
906
+ }
907
+ e.setParent(r, s), r = e.successors(r)[0];
908
+ }
909
+ });
910
+ }
911
+ function wr(e, n, r, t) {
912
+ var a = [], i = [], o = Math.min(n[r].low, n[t].low), u = Math.max(n[r].lim, n[t].lim), d, s;
913
+ d = r;
914
+ do
915
+ d = e.parent(d), a.push(d);
916
+ while (d && (n[d].low > o || u > n[d].lim));
917
+ for (s = d, d = t; (d = e.parent(d)) !== s; )
918
+ i.push(d);
919
+ return { path: a.concat(i.reverse()), lca: s };
920
+ }
921
+ function br(e) {
922
+ var n = {}, r = 0;
923
+ function t(a) {
924
+ var i = r;
925
+ f(e.children(a), t), n[a] = { low: i, lim: r++ };
926
+ }
927
+ return f(e.children(), t), n;
928
+ }
929
+ function mr(e, n) {
930
+ var r = {};
931
+ function t(a, i) {
932
+ var o = 0, u = 0, d = a.length, s = T(i);
933
+ return f(i, function(c, l) {
934
+ var h = yr(e, c), v = h ? e.node(h).order : d;
935
+ (h || c === s) && (f(i.slice(u, l + 1), function(p) {
936
+ f(e.predecessors(p), function(b) {
937
+ var N = e.node(b), K = N.order;
938
+ (K < o || v < K) && !(N.dummy && e.node(p).dummy) && Re(r, b, p);
939
+ });
940
+ }), u = l + 1, o = v);
941
+ }), i;
942
+ }
943
+ return M(n, t), r;
944
+ }
945
+ function gr(e, n) {
946
+ var r = {};
947
+ function t(i, o, u, d, s) {
948
+ var c;
949
+ f(E(o, u), function(l) {
950
+ c = i[l], e.node(c).dummy && f(e.predecessors(c), function(h) {
951
+ var v = e.node(h);
952
+ v.dummy && (v.order < d || v.order > s) && Re(r, h, c);
953
+ });
954
+ });
955
+ }
956
+ function a(i, o) {
957
+ var u = -1, d, s = 0;
958
+ return f(o, function(c, l) {
959
+ if (e.node(c).dummy === "border") {
960
+ var h = e.predecessors(c);
961
+ h.length && (d = e.node(h[0]).order, t(o, s, l, u, d), s = l, u = d);
962
+ }
963
+ t(o, s, o.length, d, i.length);
964
+ }), o;
965
+ }
966
+ return M(n, a), r;
967
+ }
968
+ function yr(e, n) {
969
+ if (e.node(n).dummy)
970
+ return z(e.predecessors(n), function(r) {
971
+ return e.node(r).dummy;
972
+ });
973
+ }
974
+ function Re(e, n, r) {
975
+ if (n > r) {
976
+ var t = n;
977
+ n = r, r = t;
978
+ }
979
+ var a = e[n];
980
+ a || (e[n] = a = {}), a[r] = !0;
981
+ }
982
+ function kr(e, n, r) {
983
+ if (n > r) {
984
+ var t = n;
985
+ n = r, r = t;
986
+ }
987
+ return !!e[n] && Object.prototype.hasOwnProperty.call(e[n], r);
988
+ }
989
+ function xr(e, n, r, t) {
990
+ var a = {}, i = {}, o = {};
991
+ return f(n, function(u) {
992
+ f(u, function(d, s) {
993
+ a[d] = d, i[d] = d, o[d] = s;
994
+ });
995
+ }), f(n, function(u) {
996
+ var d = -1;
997
+ f(u, function(s) {
998
+ var c = t(s);
999
+ if (c.length) {
1000
+ c = R(c, function(b) {
1001
+ return o[b];
1002
+ });
1003
+ for (var l = (c.length - 1) / 2, h = Math.floor(l), v = Math.ceil(l); h <= v; ++h) {
1004
+ var p = c[h];
1005
+ i[s] === s && d < o[p] && !kr(r, s, p) && (i[p] = s, i[s] = a[s] = a[p], d = o[p]);
1006
+ }
1007
+ }
1008
+ });
1009
+ }), { root: a, align: i };
1010
+ }
1011
+ function Er(e, n, r, t, a) {
1012
+ var i = {}, o = Or(e, n, r, a), u = a ? "borderLeft" : "borderRight";
1013
+ function d(l, h) {
1014
+ for (var v = o.nodes(), p = v.pop(), b = {}; p; )
1015
+ b[p] ? l(p) : (b[p] = !0, v.push(p), v = v.concat(h(p))), p = v.pop();
1016
+ }
1017
+ function s(l) {
1018
+ i[l] = o.inEdges(l).reduce(function(h, v) {
1019
+ return Math.max(h, i[v.v] + o.edge(v));
1020
+ }, 0);
1021
+ }
1022
+ function c(l) {
1023
+ var h = o.outEdges(l).reduce(function(p, b) {
1024
+ return Math.min(p, i[b.w] - o.edge(b));
1025
+ }, Number.POSITIVE_INFINITY), v = e.node(l);
1026
+ h !== Number.POSITIVE_INFINITY && v.borderType !== u && (i[l] = Math.max(i[l], h));
1027
+ }
1028
+ return d(s, o.predecessors.bind(o)), d(c, o.successors.bind(o)), f(t, function(l) {
1029
+ i[l] = i[r[l]];
1030
+ }), i;
1031
+ }
1032
+ function Or(e, n, r, t) {
1033
+ var a = new g(), i = e.graph(), o = _r(i.nodesep, i.edgesep, t);
1034
+ return f(n, function(u) {
1035
+ var d;
1036
+ f(u, function(s) {
1037
+ var c = r[s];
1038
+ if (a.setNode(c), d) {
1039
+ var l = r[d], h = a.edge(l, c);
1040
+ a.setEdge(l, c, Math.max(o(e, s, d), h || 0));
1041
+ }
1042
+ d = s;
1043
+ });
1044
+ }), a;
1045
+ }
1046
+ function Lr(e, n) {
1047
+ return U(x(n), function(r) {
1048
+ var t = Number.NEGATIVE_INFINITY, a = Number.POSITIVE_INFINITY;
1049
+ return Ke(r, function(i, o) {
1050
+ var u = Rr(e, o) / 2;
1051
+ t = Math.max(i + u, t), a = Math.min(i - u, a);
1052
+ }), t - a;
1053
+ });
1054
+ }
1055
+ function Nr(e, n) {
1056
+ var r = x(n), t = P(r), a = y(r);
1057
+ f(["u", "d"], function(i) {
1058
+ f(["l", "r"], function(o) {
1059
+ var u = i + o, d = e[u], s;
1060
+ if (d !== n) {
1061
+ var c = x(d);
1062
+ s = o === "l" ? t - P(c) : a - y(c), s && (e[u] = S(d, function(l) {
1063
+ return l + s;
1064
+ }));
1065
+ }
1066
+ });
1067
+ });
1068
+ }
1069
+ function Pr(e, n) {
1070
+ return S(e.ul, function(r, t) {
1071
+ if (n)
1072
+ return e[n.toLowerCase()][t];
1073
+ var a = R(w(e, t));
1074
+ return (a[1] + a[2]) / 2;
1075
+ });
1076
+ }
1077
+ function Cr(e) {
1078
+ var n = F(e), r = $(mr(e, n), gr(e, n)), t = {}, a;
1079
+ f(["u", "d"], function(o) {
1080
+ a = o === "u" ? n : x(n).reverse(), f(["l", "r"], function(u) {
1081
+ u === "r" && (a = w(a, function(l) {
1082
+ return x(l).reverse();
1083
+ }));
1084
+ var d = (o === "u" ? e.predecessors : e.successors).bind(e), s = xr(e, a, r, d), c = Er(e, a, s.root, s.align, u === "r");
1085
+ u === "r" && (c = S(c, function(l) {
1086
+ return -l;
1087
+ })), t[o + u] = c;
1088
+ });
1089
+ });
1090
+ var i = Lr(e, t);
1091
+ return Nr(t, i), Pr(t, e.graph().align);
1092
+ }
1093
+ function _r(e, n, r) {
1094
+ return function(t, a, i) {
1095
+ var o = t.node(a), u = t.node(i), d = 0, s;
1096
+ if (d += o.width / 2, Object.prototype.hasOwnProperty.call(o, "labelpos"))
1097
+ switch (o.labelpos.toLowerCase()) {
1098
+ case "l":
1099
+ s = -o.width / 2;
1100
+ break;
1101
+ case "r":
1102
+ s = o.width / 2;
1103
+ break;
1104
+ }
1105
+ if (s && (d += r ? s : -s), s = 0, d += (o.dummy ? n : e) / 2, d += (u.dummy ? n : e) / 2, d += u.width / 2, Object.prototype.hasOwnProperty.call(u, "labelpos"))
1106
+ switch (u.labelpos.toLowerCase()) {
1107
+ case "l":
1108
+ s = u.width / 2;
1109
+ break;
1110
+ case "r":
1111
+ s = -u.width / 2;
1112
+ break;
1113
+ }
1114
+ return s && (d += r ? s : -s), s = 0, d;
1115
+ };
1116
+ }
1117
+ function Rr(e, n) {
1118
+ return e.node(n).width;
1119
+ }
1120
+ function Tr(e) {
1121
+ e = be(e), Ir(e), en(Cr(e), function(n, r) {
1122
+ e.node(r).x = n;
1123
+ });
1124
+ }
1125
+ function Ir(e) {
1126
+ var n = F(e), r = e.graph().ranksep, t = 0;
1127
+ f(n, function(a) {
1128
+ var i = y(
1129
+ w(a, function(o) {
1130
+ return e.node(o).height;
1131
+ })
1132
+ );
1133
+ f(a, function(o) {
1134
+ e.node(o).y = t + i / 2;
1135
+ }), t += i + r;
1136
+ });
1137
+ }
1138
+ function ot(e, n) {
1139
+ var r = Cn;
1140
+ r("layout", () => {
1141
+ var t = r(" buildLayoutGraph", () => qr(e));
1142
+ r(" runLayout", () => Mr(t, r)), r(" updateInputGraph", () => Sr(e, t));
1143
+ });
1144
+ }
1145
+ function Mr(e, n) {
1146
+ n(" makeSpaceForEdgeLabels", () => $r(e)), n(" removeSelfEdges", () => Kr(e)), n(" acyclic", () => kn(e)), n(" nestingGraph.run", () => Hn(e)), n(" rank", () => Xn(be(e))), n(" injectEdgeLabelProxies", () => Wr(e)), n(" removeEmptyRanks", () => Nn(e)), n(" nestingGraph.cleanup", () => Zn(e)), n(" normalizeRanks", () => Ln(e)), n(" assignRankMinMax", () => Xr(e)), n(" removeEdgeLabelProxies", () => zr(e)), n(" normalize.run", () => Sn(e)), n(" parentDummyChains", () => pr(e)), n(" addBorderSegments", () => _n(e)), n(" order", () => hr(e)), n(" insertSelfEdges", () => et(e)), n(" adjustCoordinateSystem", () => Rn(e)), n(" position", () => Tr(e)), n(" positionSelfEdges", () => nt(e)), n(" removeBorderNodes", () => Zr(e)), n(" normalize.undo", () => jn(e)), n(" fixupEdgeLabelCoords", () => Jr(e)), n(" undoCoordinateSystem", () => Tn(e)), n(" translateGraph", () => Ur(e)), n(" assignNodeIntersects", () => Hr(e)), n(" reversePoints", () => Qr(e)), n(" acyclic.undo", () => En(e));
1147
+ }
1148
+ function Sr(e, n) {
1149
+ f(e.nodes(), function(r) {
1150
+ var t = e.node(r), a = n.node(r);
1151
+ t && (t.x = a.x, t.y = a.y, n.children(r).length && (t.width = a.width, t.height = a.height));
1152
+ }), f(e.edges(), function(r) {
1153
+ var t = e.edge(r), a = n.edge(r);
1154
+ t.points = a.points, Object.prototype.hasOwnProperty.call(a, "x") && (t.x = a.x, t.y = a.y);
1155
+ }), e.graph().width = n.graph().width, e.graph().height = n.graph().height;
1156
+ }
1157
+ var Fr = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], jr = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Vr = ["acyclicer", "ranker", "rankdir", "align"], Ar = ["width", "height"], Br = { width: 0, height: 0 }, Gr = ["minlen", "weight", "width", "height", "labeloffset"], Yr = {
1158
+ minlen: 1,
1159
+ weight: 1,
1160
+ width: 0,
1161
+ height: 0,
1162
+ labeloffset: 10,
1163
+ labelpos: "r"
1164
+ }, Dr = ["labelpos"];
1165
+ function qr(e) {
1166
+ var n = new g({ multigraph: !0, compound: !0 }), r = D(e.graph());
1167
+ return n.setGraph(
1168
+ $({}, jr, Y(r, Fr), I(r, Vr))
1169
+ ), f(e.nodes(), function(t) {
1170
+ var a = D(e.node(t));
1171
+ n.setNode(t, Be(Y(a, Ar), Br)), n.setParent(t, e.parent(t));
1172
+ }), f(e.edges(), function(t) {
1173
+ var a = D(e.edge(t));
1174
+ n.setEdge(
1175
+ t,
1176
+ $({}, Yr, Y(a, Gr), I(a, Dr))
1177
+ );
1178
+ }), n;
1179
+ }
1180
+ function $r(e) {
1181
+ var n = e.graph();
1182
+ n.ranksep /= 2, f(e.edges(), function(r) {
1183
+ var t = e.edge(r);
1184
+ t.minlen *= 2, t.labelpos.toLowerCase() !== "c" && (n.rankdir === "TB" || n.rankdir === "BT" ? t.width += t.labeloffset : t.height += t.labeloffset);
1185
+ });
1186
+ }
1187
+ function Wr(e) {
1188
+ f(e.edges(), function(n) {
1189
+ var r = e.edge(n);
1190
+ if (r.width && r.height) {
1191
+ var t = e.node(n.v), a = e.node(n.w), i = { rank: (a.rank - t.rank) / 2 + t.rank, e: n };
1192
+ L(e, "edge-proxy", i, "_ep");
1193
+ }
1194
+ });
1195
+ }
1196
+ function Xr(e) {
1197
+ var n = 0;
1198
+ f(e.nodes(), function(r) {
1199
+ var t = e.node(r);
1200
+ t.borderTop && (t.minRank = e.node(t.borderTop).rank, t.maxRank = e.node(t.borderBottom).rank, n = y(n, t.maxRank));
1201
+ }), e.graph().maxRank = n;
1202
+ }
1203
+ function zr(e) {
1204
+ f(e.nodes(), function(n) {
1205
+ var r = e.node(n);
1206
+ r.dummy === "edge-proxy" && (e.edge(r.e).labelRank = r.rank, e.removeNode(n));
1207
+ });
1208
+ }
1209
+ function Ur(e) {
1210
+ var n = Number.POSITIVE_INFINITY, r = 0, t = Number.POSITIVE_INFINITY, a = 0, i = e.graph(), o = i.marginx || 0, u = i.marginy || 0;
1211
+ function d(s) {
1212
+ var c = s.x, l = s.y, h = s.width, v = s.height;
1213
+ n = Math.min(n, c - h / 2), r = Math.max(r, c + h / 2), t = Math.min(t, l - v / 2), a = Math.max(a, l + v / 2);
1214
+ }
1215
+ f(e.nodes(), function(s) {
1216
+ d(e.node(s));
1217
+ }), f(e.edges(), function(s) {
1218
+ var c = e.edge(s);
1219
+ Object.prototype.hasOwnProperty.call(c, "x") && d(c);
1220
+ }), n -= o, t -= u, f(e.nodes(), function(s) {
1221
+ var c = e.node(s);
1222
+ c.x -= n, c.y -= t;
1223
+ }), f(e.edges(), function(s) {
1224
+ var c = e.edge(s);
1225
+ f(c.points, function(l) {
1226
+ l.x -= n, l.y -= t;
1227
+ }), Object.prototype.hasOwnProperty.call(c, "x") && (c.x -= n), Object.prototype.hasOwnProperty.call(c, "y") && (c.y -= t);
1228
+ }), i.width = r - n + o, i.height = a - t + u;
1229
+ }
1230
+ function Hr(e) {
1231
+ f(e.edges(), function(n) {
1232
+ var r = e.edge(n), t = e.node(n.v), a = e.node(n.w), i, o;
1233
+ r.points ? (i = r.points[0], o = r.points[r.points.length - 1]) : (r.points = [], i = a, o = t), r.points.unshift(re(t, i)), r.points.push(re(a, o));
1234
+ });
1235
+ }
1236
+ function Jr(e) {
1237
+ f(e.edges(), function(n) {
1238
+ var r = e.edge(n);
1239
+ if (Object.prototype.hasOwnProperty.call(r, "x"))
1240
+ switch ((r.labelpos === "l" || r.labelpos === "r") && (r.width -= r.labeloffset), r.labelpos) {
1241
+ case "l":
1242
+ r.x -= r.width / 2 + r.labeloffset;
1243
+ break;
1244
+ case "r":
1245
+ r.x += r.width / 2 + r.labeloffset;
1246
+ break;
1247
+ }
1248
+ });
1249
+ }
1250
+ function Qr(e) {
1251
+ f(e.edges(), function(n) {
1252
+ var r = e.edge(n);
1253
+ r.reversed && r.points.reverse();
1254
+ });
1255
+ }
1256
+ function Zr(e) {
1257
+ f(e.nodes(), function(n) {
1258
+ if (e.children(n).length) {
1259
+ var r = e.node(n), t = e.node(r.borderTop), a = e.node(r.borderBottom), i = e.node(T(r.borderLeft)), o = e.node(T(r.borderRight));
1260
+ r.width = Math.abs(o.x - i.x), r.height = Math.abs(a.y - t.y), r.x = i.x + r.width / 2, r.y = t.y + r.height / 2;
1261
+ }
1262
+ }), f(e.nodes(), function(n) {
1263
+ e.node(n).dummy === "border" && e.removeNode(n);
1264
+ });
1265
+ }
1266
+ function Kr(e) {
1267
+ f(e.edges(), function(n) {
1268
+ if (n.v === n.w) {
1269
+ var r = e.node(n.v);
1270
+ r.selfEdges || (r.selfEdges = []), r.selfEdges.push({ e: n, label: e.edge(n) }), e.removeEdge(n);
1271
+ }
1272
+ });
1273
+ }
1274
+ function et(e) {
1275
+ var n = F(e);
1276
+ f(n, function(r) {
1277
+ var t = 0;
1278
+ f(r, function(a, i) {
1279
+ var o = e.node(a);
1280
+ o.order = i + t, f(o.selfEdges, function(u) {
1281
+ L(
1282
+ e,
1283
+ "selfedge",
1284
+ {
1285
+ width: u.label.width,
1286
+ height: u.label.height,
1287
+ rank: o.rank,
1288
+ order: i + ++t,
1289
+ e: u.e,
1290
+ label: u.label
1291
+ },
1292
+ "_se"
1293
+ );
1294
+ }), delete o.selfEdges;
1295
+ });
1296
+ });
1297
+ }
1298
+ function nt(e) {
1299
+ f(e.nodes(), function(n) {
1300
+ var r = e.node(n);
1301
+ if (r.dummy === "selfedge") {
1302
+ var t = e.node(r.e.v), a = t.x + t.width / 2, i = t.y, o = r.x - a, u = t.height / 2;
1303
+ e.setEdge(r.e, r.label), e.removeNode(n), r.label.points = [
1304
+ { x: a + 2 * o / 3, y: i - u },
1305
+ { x: a + 5 * o / 6, y: i - u },
1306
+ { x: a + o, y: i },
1307
+ { x: a + 5 * o / 6, y: i + u },
1308
+ { x: a + 2 * o / 3, y: i + u }
1309
+ ], r.label.x = r.x, r.label.y = r.y;
1310
+ }
1311
+ });
1312
+ }
1313
+ function Y(e, n) {
1314
+ return S(I(e, n), Number);
1315
+ }
1316
+ function D(e) {
1317
+ var n = {};
1318
+ return f(e, function(r, t) {
1319
+ n[t.toLowerCase()] = r;
1320
+ }), n;
1321
+ }
1322
+ export {
1323
+ ot as l
1324
+ };
src/backend/gradio_dropdownplus/templates/component/linear-LzsmWjnq.js ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { aK as j, aL as p, aM as w, aN as q, aO as k } from "./mermaid.core-DH6TRyjK.js";
2
+ import { i as D } from "./init-DjUOC4st.js";
3
+ import { e as M, f as F, a as z, b as B } from "./defaultLocale-D7EN2tov.js";
4
+ function g(n, r) {
5
+ return n == null || r == null ? NaN : n < r ? -1 : n > r ? 1 : n >= r ? 0 : NaN;
6
+ }
7
+ function I(n, r) {
8
+ return n == null || r == null ? NaN : r < n ? -1 : r > n ? 1 : r >= n ? 0 : NaN;
9
+ }
10
+ function R(n) {
11
+ let r, t, e;
12
+ n.length !== 2 ? (r = g, t = (o, c) => g(n(o), c), e = (o, c) => n(o) - c) : (r = n === g || n === I ? n : O, t = n, e = n);
13
+ function u(o, c, i = 0, h = o.length) {
14
+ if (i < h) {
15
+ if (r(c, c) !== 0) return h;
16
+ do {
17
+ const l = i + h >>> 1;
18
+ t(o[l], c) < 0 ? i = l + 1 : h = l;
19
+ } while (i < h);
20
+ }
21
+ return i;
22
+ }
23
+ function f(o, c, i = 0, h = o.length) {
24
+ if (i < h) {
25
+ if (r(c, c) !== 0) return h;
26
+ do {
27
+ const l = i + h >>> 1;
28
+ t(o[l], c) <= 0 ? i = l + 1 : h = l;
29
+ } while (i < h);
30
+ }
31
+ return i;
32
+ }
33
+ function a(o, c, i = 0, h = o.length) {
34
+ const l = u(o, c, i, h - 1);
35
+ return l > i && e(o[l - 1], c) > -e(o[l], c) ? l - 1 : l;
36
+ }
37
+ return { left: u, center: a, right: f };
38
+ }
39
+ function O() {
40
+ return 0;
41
+ }
42
+ function P(n) {
43
+ return n === null ? NaN : +n;
44
+ }
45
+ const V = R(g), $ = V.right;
46
+ R(P).center;
47
+ const x = Math.sqrt(50), K = Math.sqrt(10), L = Math.sqrt(2);
48
+ function v(n, r, t) {
49
+ const e = (r - n) / Math.max(0, t), u = Math.floor(Math.log10(e)), f = e / Math.pow(10, u), a = f >= x ? 10 : f >= K ? 5 : f >= L ? 2 : 1;
50
+ let o, c, i;
51
+ return u < 0 ? (i = Math.pow(10, -u) / a, o = Math.round(n * i), c = Math.round(r * i), o / i < n && ++o, c / i > r && --c, i = -i) : (i = Math.pow(10, u) * a, o = Math.round(n / i), c = Math.round(r / i), o * i < n && ++o, c * i > r && --c), c < o && 0.5 <= t && t < 2 ? v(n, r, t * 2) : [o, c, i];
52
+ }
53
+ function T(n, r, t) {
54
+ if (r = +r, n = +n, t = +t, !(t > 0)) return [];
55
+ if (n === r) return [n];
56
+ const e = r < n, [u, f, a] = e ? v(r, n, t) : v(n, r, t);
57
+ if (!(f >= u)) return [];
58
+ const o = f - u + 1, c = new Array(o);
59
+ if (e)
60
+ if (a < 0) for (let i = 0; i < o; ++i) c[i] = (f - i) / -a;
61
+ else for (let i = 0; i < o; ++i) c[i] = (f - i) * a;
62
+ else if (a < 0) for (let i = 0; i < o; ++i) c[i] = (u + i) / -a;
63
+ else for (let i = 0; i < o; ++i) c[i] = (u + i) * a;
64
+ return c;
65
+ }
66
+ function y(n, r, t) {
67
+ return r = +r, n = +n, t = +t, v(n, r, t)[2];
68
+ }
69
+ function C(n, r, t) {
70
+ r = +r, n = +n, t = +t;
71
+ const e = r < n, u = e ? y(r, n, t) : y(n, r, t);
72
+ return (e ? -1 : 1) * (u < 0 ? 1 / -u : u);
73
+ }
74
+ function E(n, r) {
75
+ r || (r = []);
76
+ var t = n ? Math.min(r.length, n.length) : 0, e = r.slice(), u;
77
+ return function(f) {
78
+ for (u = 0; u < t; ++u) e[u] = n[u] * (1 - f) + r[u] * f;
79
+ return e;
80
+ };
81
+ }
82
+ function G(n) {
83
+ return ArrayBuffer.isView(n) && !(n instanceof DataView);
84
+ }
85
+ function H(n, r) {
86
+ var t = r ? r.length : 0, e = n ? Math.min(t, n.length) : 0, u = new Array(e), f = new Array(t), a;
87
+ for (a = 0; a < e; ++a) u[a] = d(n[a], r[a]);
88
+ for (; a < t; ++a) f[a] = r[a];
89
+ return function(o) {
90
+ for (a = 0; a < e; ++a) f[a] = u[a](o);
91
+ return f;
92
+ };
93
+ }
94
+ function J(n, r) {
95
+ var t = /* @__PURE__ */ new Date();
96
+ return n = +n, r = +r, function(e) {
97
+ return t.setTime(n * (1 - e) + r * e), t;
98
+ };
99
+ }
100
+ function Q(n, r) {
101
+ var t = {}, e = {}, u;
102
+ (n === null || typeof n != "object") && (n = {}), (r === null || typeof r != "object") && (r = {});
103
+ for (u in r)
104
+ u in n ? t[u] = d(n[u], r[u]) : e[u] = r[u];
105
+ return function(f) {
106
+ for (u in t) e[u] = t[u](f);
107
+ return e;
108
+ };
109
+ }
110
+ function d(n, r) {
111
+ var t = typeof r, e;
112
+ return r == null || t === "boolean" ? j(r) : (t === "number" ? p : t === "string" ? (e = k(r)) ? (r = e, w) : q : r instanceof k ? w : r instanceof Date ? J : G(r) ? E : Array.isArray(r) ? H : typeof r.valueOf != "function" && typeof r.toString != "function" || isNaN(r) ? Q : p)(n, r);
113
+ }
114
+ function U(n, r) {
115
+ return n = +n, r = +r, function(t) {
116
+ return Math.round(n * (1 - t) + r * t);
117
+ };
118
+ }
119
+ function W(n) {
120
+ return Math.max(0, -M(Math.abs(n)));
121
+ }
122
+ function X(n, r) {
123
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(M(r) / 3))) * 3 - M(Math.abs(n)));
124
+ }
125
+ function Y(n, r) {
126
+ return n = Math.abs(n), r = Math.abs(r) - n, Math.max(0, M(r) - M(n)) + 1;
127
+ }
128
+ function Z(n) {
129
+ return function() {
130
+ return n;
131
+ };
132
+ }
133
+ function _(n) {
134
+ return +n;
135
+ }
136
+ var A = [0, 1];
137
+ function m(n) {
138
+ return n;
139
+ }
140
+ function N(n, r) {
141
+ return (r -= n = +n) ? function(t) {
142
+ return (t - n) / r;
143
+ } : Z(isNaN(r) ? NaN : 0.5);
144
+ }
145
+ function b(n, r) {
146
+ var t;
147
+ return n > r && (t = n, n = r, r = t), function(e) {
148
+ return Math.max(n, Math.min(r, e));
149
+ };
150
+ }
151
+ function nn(n, r, t) {
152
+ var e = n[0], u = n[1], f = r[0], a = r[1];
153
+ return u < e ? (e = N(u, e), f = t(a, f)) : (e = N(e, u), f = t(f, a)), function(o) {
154
+ return f(e(o));
155
+ };
156
+ }
157
+ function rn(n, r, t) {
158
+ var e = Math.min(n.length, r.length) - 1, u = new Array(e), f = new Array(e), a = -1;
159
+ for (n[e] < n[0] && (n = n.slice().reverse(), r = r.slice().reverse()); ++a < e; )
160
+ u[a] = N(n[a], n[a + 1]), f[a] = t(r[a], r[a + 1]);
161
+ return function(o) {
162
+ var c = $(n, o, 1, e) - 1;
163
+ return f[c](u[c](o));
164
+ };
165
+ }
166
+ function en(n, r) {
167
+ return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());
168
+ }
169
+ function tn() {
170
+ var n = A, r = A, t = d, e, u, f, a = m, o, c, i;
171
+ function h() {
172
+ var s = Math.min(n.length, r.length);
173
+ return a !== m && (a = b(n[0], n[s - 1])), o = s > 2 ? rn : nn, c = i = null, l;
174
+ }
175
+ function l(s) {
176
+ return s == null || isNaN(s = +s) ? f : (c || (c = o(n.map(e), r, t)))(e(a(s)));
177
+ }
178
+ return l.invert = function(s) {
179
+ return a(u((i || (i = o(r, n.map(e), p)))(s)));
180
+ }, l.domain = function(s) {
181
+ return arguments.length ? (n = Array.from(s, _), h()) : n.slice();
182
+ }, l.range = function(s) {
183
+ return arguments.length ? (r = Array.from(s), h()) : r.slice();
184
+ }, l.rangeRound = function(s) {
185
+ return r = Array.from(s), t = U, h();
186
+ }, l.clamp = function(s) {
187
+ return arguments.length ? (a = s ? !0 : m, h()) : a !== m;
188
+ }, l.interpolate = function(s) {
189
+ return arguments.length ? (t = s, h()) : t;
190
+ }, l.unknown = function(s) {
191
+ return arguments.length ? (f = s, l) : f;
192
+ }, function(s, S) {
193
+ return e = s, u = S, h();
194
+ };
195
+ }
196
+ function un() {
197
+ return tn()(m, m);
198
+ }
199
+ function an(n, r, t, e) {
200
+ var u = C(n, r, t), f;
201
+ switch (e = F(e ?? ",f"), e.type) {
202
+ case "s": {
203
+ var a = Math.max(Math.abs(n), Math.abs(r));
204
+ return e.precision == null && !isNaN(f = X(u, a)) && (e.precision = f), z(e, a);
205
+ }
206
+ case "":
207
+ case "e":
208
+ case "g":
209
+ case "p":
210
+ case "r": {
211
+ e.precision == null && !isNaN(f = Y(u, Math.max(Math.abs(n), Math.abs(r)))) && (e.precision = f - (e.type === "e"));
212
+ break;
213
+ }
214
+ case "f":
215
+ case "%": {
216
+ e.precision == null && !isNaN(f = W(u)) && (e.precision = f - (e.type === "%") * 2);
217
+ break;
218
+ }
219
+ }
220
+ return B(e);
221
+ }
222
+ function on(n) {
223
+ var r = n.domain;
224
+ return n.ticks = function(t) {
225
+ var e = r();
226
+ return T(e[0], e[e.length - 1], t ?? 10);
227
+ }, n.tickFormat = function(t, e) {
228
+ var u = r();
229
+ return an(u[0], u[u.length - 1], t ?? 10, e);
230
+ }, n.nice = function(t) {
231
+ t == null && (t = 10);
232
+ var e = r(), u = 0, f = e.length - 1, a = e[u], o = e[f], c, i, h = 10;
233
+ for (o < a && (i = a, a = o, o = i, i = u, u = f, f = i); h-- > 0; ) {
234
+ if (i = y(a, o, t), i === c)
235
+ return e[u] = a, e[f] = o, r(e);
236
+ if (i > 0)
237
+ a = Math.floor(a / i) * i, o = Math.ceil(o / i) * i;
238
+ else if (i < 0)
239
+ a = Math.ceil(a * i) / i, o = Math.floor(o * i) / i;
240
+ else
241
+ break;
242
+ c = i;
243
+ }
244
+ return n;
245
+ }, n;
246
+ }
247
+ function fn() {
248
+ var n = un();
249
+ return n.copy = function() {
250
+ return en(n, fn());
251
+ }, D.apply(n, arguments), on(n);
252
+ }
253
+ export {
254
+ en as a,
255
+ R as b,
256
+ un as c,
257
+ fn as l,
258
+ C as t
259
+ };
src/backend/gradio_dropdownplus/templates/component/mermaid.core-DH6TRyjK.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/mindmap-definition-LNHGMQRG-DQCoUb6O.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/pieDiagram-DBDJKBY4-C_SumqCS.js ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { p as j } from "./chunk-ANTBXLJU-BwgTSljF.js";
2
+ import { a4 as S, a7 as F, aG as q, _ as p, g as H, s as Z, a as J, b as K, q as Q, p as X, l as z, c as Y, D as ee, H as te, N as ae, e as re, y as ne, F as ie } from "./mermaid.core-DH6TRyjK.js";
3
+ import { p as se } from "./treemap-75Q7IDZK-o7HSbXc7.js";
4
+ import { d as I } from "./arc-Bt6Yqp6j.js";
5
+ import { o as le } from "./ordinal-DfAQgscy.js";
6
+ function oe(e, a) {
7
+ return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
8
+ }
9
+ function ce(e) {
10
+ return e;
11
+ }
12
+ function ue() {
13
+ var e = ce, a = oe, f = null, y = S(0), s = S(F), o = S(0);
14
+ function l(t) {
15
+ var n, c = (t = q(t)).length, g, x, m = 0, u = new Array(c), i = new Array(c), v = +y.apply(this, arguments), w = Math.min(F, Math.max(-F, s.apply(this, arguments) - v)), h, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), d;
16
+ for (n = 0; n < c; ++n)
17
+ (d = i[u[n] = n] = +e(t[n], n, t)) > 0 && (m += d);
18
+ for (a != null ? u.sort(function(A, D) {
19
+ return a(i[A], i[D]);
20
+ }) : f != null && u.sort(function(A, D) {
21
+ return f(t[A], t[D]);
22
+ }), n = 0, x = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
23
+ g = u[n], d = i[g], h = v + (d > 0 ? d * x : 0) + $, i[g] = {
24
+ data: t[g],
25
+ index: n,
26
+ value: d,
27
+ startAngle: v,
28
+ endAngle: h,
29
+ padAngle: C
30
+ };
31
+ return i;
32
+ }
33
+ return l.value = function(t) {
34
+ return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
35
+ }, l.sortValues = function(t) {
36
+ return arguments.length ? (a = t, f = null, l) : a;
37
+ }, l.sort = function(t) {
38
+ return arguments.length ? (f = t, a = null, l) : f;
39
+ }, l.startAngle = function(t) {
40
+ return arguments.length ? (y = typeof t == "function" ? t : S(+t), l) : y;
41
+ }, l.endAngle = function(t) {
42
+ return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
43
+ }, l.padAngle = function(t) {
44
+ return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
45
+ }, l;
46
+ }
47
+ var pe = ie.pie, G = {
48
+ sections: /* @__PURE__ */ new Map(),
49
+ showData: !1
50
+ }, T = G.sections, N = G.showData, ge = structuredClone(pe), de = /* @__PURE__ */ p(() => structuredClone(ge), "getConfig"), fe = /* @__PURE__ */ p(() => {
51
+ T = /* @__PURE__ */ new Map(), N = G.showData, ne();
52
+ }, "clear"), he = /* @__PURE__ */ p(({ label: e, value: a }) => {
53
+ if (a < 0)
54
+ throw new Error(
55
+ `"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
56
+ );
57
+ T.has(e) || (T.set(e, a), z.debug(`added new section: ${e}, with value: ${a}`));
58
+ }, "addSection"), me = /* @__PURE__ */ p(() => T, "getSections"), ve = /* @__PURE__ */ p((e) => {
59
+ N = e;
60
+ }, "setShowData"), Se = /* @__PURE__ */ p(() => N, "getShowData"), L = {
61
+ getConfig: de,
62
+ clear: fe,
63
+ setDiagramTitle: X,
64
+ getDiagramTitle: Q,
65
+ setAccTitle: K,
66
+ getAccTitle: J,
67
+ setAccDescription: Z,
68
+ getAccDescription: H,
69
+ addSection: he,
70
+ getSections: me,
71
+ setShowData: ve,
72
+ getShowData: Se
73
+ }, ye = /* @__PURE__ */ p((e, a) => {
74
+ j(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
75
+ }, "populateDb"), xe = {
76
+ parse: /* @__PURE__ */ p(async (e) => {
77
+ const a = await se("pie", e);
78
+ z.debug(a), ye(a, L);
79
+ }, "parse")
80
+ }, we = /* @__PURE__ */ p((e) => `
81
+ .pieCircle{
82
+ stroke: ${e.pieStrokeColor};
83
+ stroke-width : ${e.pieStrokeWidth};
84
+ opacity : ${e.pieOpacity};
85
+ }
86
+ .pieOuterCircle{
87
+ stroke: ${e.pieOuterStrokeColor};
88
+ stroke-width: ${e.pieOuterStrokeWidth};
89
+ fill: none;
90
+ }
91
+ .pieTitleText {
92
+ text-anchor: middle;
93
+ font-size: ${e.pieTitleTextSize};
94
+ fill: ${e.pieTitleTextColor};
95
+ font-family: ${e.fontFamily};
96
+ }
97
+ .slice {
98
+ font-family: ${e.fontFamily};
99
+ fill: ${e.pieSectionTextColor};
100
+ font-size:${e.pieSectionTextSize};
101
+ // fill: white;
102
+ }
103
+ .legend text {
104
+ fill: ${e.pieLegendTextColor};
105
+ font-family: ${e.fontFamily};
106
+ font-size: ${e.pieLegendTextSize};
107
+ }
108
+ `, "getStyles"), Ae = we, De = /* @__PURE__ */ p((e) => {
109
+ const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
110
+ return ue().value((s) => s.value)(f);
111
+ }, "createPieArcs"), Ce = /* @__PURE__ */ p((e, a, f, y) => {
112
+ z.debug(`rendering pie chart
113
+ ` + e);
114
+ const s = y.db, o = Y(), l = ee(s.getConfig(), o.pie), t = 40, n = 18, c = 4, g = 450, x = g, m = te(a), u = m.append("g");
115
+ u.attr("transform", "translate(" + x / 2 + "," + g / 2 + ")");
116
+ const { themeVariables: i } = o;
117
+ let [v] = ae(i.pieOuterStrokeWidth);
118
+ v ?? (v = 2);
119
+ const w = l.textPosition, h = Math.min(x, g) / 2 - t, C = I().innerRadius(0).outerRadius(h), $ = I().innerRadius(h * w).outerRadius(h * w);
120
+ u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
121
+ const d = s.getSections(), A = De(d), D = [
122
+ i.pie1,
123
+ i.pie2,
124
+ i.pie3,
125
+ i.pie4,
126
+ i.pie5,
127
+ i.pie6,
128
+ i.pie7,
129
+ i.pie8,
130
+ i.pie9,
131
+ i.pie10,
132
+ i.pie11,
133
+ i.pie12
134
+ ];
135
+ let b = 0;
136
+ d.forEach((r) => {
137
+ b += r;
138
+ });
139
+ const W = A.filter((r) => (r.data.value / b * 100).toFixed(0) !== "0"), E = le(D);
140
+ u.selectAll("mySlices").data(W).enter().append("path").attr("d", C).attr("fill", (r) => E(r.data.label)).attr("class", "pieCircle"), u.selectAll("mySlices").data(W).enter().append("text").text((r) => (r.data.value / b * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
141
+ const O = [...d.entries()].map(([r, M]) => ({
142
+ label: r,
143
+ value: M
144
+ })), k = u.selectAll(".legend").data(O).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
145
+ const R = n + c, B = R * O.length / 2, V = 12 * n, U = M * R - B;
146
+ return "translate(" + V + "," + U + ")";
147
+ });
148
+ k.append("rect").attr("width", n).attr("height", n).style("fill", (r) => E(r.label)).style("stroke", (r) => E(r.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
149
+ const _ = Math.max(
150
+ ...k.selectAll("text").nodes().map((r) => (r == null ? void 0 : r.getBoundingClientRect().width) ?? 0)
151
+ ), P = x + t + n + c + _;
152
+ m.attr("viewBox", `0 0 ${P} ${g}`), re(m, g, P, l.useMaxWidth);
153
+ }, "draw"), $e = { draw: Ce }, Fe = {
154
+ parser: xe,
155
+ db: L,
156
+ renderer: $e,
157
+ styles: Ae
158
+ };
159
+ export {
160
+ Fe as diagram
161
+ };
src/backend/gradio_dropdownplus/templates/component/quadrantDiagram-YPSRARAO-C6uWz8Aq.js ADDED
@@ -0,0 +1,1024 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as o, s as _e, g as Ae, q as ie, p as ke, a as Fe, b as Pe, c as wt, l as At, d as zt, e as ve, y as Ce, F as D, K as Le, i as Ee } from "./mermaid.core-DH6TRyjK.js";
2
+ import { l as ee } from "./linear-LzsmWjnq.js";
3
+ var Vt = function() {
4
+ var t = /* @__PURE__ */ o(function(j, r, l, g) {
5
+ for (l = l || {}, g = j.length; g--; l[j[g]] = r) ;
6
+ return l;
7
+ }, "o"), n = [1, 3], u = [1, 4], c = [1, 5], h = [1, 6], p = [1, 7], y = [1, 4, 5, 10, 12, 13, 14, 18, 25, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], S = [1, 4, 5, 10, 12, 13, 14, 18, 25, 28, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], a = [55, 56, 57], A = [2, 36], d = [1, 37], T = [1, 36], q = [1, 38], m = [1, 35], b = [1, 43], x = [1, 41], O = [1, 14], Y = [1, 23], G = [1, 18], yt = [1, 19], Tt = [1, 20], dt = [1, 21], Ft = [1, 22], ut = [1, 24], xt = [1, 25], ft = [1, 26], gt = [1, 27], i = [1, 28], Bt = [1, 29], W = [1, 32], U = [1, 33], k = [1, 34], F = [1, 39], P = [1, 40], v = [1, 42], C = [1, 44], H = [1, 62], X = [1, 61], L = [4, 5, 8, 10, 12, 13, 14, 18, 44, 47, 49, 55, 56, 57, 63, 64, 65, 66, 67], Rt = [1, 65], Nt = [1, 66], Wt = [1, 67], Ut = [1, 68], Qt = [1, 69], Ot = [1, 70], Ht = [1, 71], Xt = [1, 72], Mt = [1, 73], Yt = [1, 74], jt = [1, 75], Gt = [1, 76], I = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], J = [1, 90], $ = [1, 91], tt = [1, 92], et = [1, 99], it = [1, 93], at = [1, 96], nt = [1, 94], st = [1, 95], rt = [1, 97], ot = [1, 98], Pt = [1, 102], Kt = [10, 55, 56, 57], R = [4, 5, 6, 8, 10, 11, 13, 17, 18, 19, 20, 55, 56, 57], vt = {
8
+ trace: /* @__PURE__ */ o(function() {
9
+ }, "trace"),
10
+ yy: {},
11
+ symbols_: { error: 2, idStringToken: 3, ALPHA: 4, NUM: 5, NODE_STRING: 6, DOWN: 7, MINUS: 8, DEFAULT: 9, COMMA: 10, COLON: 11, AMP: 12, BRKT: 13, MULT: 14, UNICODE_TEXT: 15, styleComponent: 16, UNIT: 17, SPACE: 18, STYLE: 19, PCT: 20, idString: 21, style: 22, stylesOpt: 23, classDefStatement: 24, CLASSDEF: 25, start: 26, eol: 27, QUADRANT: 28, document: 29, line: 30, statement: 31, axisDetails: 32, quadrantDetails: 33, points: 34, title: 35, title_value: 36, acc_title: 37, acc_title_value: 38, acc_descr: 39, acc_descr_value: 40, acc_descr_multiline_value: 41, section: 42, text: 43, point_start: 44, point_x: 45, point_y: 46, class_name: 47, "X-AXIS": 48, "AXIS-TEXT-DELIMITER": 49, "Y-AXIS": 50, QUADRANT_1: 51, QUADRANT_2: 52, QUADRANT_3: 53, QUADRANT_4: 54, NEWLINE: 55, SEMI: 56, EOF: 57, alphaNumToken: 58, textNoTagsToken: 59, STR: 60, MD_STR: 61, alphaNum: 62, PUNCTUATION: 63, PLUS: 64, EQUALS: 65, DOT: 66, UNDERSCORE: 67, $accept: 0, $end: 1 },
12
+ terminals_: { 2: "error", 4: "ALPHA", 5: "NUM", 6: "NODE_STRING", 7: "DOWN", 8: "MINUS", 9: "DEFAULT", 10: "COMMA", 11: "COLON", 12: "AMP", 13: "BRKT", 14: "MULT", 15: "UNICODE_TEXT", 17: "UNIT", 18: "SPACE", 19: "STYLE", 20: "PCT", 25: "CLASSDEF", 28: "QUADRANT", 35: "title", 36: "title_value", 37: "acc_title", 38: "acc_title_value", 39: "acc_descr", 40: "acc_descr_value", 41: "acc_descr_multiline_value", 42: "section", 44: "point_start", 45: "point_x", 46: "point_y", 47: "class_name", 48: "X-AXIS", 49: "AXIS-TEXT-DELIMITER", 50: "Y-AXIS", 51: "QUADRANT_1", 52: "QUADRANT_2", 53: "QUADRANT_3", 54: "QUADRANT_4", 55: "NEWLINE", 56: "SEMI", 57: "EOF", 60: "STR", 61: "MD_STR", 63: "PUNCTUATION", 64: "PLUS", 65: "EQUALS", 66: "DOT", 67: "UNDERSCORE" },
13
+ productions_: [0, [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [21, 1], [21, 2], [22, 1], [22, 2], [23, 1], [23, 3], [24, 5], [26, 2], [26, 2], [26, 2], [29, 0], [29, 2], [30, 2], [31, 0], [31, 1], [31, 2], [31, 1], [31, 1], [31, 1], [31, 2], [31, 2], [31, 2], [31, 1], [31, 1], [34, 4], [34, 5], [34, 5], [34, 6], [32, 4], [32, 3], [32, 2], [32, 4], [32, 3], [32, 2], [33, 2], [33, 2], [33, 2], [33, 2], [27, 1], [27, 1], [27, 1], [43, 1], [43, 2], [43, 1], [43, 1], [62, 1], [62, 2], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [59, 1], [59, 1], [59, 1]],
14
+ performAction: /* @__PURE__ */ o(function(r, l, g, f, _, e, pt) {
15
+ var s = e.length - 1;
16
+ switch (_) {
17
+ case 23:
18
+ this.$ = e[s];
19
+ break;
20
+ case 24:
21
+ this.$ = e[s - 1] + "" + e[s];
22
+ break;
23
+ case 26:
24
+ this.$ = e[s - 1] + e[s];
25
+ break;
26
+ case 27:
27
+ this.$ = [e[s].trim()];
28
+ break;
29
+ case 28:
30
+ e[s - 2].push(e[s].trim()), this.$ = e[s - 2];
31
+ break;
32
+ case 29:
33
+ this.$ = e[s - 4], f.addClass(e[s - 2], e[s]);
34
+ break;
35
+ case 37:
36
+ this.$ = [];
37
+ break;
38
+ case 42:
39
+ this.$ = e[s].trim(), f.setDiagramTitle(this.$);
40
+ break;
41
+ case 43:
42
+ this.$ = e[s].trim(), f.setAccTitle(this.$);
43
+ break;
44
+ case 44:
45
+ case 45:
46
+ this.$ = e[s].trim(), f.setAccDescription(this.$);
47
+ break;
48
+ case 46:
49
+ f.addSection(e[s].substr(8)), this.$ = e[s].substr(8);
50
+ break;
51
+ case 47:
52
+ f.addPoint(e[s - 3], "", e[s - 1], e[s], []);
53
+ break;
54
+ case 48:
55
+ f.addPoint(e[s - 4], e[s - 3], e[s - 1], e[s], []);
56
+ break;
57
+ case 49:
58
+ f.addPoint(e[s - 4], "", e[s - 2], e[s - 1], e[s]);
59
+ break;
60
+ case 50:
61
+ f.addPoint(e[s - 5], e[s - 4], e[s - 2], e[s - 1], e[s]);
62
+ break;
63
+ case 51:
64
+ f.setXAxisLeftText(e[s - 2]), f.setXAxisRightText(e[s]);
65
+ break;
66
+ case 52:
67
+ e[s - 1].text += " ⟶ ", f.setXAxisLeftText(e[s - 1]);
68
+ break;
69
+ case 53:
70
+ f.setXAxisLeftText(e[s]);
71
+ break;
72
+ case 54:
73
+ f.setYAxisBottomText(e[s - 2]), f.setYAxisTopText(e[s]);
74
+ break;
75
+ case 55:
76
+ e[s - 1].text += " ⟶ ", f.setYAxisBottomText(e[s - 1]);
77
+ break;
78
+ case 56:
79
+ f.setYAxisBottomText(e[s]);
80
+ break;
81
+ case 57:
82
+ f.setQuadrant1Text(e[s]);
83
+ break;
84
+ case 58:
85
+ f.setQuadrant2Text(e[s]);
86
+ break;
87
+ case 59:
88
+ f.setQuadrant3Text(e[s]);
89
+ break;
90
+ case 60:
91
+ f.setQuadrant4Text(e[s]);
92
+ break;
93
+ case 64:
94
+ this.$ = { text: e[s], type: "text" };
95
+ break;
96
+ case 65:
97
+ this.$ = { text: e[s - 1].text + "" + e[s], type: e[s - 1].type };
98
+ break;
99
+ case 66:
100
+ this.$ = { text: e[s], type: "text" };
101
+ break;
102
+ case 67:
103
+ this.$ = { text: e[s], type: "markdown" };
104
+ break;
105
+ case 68:
106
+ this.$ = e[s];
107
+ break;
108
+ case 69:
109
+ this.$ = e[s - 1] + "" + e[s];
110
+ break;
111
+ }
112
+ }, "anonymous"),
113
+ table: [{ 18: n, 26: 1, 27: 2, 28: u, 55: c, 56: h, 57: p }, { 1: [3] }, { 18: n, 26: 8, 27: 2, 28: u, 55: c, 56: h, 57: p }, { 18: n, 26: 9, 27: 2, 28: u, 55: c, 56: h, 57: p }, t(y, [2, 33], { 29: 10 }), t(S, [2, 61]), t(S, [2, 62]), t(S, [2, 63]), { 1: [2, 30] }, { 1: [2, 31] }, t(a, A, { 30: 11, 31: 12, 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 1: [2, 32], 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 18: O, 25: Y, 35: G, 37: yt, 39: Tt, 41: dt, 42: Ft, 48: ut, 50: xt, 51: ft, 52: gt, 53: i, 54: Bt, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(y, [2, 34]), { 27: 45, 55: c, 56: h, 57: p }, t(a, [2, 37]), t(a, A, { 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 31: 46, 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 18: O, 25: Y, 35: G, 37: yt, 39: Tt, 41: dt, 42: Ft, 48: ut, 50: xt, 51: ft, 52: gt, 53: i, 54: Bt, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 39]), t(a, [2, 40]), t(a, [2, 41]), { 36: [1, 47] }, { 38: [1, 48] }, { 40: [1, 49] }, t(a, [2, 45]), t(a, [2, 46]), { 18: [1, 50] }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 51, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 52, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 53, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 54, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 55, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 43: 56, 58: 31, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }, { 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 44: [1, 57], 47: [1, 58], 58: 60, 59: 59, 63: k, 64: F, 65: P, 66: v, 67: C }, t(L, [2, 64]), t(L, [2, 66]), t(L, [2, 67]), t(L, [2, 70]), t(L, [2, 71]), t(L, [2, 72]), t(L, [2, 73]), t(L, [2, 74]), t(L, [2, 75]), t(L, [2, 76]), t(L, [2, 77]), t(L, [2, 78]), t(L, [2, 79]), t(L, [2, 80]), t(y, [2, 35]), t(a, [2, 38]), t(a, [2, 42]), t(a, [2, 43]), t(a, [2, 44]), { 3: 64, 4: Rt, 5: Nt, 6: Wt, 7: Ut, 8: Qt, 9: Ot, 10: Ht, 11: Xt, 12: Mt, 13: Yt, 14: jt, 15: Gt, 21: 63 }, t(a, [2, 53], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 49: [1, 77], 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 56], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 49: [1, 78], 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 57], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 58], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 59], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 60], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), { 45: [1, 79] }, { 44: [1, 80] }, t(L, [2, 65]), t(L, [2, 81]), t(L, [2, 82]), t(L, [2, 83]), { 3: 82, 4: Rt, 5: Nt, 6: Wt, 7: Ut, 8: Qt, 9: Ot, 10: Ht, 11: Xt, 12: Mt, 13: Yt, 14: jt, 15: Gt, 18: [1, 81] }, t(I, [2, 23]), t(I, [2, 1]), t(I, [2, 2]), t(I, [2, 3]), t(I, [2, 4]), t(I, [2, 5]), t(I, [2, 6]), t(I, [2, 7]), t(I, [2, 8]), t(I, [2, 9]), t(I, [2, 10]), t(I, [2, 11]), t(I, [2, 12]), t(a, [2, 52], { 58: 31, 43: 83, 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 55], { 58: 31, 43: 84, 4: d, 5: T, 10: q, 12: m, 13: b, 14: x, 60: W, 61: U, 63: k, 64: F, 65: P, 66: v, 67: C }), { 46: [1, 85] }, { 45: [1, 86] }, { 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 16: 89, 17: nt, 18: st, 19: rt, 20: ot, 22: 88, 23: 87 }, t(I, [2, 24]), t(a, [2, 51], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 54], { 59: 59, 58: 60, 4: d, 5: T, 8: H, 10: q, 12: m, 13: b, 14: x, 18: X, 63: k, 64: F, 65: P, 66: v, 67: C }), t(a, [2, 47], { 22: 88, 16: 89, 23: 100, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot }), { 46: [1, 101] }, t(a, [2, 29], { 10: Pt }), t(Kt, [2, 27], { 16: 103, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot }), t(R, [2, 25]), t(R, [2, 13]), t(R, [2, 14]), t(R, [2, 15]), t(R, [2, 16]), t(R, [2, 17]), t(R, [2, 18]), t(R, [2, 19]), t(R, [2, 20]), t(R, [2, 21]), t(R, [2, 22]), t(a, [2, 49], { 10: Pt }), t(a, [2, 48], { 22: 88, 16: 89, 23: 104, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot }), { 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 16: 89, 17: nt, 18: st, 19: rt, 20: ot, 22: 105 }, t(R, [2, 26]), t(a, [2, 50], { 10: Pt }), t(Kt, [2, 28], { 16: 103, 4: J, 5: $, 6: tt, 8: et, 11: it, 13: at, 17: nt, 18: st, 19: rt, 20: ot })],
114
+ defaultActions: { 8: [2, 30], 9: [2, 31] },
115
+ parseError: /* @__PURE__ */ o(function(r, l) {
116
+ if (l.recoverable)
117
+ this.trace(r);
118
+ else {
119
+ var g = new Error(r);
120
+ throw g.hash = l, g;
121
+ }
122
+ }, "parseError"),
123
+ parse: /* @__PURE__ */ o(function(r) {
124
+ var l = this, g = [0], f = [], _ = [null], e = [], pt = this.table, s = "", mt = 0, Zt = 0, qe = 2, Jt = 1, me = e.slice.call(arguments, 1), E = Object.create(this.lexer), K = { yy: {} };
125
+ for (var Ct in this.yy)
126
+ Object.prototype.hasOwnProperty.call(this.yy, Ct) && (K.yy[Ct] = this.yy[Ct]);
127
+ E.setInput(r, K.yy), K.yy.lexer = E, K.yy.parser = this, typeof E.yylloc > "u" && (E.yylloc = {});
128
+ var Lt = E.yylloc;
129
+ e.push(Lt);
130
+ var be = E.options && E.options.ranges;
131
+ typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
132
+ function Se(B) {
133
+ g.length = g.length - 2 * B, _.length = _.length - B, e.length = e.length - B;
134
+ }
135
+ o(Se, "popStack");
136
+ function $t() {
137
+ var B;
138
+ return B = f.pop() || E.lex() || Jt, typeof B != "number" && (B instanceof Array && (f = B, B = f.pop()), B = l.symbols_[B] || B), B;
139
+ }
140
+ o($t, "lex");
141
+ for (var w, Z, N, Et, lt = {}, bt, M, te, St; ; ) {
142
+ if (Z = g[g.length - 1], this.defaultActions[Z] ? N = this.defaultActions[Z] : ((w === null || typeof w > "u") && (w = $t()), N = pt[Z] && pt[Z][w]), typeof N > "u" || !N.length || !N[0]) {
143
+ var Dt = "";
144
+ St = [];
145
+ for (bt in pt[Z])
146
+ this.terminals_[bt] && bt > qe && St.push("'" + this.terminals_[bt] + "'");
147
+ E.showPosition ? Dt = "Parse error on line " + (mt + 1) + `:
148
+ ` + E.showPosition() + `
149
+ Expecting ` + St.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Dt = "Parse error on line " + (mt + 1) + ": Unexpected " + (w == Jt ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Dt, {
150
+ text: E.match,
151
+ token: this.terminals_[w] || w,
152
+ line: E.yylineno,
153
+ loc: Lt,
154
+ expected: St
155
+ });
156
+ }
157
+ if (N[0] instanceof Array && N.length > 1)
158
+ throw new Error("Parse Error: multiple actions possible at state: " + Z + ", token: " + w);
159
+ switch (N[0]) {
160
+ case 1:
161
+ g.push(w), _.push(E.yytext), e.push(E.yylloc), g.push(N[1]), w = null, Zt = E.yyleng, s = E.yytext, mt = E.yylineno, Lt = E.yylloc;
162
+ break;
163
+ case 2:
164
+ if (M = this.productions_[N[1]][1], lt.$ = _[_.length - M], lt._$ = {
165
+ first_line: e[e.length - (M || 1)].first_line,
166
+ last_line: e[e.length - 1].last_line,
167
+ first_column: e[e.length - (M || 1)].first_column,
168
+ last_column: e[e.length - 1].last_column
169
+ }, be && (lt._$.range = [
170
+ e[e.length - (M || 1)].range[0],
171
+ e[e.length - 1].range[1]
172
+ ]), Et = this.performAction.apply(lt, [
173
+ s,
174
+ Zt,
175
+ mt,
176
+ K.yy,
177
+ N[1],
178
+ _,
179
+ e
180
+ ].concat(me)), typeof Et < "u")
181
+ return Et;
182
+ M && (g = g.slice(0, -1 * M * 2), _ = _.slice(0, -1 * M), e = e.slice(0, -1 * M)), g.push(this.productions_[N[1]][0]), _.push(lt.$), e.push(lt._$), te = pt[g[g.length - 2]][g[g.length - 1]], g.push(te);
183
+ break;
184
+ case 3:
185
+ return !0;
186
+ }
187
+ }
188
+ return !0;
189
+ }, "parse")
190
+ }, Te = /* @__PURE__ */ function() {
191
+ var j = {
192
+ EOF: 1,
193
+ parseError: /* @__PURE__ */ o(function(l, g) {
194
+ if (this.yy.parser)
195
+ this.yy.parser.parseError(l, g);
196
+ else
197
+ throw new Error(l);
198
+ }, "parseError"),
199
+ // resets the lexer, sets new input
200
+ setInput: /* @__PURE__ */ o(function(r, l) {
201
+ return this.yy = l || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
202
+ first_line: 1,
203
+ first_column: 0,
204
+ last_line: 1,
205
+ last_column: 0
206
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
207
+ }, "setInput"),
208
+ // consumes and returns one char from the input
209
+ input: /* @__PURE__ */ o(function() {
210
+ var r = this._input[0];
211
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
212
+ var l = r.match(/(?:\r\n?|\n).*/g);
213
+ return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
214
+ }, "input"),
215
+ // unshifts one char (or a string) into the input
216
+ unput: /* @__PURE__ */ o(function(r) {
217
+ var l = r.length, g = r.split(/(?:\r\n?|\n)/g);
218
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
219
+ var f = this.match.split(/(?:\r\n?|\n)/g);
220
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), g.length - 1 && (this.yylineno -= g.length - 1);
221
+ var _ = this.yylloc.range;
222
+ return this.yylloc = {
223
+ first_line: this.yylloc.first_line,
224
+ last_line: this.yylineno + 1,
225
+ first_column: this.yylloc.first_column,
226
+ last_column: g ? (g.length === f.length ? this.yylloc.first_column : 0) + f[f.length - g.length].length - g[0].length : this.yylloc.first_column - l
227
+ }, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
228
+ }, "unput"),
229
+ // When called from action, caches matched text and appends it on next action
230
+ more: /* @__PURE__ */ o(function() {
231
+ return this._more = !0, this;
232
+ }, "more"),
233
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
234
+ reject: /* @__PURE__ */ o(function() {
235
+ if (this.options.backtrack_lexer)
236
+ this._backtrack = !0;
237
+ else
238
+ return 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).
239
+ ` + this.showPosition(), {
240
+ text: "",
241
+ token: null,
242
+ line: this.yylineno
243
+ });
244
+ return this;
245
+ }, "reject"),
246
+ // retain first n characters of the match
247
+ less: /* @__PURE__ */ o(function(r) {
248
+ this.unput(this.match.slice(r));
249
+ }, "less"),
250
+ // displays already matched input, i.e. for error messages
251
+ pastInput: /* @__PURE__ */ o(function() {
252
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
253
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
254
+ }, "pastInput"),
255
+ // displays upcoming input, i.e. for error messages
256
+ upcomingInput: /* @__PURE__ */ o(function() {
257
+ var r = this.match;
258
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
259
+ }, "upcomingInput"),
260
+ // displays the character position where the lexing error occurred, i.e. for error messages
261
+ showPosition: /* @__PURE__ */ o(function() {
262
+ var r = this.pastInput(), l = new Array(r.length + 1).join("-");
263
+ return r + this.upcomingInput() + `
264
+ ` + l + "^";
265
+ }, "showPosition"),
266
+ // test the lexed token: return FALSE when not a match, otherwise return token
267
+ test_match: /* @__PURE__ */ o(function(r, l) {
268
+ var g, f, _;
269
+ if (this.options.backtrack_lexer && (_ = {
270
+ yylineno: this.yylineno,
271
+ yylloc: {
272
+ first_line: this.yylloc.first_line,
273
+ last_line: this.last_line,
274
+ first_column: this.yylloc.first_column,
275
+ last_column: this.yylloc.last_column
276
+ },
277
+ yytext: this.yytext,
278
+ match: this.match,
279
+ matches: this.matches,
280
+ matched: this.matched,
281
+ yyleng: this.yyleng,
282
+ offset: this.offset,
283
+ _more: this._more,
284
+ _input: this._input,
285
+ yy: this.yy,
286
+ conditionStack: this.conditionStack.slice(0),
287
+ done: this.done
288
+ }, this.options.ranges && (_.yylloc.range = this.yylloc.range.slice(0))), f = r[0].match(/(?:\r\n?|\n).*/g), f && (this.yylineno += f.length), this.yylloc = {
289
+ first_line: this.yylloc.last_line,
290
+ last_line: this.yylineno + 1,
291
+ first_column: this.yylloc.last_column,
292
+ last_column: f ? f[f.length - 1].length - f[f.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
293
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], g = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), g)
294
+ return g;
295
+ if (this._backtrack) {
296
+ for (var e in _)
297
+ this[e] = _[e];
298
+ return !1;
299
+ }
300
+ return !1;
301
+ }, "test_match"),
302
+ // return next match in input
303
+ next: /* @__PURE__ */ o(function() {
304
+ if (this.done)
305
+ return this.EOF;
306
+ this._input || (this.done = !0);
307
+ var r, l, g, f;
308
+ this._more || (this.yytext = "", this.match = "");
309
+ for (var _ = this._currentRules(), e = 0; e < _.length; e++)
310
+ if (g = this._input.match(this.rules[_[e]]), g && (!l || g[0].length > l[0].length)) {
311
+ if (l = g, f = e, this.options.backtrack_lexer) {
312
+ if (r = this.test_match(g, _[e]), r !== !1)
313
+ return r;
314
+ if (this._backtrack) {
315
+ l = !1;
316
+ continue;
317
+ } else
318
+ return !1;
319
+ } else if (!this.options.flex)
320
+ break;
321
+ }
322
+ return l ? (r = this.test_match(l, _[f]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
323
+ ` + this.showPosition(), {
324
+ text: "",
325
+ token: null,
326
+ line: this.yylineno
327
+ });
328
+ }, "next"),
329
+ // return next match that has a token
330
+ lex: /* @__PURE__ */ o(function() {
331
+ var l = this.next();
332
+ return l || this.lex();
333
+ }, "lex"),
334
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
335
+ begin: /* @__PURE__ */ o(function(l) {
336
+ this.conditionStack.push(l);
337
+ }, "begin"),
338
+ // pop the previously active lexer condition state off the condition stack
339
+ popState: /* @__PURE__ */ o(function() {
340
+ var l = this.conditionStack.length - 1;
341
+ return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
342
+ }, "popState"),
343
+ // produce the lexer rule set which is active for the currently active lexer condition state
344
+ _currentRules: /* @__PURE__ */ o(function() {
345
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
346
+ }, "_currentRules"),
347
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
348
+ topState: /* @__PURE__ */ o(function(l) {
349
+ return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
350
+ }, "topState"),
351
+ // alias for begin(condition)
352
+ pushState: /* @__PURE__ */ o(function(l) {
353
+ this.begin(l);
354
+ }, "pushState"),
355
+ // return the number of states currently on the stack
356
+ stateStackSize: /* @__PURE__ */ o(function() {
357
+ return this.conditionStack.length;
358
+ }, "stateStackSize"),
359
+ options: { "case-insensitive": !0 },
360
+ performAction: /* @__PURE__ */ o(function(l, g, f, _) {
361
+ switch (f) {
362
+ case 0:
363
+ break;
364
+ case 1:
365
+ break;
366
+ case 2:
367
+ return 55;
368
+ case 3:
369
+ break;
370
+ case 4:
371
+ return this.begin("title"), 35;
372
+ case 5:
373
+ return this.popState(), "title_value";
374
+ case 6:
375
+ return this.begin("acc_title"), 37;
376
+ case 7:
377
+ return this.popState(), "acc_title_value";
378
+ case 8:
379
+ return this.begin("acc_descr"), 39;
380
+ case 9:
381
+ return this.popState(), "acc_descr_value";
382
+ case 10:
383
+ this.begin("acc_descr_multiline");
384
+ break;
385
+ case 11:
386
+ this.popState();
387
+ break;
388
+ case 12:
389
+ return "acc_descr_multiline_value";
390
+ case 13:
391
+ return 48;
392
+ case 14:
393
+ return 50;
394
+ case 15:
395
+ return 49;
396
+ case 16:
397
+ return 51;
398
+ case 17:
399
+ return 52;
400
+ case 18:
401
+ return 53;
402
+ case 19:
403
+ return 54;
404
+ case 20:
405
+ return 25;
406
+ case 21:
407
+ this.begin("md_string");
408
+ break;
409
+ case 22:
410
+ return "MD_STR";
411
+ case 23:
412
+ this.popState();
413
+ break;
414
+ case 24:
415
+ this.begin("string");
416
+ break;
417
+ case 25:
418
+ this.popState();
419
+ break;
420
+ case 26:
421
+ return "STR";
422
+ case 27:
423
+ this.begin("class_name");
424
+ break;
425
+ case 28:
426
+ return this.popState(), 47;
427
+ case 29:
428
+ return this.begin("point_start"), 44;
429
+ case 30:
430
+ return this.begin("point_x"), 45;
431
+ case 31:
432
+ this.popState();
433
+ break;
434
+ case 32:
435
+ this.popState(), this.begin("point_y");
436
+ break;
437
+ case 33:
438
+ return this.popState(), 46;
439
+ case 34:
440
+ return 28;
441
+ case 35:
442
+ return 4;
443
+ case 36:
444
+ return 11;
445
+ case 37:
446
+ return 64;
447
+ case 38:
448
+ return 10;
449
+ case 39:
450
+ return 65;
451
+ case 40:
452
+ return 65;
453
+ case 41:
454
+ return 14;
455
+ case 42:
456
+ return 13;
457
+ case 43:
458
+ return 67;
459
+ case 44:
460
+ return 66;
461
+ case 45:
462
+ return 12;
463
+ case 46:
464
+ return 8;
465
+ case 47:
466
+ return 5;
467
+ case 48:
468
+ return 18;
469
+ case 49:
470
+ return 56;
471
+ case 50:
472
+ return 63;
473
+ case 51:
474
+ return 57;
475
+ }
476
+ }, "anonymous"),
477
+ rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:classDef\b)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?::::)/i, /^(?:^\w+)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
478
+ conditions: { class_name: { rules: [28], inclusive: !1 }, point_y: { rules: [33], inclusive: !1 }, point_x: { rules: [32], inclusive: !1 }, point_start: { rules: [30, 31], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, title: { rules: [5], inclusive: !1 }, md_string: { rules: [22, 23], inclusive: !1 }, string: { rules: [25, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 27, 29, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], inclusive: !0 } }
479
+ };
480
+ return j;
481
+ }();
482
+ vt.lexer = Te;
483
+ function qt() {
484
+ this.yy = {};
485
+ }
486
+ return o(qt, "Parser"), qt.prototype = vt, vt.Parser = qt, new qt();
487
+ }();
488
+ Vt.parser = Vt;
489
+ var De = Vt, V = Le(), ht, ze = (ht = class {
490
+ constructor() {
491
+ this.classes = /* @__PURE__ */ new Map(), this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
492
+ }
493
+ getDefaultData() {
494
+ return {
495
+ titleText: "",
496
+ quadrant1Text: "",
497
+ quadrant2Text: "",
498
+ quadrant3Text: "",
499
+ quadrant4Text: "",
500
+ xAxisLeftText: "",
501
+ xAxisRightText: "",
502
+ yAxisBottomText: "",
503
+ yAxisTopText: "",
504
+ points: []
505
+ };
506
+ }
507
+ getDefaultConfig() {
508
+ var n, u, c, h, p, y, S, a, A, d, T, q, m, b, x, O, Y, G;
509
+ return {
510
+ showXAxis: !0,
511
+ showYAxis: !0,
512
+ showTitle: !0,
513
+ chartHeight: ((n = D.quadrantChart) == null ? void 0 : n.chartWidth) || 500,
514
+ chartWidth: ((u = D.quadrantChart) == null ? void 0 : u.chartHeight) || 500,
515
+ titlePadding: ((c = D.quadrantChart) == null ? void 0 : c.titlePadding) || 10,
516
+ titleFontSize: ((h = D.quadrantChart) == null ? void 0 : h.titleFontSize) || 20,
517
+ quadrantPadding: ((p = D.quadrantChart) == null ? void 0 : p.quadrantPadding) || 5,
518
+ xAxisLabelPadding: ((y = D.quadrantChart) == null ? void 0 : y.xAxisLabelPadding) || 5,
519
+ yAxisLabelPadding: ((S = D.quadrantChart) == null ? void 0 : S.yAxisLabelPadding) || 5,
520
+ xAxisLabelFontSize: ((a = D.quadrantChart) == null ? void 0 : a.xAxisLabelFontSize) || 16,
521
+ yAxisLabelFontSize: ((A = D.quadrantChart) == null ? void 0 : A.yAxisLabelFontSize) || 16,
522
+ quadrantLabelFontSize: ((d = D.quadrantChart) == null ? void 0 : d.quadrantLabelFontSize) || 16,
523
+ quadrantTextTopPadding: ((T = D.quadrantChart) == null ? void 0 : T.quadrantTextTopPadding) || 5,
524
+ pointTextPadding: ((q = D.quadrantChart) == null ? void 0 : q.pointTextPadding) || 5,
525
+ pointLabelFontSize: ((m = D.quadrantChart) == null ? void 0 : m.pointLabelFontSize) || 12,
526
+ pointRadius: ((b = D.quadrantChart) == null ? void 0 : b.pointRadius) || 5,
527
+ xAxisPosition: ((x = D.quadrantChart) == null ? void 0 : x.xAxisPosition) || "top",
528
+ yAxisPosition: ((O = D.quadrantChart) == null ? void 0 : O.yAxisPosition) || "left",
529
+ quadrantInternalBorderStrokeWidth: ((Y = D.quadrantChart) == null ? void 0 : Y.quadrantInternalBorderStrokeWidth) || 1,
530
+ quadrantExternalBorderStrokeWidth: ((G = D.quadrantChart) == null ? void 0 : G.quadrantExternalBorderStrokeWidth) || 2
531
+ };
532
+ }
533
+ getDefaultThemeConfig() {
534
+ return {
535
+ quadrant1Fill: V.quadrant1Fill,
536
+ quadrant2Fill: V.quadrant2Fill,
537
+ quadrant3Fill: V.quadrant3Fill,
538
+ quadrant4Fill: V.quadrant4Fill,
539
+ quadrant1TextFill: V.quadrant1TextFill,
540
+ quadrant2TextFill: V.quadrant2TextFill,
541
+ quadrant3TextFill: V.quadrant3TextFill,
542
+ quadrant4TextFill: V.quadrant4TextFill,
543
+ quadrantPointFill: V.quadrantPointFill,
544
+ quadrantPointTextFill: V.quadrantPointTextFill,
545
+ quadrantXAxisTextFill: V.quadrantXAxisTextFill,
546
+ quadrantYAxisTextFill: V.quadrantYAxisTextFill,
547
+ quadrantTitleFill: V.quadrantTitleFill,
548
+ quadrantInternalBorderStrokeFill: V.quadrantInternalBorderStrokeFill,
549
+ quadrantExternalBorderStrokeFill: V.quadrantExternalBorderStrokeFill
550
+ };
551
+ }
552
+ clear() {
553
+ this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), this.classes = /* @__PURE__ */ new Map(), At.info("clear called");
554
+ }
555
+ setData(n) {
556
+ this.data = { ...this.data, ...n };
557
+ }
558
+ addPoints(n) {
559
+ this.data.points = [...n, ...this.data.points];
560
+ }
561
+ addClass(n, u) {
562
+ this.classes.set(n, u);
563
+ }
564
+ setConfig(n) {
565
+ At.trace("setConfig called with: ", n), this.config = { ...this.config, ...n };
566
+ }
567
+ setThemeConfig(n) {
568
+ At.trace("setThemeConfig called with: ", n), this.themeConfig = { ...this.themeConfig, ...n };
569
+ }
570
+ calculateSpace(n, u, c, h) {
571
+ const p = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, y = {
572
+ top: n === "top" && u ? p : 0,
573
+ bottom: n === "bottom" && u ? p : 0
574
+ }, S = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, a = {
575
+ left: this.config.yAxisPosition === "left" && c ? S : 0,
576
+ right: this.config.yAxisPosition === "right" && c ? S : 0
577
+ }, A = this.config.titleFontSize + this.config.titlePadding * 2, d = {
578
+ top: h ? A : 0
579
+ }, T = this.config.quadrantPadding + a.left, q = this.config.quadrantPadding + y.top + d.top, m = this.config.chartWidth - this.config.quadrantPadding * 2 - a.left - a.right, b = this.config.chartHeight - this.config.quadrantPadding * 2 - y.top - y.bottom - d.top, x = m / 2, O = b / 2;
580
+ return {
581
+ xAxisSpace: y,
582
+ yAxisSpace: a,
583
+ titleSpace: d,
584
+ quadrantSpace: {
585
+ quadrantLeft: T,
586
+ quadrantTop: q,
587
+ quadrantWidth: m,
588
+ quadrantHalfWidth: x,
589
+ quadrantHeight: b,
590
+ quadrantHalfHeight: O
591
+ }
592
+ };
593
+ }
594
+ getAxisLabels(n, u, c, h) {
595
+ const { quadrantSpace: p, titleSpace: y } = h, {
596
+ quadrantHalfHeight: S,
597
+ quadrantHeight: a,
598
+ quadrantLeft: A,
599
+ quadrantHalfWidth: d,
600
+ quadrantTop: T,
601
+ quadrantWidth: q
602
+ } = p, m = !!this.data.xAxisRightText, b = !!this.data.yAxisTopText, x = [];
603
+ return this.data.xAxisLeftText && u && x.push({
604
+ text: this.data.xAxisLeftText,
605
+ fill: this.themeConfig.quadrantXAxisTextFill,
606
+ x: A + (m ? d / 2 : 0),
607
+ y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
608
+ fontSize: this.config.xAxisLabelFontSize,
609
+ verticalPos: m ? "center" : "left",
610
+ horizontalPos: "top",
611
+ rotation: 0
612
+ }), this.data.xAxisRightText && u && x.push({
613
+ text: this.data.xAxisRightText,
614
+ fill: this.themeConfig.quadrantXAxisTextFill,
615
+ x: A + d + (m ? d / 2 : 0),
616
+ y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
617
+ fontSize: this.config.xAxisLabelFontSize,
618
+ verticalPos: m ? "center" : "left",
619
+ horizontalPos: "top",
620
+ rotation: 0
621
+ }), this.data.yAxisBottomText && c && x.push({
622
+ text: this.data.yAxisBottomText,
623
+ fill: this.themeConfig.quadrantYAxisTextFill,
624
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + A + q + this.config.quadrantPadding,
625
+ y: T + a - (b ? S / 2 : 0),
626
+ fontSize: this.config.yAxisLabelFontSize,
627
+ verticalPos: b ? "center" : "left",
628
+ horizontalPos: "top",
629
+ rotation: -90
630
+ }), this.data.yAxisTopText && c && x.push({
631
+ text: this.data.yAxisTopText,
632
+ fill: this.themeConfig.quadrantYAxisTextFill,
633
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + A + q + this.config.quadrantPadding,
634
+ y: T + S - (b ? S / 2 : 0),
635
+ fontSize: this.config.yAxisLabelFontSize,
636
+ verticalPos: b ? "center" : "left",
637
+ horizontalPos: "top",
638
+ rotation: -90
639
+ }), x;
640
+ }
641
+ getQuadrants(n) {
642
+ const { quadrantSpace: u } = n, { quadrantHalfHeight: c, quadrantLeft: h, quadrantHalfWidth: p, quadrantTop: y } = u, S = [
643
+ {
644
+ text: {
645
+ text: this.data.quadrant1Text,
646
+ fill: this.themeConfig.quadrant1TextFill,
647
+ x: 0,
648
+ y: 0,
649
+ fontSize: this.config.quadrantLabelFontSize,
650
+ verticalPos: "center",
651
+ horizontalPos: "middle",
652
+ rotation: 0
653
+ },
654
+ x: h + p,
655
+ y,
656
+ width: p,
657
+ height: c,
658
+ fill: this.themeConfig.quadrant1Fill
659
+ },
660
+ {
661
+ text: {
662
+ text: this.data.quadrant2Text,
663
+ fill: this.themeConfig.quadrant2TextFill,
664
+ x: 0,
665
+ y: 0,
666
+ fontSize: this.config.quadrantLabelFontSize,
667
+ verticalPos: "center",
668
+ horizontalPos: "middle",
669
+ rotation: 0
670
+ },
671
+ x: h,
672
+ y,
673
+ width: p,
674
+ height: c,
675
+ fill: this.themeConfig.quadrant2Fill
676
+ },
677
+ {
678
+ text: {
679
+ text: this.data.quadrant3Text,
680
+ fill: this.themeConfig.quadrant3TextFill,
681
+ x: 0,
682
+ y: 0,
683
+ fontSize: this.config.quadrantLabelFontSize,
684
+ verticalPos: "center",
685
+ horizontalPos: "middle",
686
+ rotation: 0
687
+ },
688
+ x: h,
689
+ y: y + c,
690
+ width: p,
691
+ height: c,
692
+ fill: this.themeConfig.quadrant3Fill
693
+ },
694
+ {
695
+ text: {
696
+ text: this.data.quadrant4Text,
697
+ fill: this.themeConfig.quadrant4TextFill,
698
+ x: 0,
699
+ y: 0,
700
+ fontSize: this.config.quadrantLabelFontSize,
701
+ verticalPos: "center",
702
+ horizontalPos: "middle",
703
+ rotation: 0
704
+ },
705
+ x: h + p,
706
+ y: y + c,
707
+ width: p,
708
+ height: c,
709
+ fill: this.themeConfig.quadrant4Fill
710
+ }
711
+ ];
712
+ for (const a of S)
713
+ a.text.x = a.x + a.width / 2, this.data.points.length === 0 ? (a.text.y = a.y + a.height / 2, a.text.horizontalPos = "middle") : (a.text.y = a.y + this.config.quadrantTextTopPadding, a.text.horizontalPos = "top");
714
+ return S;
715
+ }
716
+ getQuadrantPoints(n) {
717
+ const { quadrantSpace: u } = n, { quadrantHeight: c, quadrantLeft: h, quadrantTop: p, quadrantWidth: y } = u, S = ee().domain([0, 1]).range([h, y + h]), a = ee().domain([0, 1]).range([c + p, p]);
718
+ return this.data.points.map((d) => {
719
+ const T = this.classes.get(d.className);
720
+ return T && (d = { ...T, ...d }), {
721
+ x: S(d.x),
722
+ y: a(d.y),
723
+ fill: d.color ?? this.themeConfig.quadrantPointFill,
724
+ radius: d.radius ?? this.config.pointRadius,
725
+ text: {
726
+ text: d.text,
727
+ fill: this.themeConfig.quadrantPointTextFill,
728
+ x: S(d.x),
729
+ y: a(d.y) + this.config.pointTextPadding,
730
+ verticalPos: "center",
731
+ horizontalPos: "top",
732
+ fontSize: this.config.pointLabelFontSize,
733
+ rotation: 0
734
+ },
735
+ strokeColor: d.strokeColor ?? this.themeConfig.quadrantPointFill,
736
+ strokeWidth: d.strokeWidth ?? "0px"
737
+ };
738
+ });
739
+ }
740
+ getBorders(n) {
741
+ const u = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: c } = n, {
742
+ quadrantHalfHeight: h,
743
+ quadrantHeight: p,
744
+ quadrantLeft: y,
745
+ quadrantHalfWidth: S,
746
+ quadrantTop: a,
747
+ quadrantWidth: A
748
+ } = c;
749
+ return [
750
+ // top border
751
+ {
752
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
753
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
754
+ x1: y - u,
755
+ y1: a,
756
+ x2: y + A + u,
757
+ y2: a
758
+ },
759
+ // right border
760
+ {
761
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
762
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
763
+ x1: y + A,
764
+ y1: a + u,
765
+ x2: y + A,
766
+ y2: a + p - u
767
+ },
768
+ // bottom border
769
+ {
770
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
771
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
772
+ x1: y - u,
773
+ y1: a + p,
774
+ x2: y + A + u,
775
+ y2: a + p
776
+ },
777
+ // left border
778
+ {
779
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
780
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
781
+ x1: y,
782
+ y1: a + u,
783
+ x2: y,
784
+ y2: a + p - u
785
+ },
786
+ // vertical inner border
787
+ {
788
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
789
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
790
+ x1: y + S,
791
+ y1: a + u,
792
+ x2: y + S,
793
+ y2: a + p - u
794
+ },
795
+ // horizontal inner border
796
+ {
797
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
798
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
799
+ x1: y + u,
800
+ y1: a + h,
801
+ x2: y + A - u,
802
+ y2: a + h
803
+ }
804
+ ];
805
+ }
806
+ getTitle(n) {
807
+ if (n)
808
+ return {
809
+ text: this.data.titleText,
810
+ fill: this.themeConfig.quadrantTitleFill,
811
+ fontSize: this.config.titleFontSize,
812
+ horizontalPos: "top",
813
+ verticalPos: "center",
814
+ rotation: 0,
815
+ y: this.config.titlePadding,
816
+ x: this.config.chartWidth / 2
817
+ };
818
+ }
819
+ build() {
820
+ const n = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), u = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), c = this.config.showTitle && !!this.data.titleText, h = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, p = this.calculateSpace(h, n, u, c);
821
+ return {
822
+ points: this.getQuadrantPoints(p),
823
+ quadrants: this.getQuadrants(p),
824
+ axisLabels: this.getAxisLabels(h, n, u, p),
825
+ borderLines: this.getBorders(p),
826
+ title: this.getTitle(c)
827
+ };
828
+ }
829
+ }, o(ht, "QuadrantBuilder"), ht), ct, _t = (ct = class extends Error {
830
+ constructor(n, u, c) {
831
+ super(`value for ${n} ${u} is invalid, please use a valid ${c}`), this.name = "InvalidStyleError";
832
+ }
833
+ }, o(ct, "InvalidStyleError"), ct);
834
+ function It(t) {
835
+ return !/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t);
836
+ }
837
+ o(It, "validateHexCode");
838
+ function ae(t) {
839
+ return !/^\d+$/.test(t);
840
+ }
841
+ o(ae, "validateNumber");
842
+ function ne(t) {
843
+ return !/^\d+px$/.test(t);
844
+ }
845
+ o(ne, "validateSizeInPixels");
846
+ var Ve = wt();
847
+ function Q(t) {
848
+ return Ee(t.trim(), Ve);
849
+ }
850
+ o(Q, "textSanitizer");
851
+ var z = new ze();
852
+ function se(t) {
853
+ z.setData({ quadrant1Text: Q(t.text) });
854
+ }
855
+ o(se, "setQuadrant1Text");
856
+ function re(t) {
857
+ z.setData({ quadrant2Text: Q(t.text) });
858
+ }
859
+ o(re, "setQuadrant2Text");
860
+ function oe(t) {
861
+ z.setData({ quadrant3Text: Q(t.text) });
862
+ }
863
+ o(oe, "setQuadrant3Text");
864
+ function le(t) {
865
+ z.setData({ quadrant4Text: Q(t.text) });
866
+ }
867
+ o(le, "setQuadrant4Text");
868
+ function he(t) {
869
+ z.setData({ xAxisLeftText: Q(t.text) });
870
+ }
871
+ o(he, "setXAxisLeftText");
872
+ function ce(t) {
873
+ z.setData({ xAxisRightText: Q(t.text) });
874
+ }
875
+ o(ce, "setXAxisRightText");
876
+ function de(t) {
877
+ z.setData({ yAxisTopText: Q(t.text) });
878
+ }
879
+ o(de, "setYAxisTopText");
880
+ function ue(t) {
881
+ z.setData({ yAxisBottomText: Q(t.text) });
882
+ }
883
+ o(ue, "setYAxisBottomText");
884
+ function kt(t) {
885
+ const n = {};
886
+ for (const u of t) {
887
+ const [c, h] = u.trim().split(/\s*:\s*/);
888
+ if (c === "radius") {
889
+ if (ae(h))
890
+ throw new _t(c, h, "number");
891
+ n.radius = parseInt(h);
892
+ } else if (c === "color") {
893
+ if (It(h))
894
+ throw new _t(c, h, "hex code");
895
+ n.color = h;
896
+ } else if (c === "stroke-color") {
897
+ if (It(h))
898
+ throw new _t(c, h, "hex code");
899
+ n.strokeColor = h;
900
+ } else if (c === "stroke-width") {
901
+ if (ne(h))
902
+ throw new _t(c, h, "number of pixels (eg. 10px)");
903
+ n.strokeWidth = h;
904
+ } else
905
+ throw new Error(`style named ${c} is not supported.`);
906
+ }
907
+ return n;
908
+ }
909
+ o(kt, "parseStyles");
910
+ function xe(t, n, u, c, h) {
911
+ const p = kt(h);
912
+ z.addPoints([
913
+ {
914
+ x: u,
915
+ y: c,
916
+ text: Q(t.text),
917
+ className: n,
918
+ ...p
919
+ }
920
+ ]);
921
+ }
922
+ o(xe, "addPoint");
923
+ function fe(t, n) {
924
+ z.addClass(t, kt(n));
925
+ }
926
+ o(fe, "addClass");
927
+ function ge(t) {
928
+ z.setConfig({ chartWidth: t });
929
+ }
930
+ o(ge, "setWidth");
931
+ function pe(t) {
932
+ z.setConfig({ chartHeight: t });
933
+ }
934
+ o(pe, "setHeight");
935
+ function ye() {
936
+ const t = wt(), { themeVariables: n, quadrantChart: u } = t;
937
+ return u && z.setConfig(u), z.setThemeConfig({
938
+ quadrant1Fill: n.quadrant1Fill,
939
+ quadrant2Fill: n.quadrant2Fill,
940
+ quadrant3Fill: n.quadrant3Fill,
941
+ quadrant4Fill: n.quadrant4Fill,
942
+ quadrant1TextFill: n.quadrant1TextFill,
943
+ quadrant2TextFill: n.quadrant2TextFill,
944
+ quadrant3TextFill: n.quadrant3TextFill,
945
+ quadrant4TextFill: n.quadrant4TextFill,
946
+ quadrantPointFill: n.quadrantPointFill,
947
+ quadrantPointTextFill: n.quadrantPointTextFill,
948
+ quadrantXAxisTextFill: n.quadrantXAxisTextFill,
949
+ quadrantYAxisTextFill: n.quadrantYAxisTextFill,
950
+ quadrantExternalBorderStrokeFill: n.quadrantExternalBorderStrokeFill,
951
+ quadrantInternalBorderStrokeFill: n.quadrantInternalBorderStrokeFill,
952
+ quadrantTitleFill: n.quadrantTitleFill
953
+ }), z.setData({ titleText: ie() }), z.build();
954
+ }
955
+ o(ye, "getQuadrantData");
956
+ var Ie = /* @__PURE__ */ o(function() {
957
+ z.clear(), Ce();
958
+ }, "clear"), we = {
959
+ setWidth: ge,
960
+ setHeight: pe,
961
+ setQuadrant1Text: se,
962
+ setQuadrant2Text: re,
963
+ setQuadrant3Text: oe,
964
+ setQuadrant4Text: le,
965
+ setXAxisLeftText: he,
966
+ setXAxisRightText: ce,
967
+ setYAxisTopText: de,
968
+ setYAxisBottomText: ue,
969
+ parseStyles: kt,
970
+ addPoint: xe,
971
+ addClass: fe,
972
+ getQuadrantData: ye,
973
+ clear: Ie,
974
+ setAccTitle: Pe,
975
+ getAccTitle: Fe,
976
+ setDiagramTitle: ke,
977
+ getDiagramTitle: ie,
978
+ getAccDescription: Ae,
979
+ setAccDescription: _e
980
+ }, Be = /* @__PURE__ */ o((t, n, u, c) => {
981
+ var xt, ft, gt;
982
+ function h(i) {
983
+ return i === "top" ? "hanging" : "middle";
984
+ }
985
+ o(h, "getDominantBaseLine");
986
+ function p(i) {
987
+ return i === "left" ? "start" : "middle";
988
+ }
989
+ o(p, "getTextAnchor");
990
+ function y(i) {
991
+ return `translate(${i.x}, ${i.y}) rotate(${i.rotation || 0})`;
992
+ }
993
+ o(y, "getTransformation");
994
+ const S = wt();
995
+ At.debug(`Rendering quadrant chart
996
+ ` + t);
997
+ const a = S.securityLevel;
998
+ let A;
999
+ a === "sandbox" && (A = zt("#i" + n));
1000
+ const T = (a === "sandbox" ? zt(A.nodes()[0].contentDocument.body) : zt("body")).select(`[id="${n}"]`), q = T.append("g").attr("class", "main"), m = ((xt = S.quadrantChart) == null ? void 0 : xt.chartWidth) ?? 500, b = ((ft = S.quadrantChart) == null ? void 0 : ft.chartHeight) ?? 500;
1001
+ ve(T, b, m, ((gt = S.quadrantChart) == null ? void 0 : gt.useMaxWidth) ?? !0), T.attr("viewBox", "0 0 " + m + " " + b), c.db.setHeight(b), c.db.setWidth(m);
1002
+ const x = c.db.getQuadrantData(), O = q.append("g").attr("class", "quadrants"), Y = q.append("g").attr("class", "border"), G = q.append("g").attr("class", "data-points"), yt = q.append("g").attr("class", "labels"), Tt = q.append("g").attr("class", "title");
1003
+ x.title && Tt.append("text").attr("x", 0).attr("y", 0).attr("fill", x.title.fill).attr("font-size", x.title.fontSize).attr("dominant-baseline", h(x.title.horizontalPos)).attr("text-anchor", p(x.title.verticalPos)).attr("transform", y(x.title)).text(x.title.text), x.borderLines && Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1", (i) => i.x1).attr("y1", (i) => i.y1).attr("x2", (i) => i.x2).attr("y2", (i) => i.y2).style("stroke", (i) => i.strokeFill).style("stroke-width", (i) => i.strokeWidth);
1004
+ const dt = O.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class", "quadrant");
1005
+ dt.append("rect").attr("x", (i) => i.x).attr("y", (i) => i.y).attr("width", (i) => i.width).attr("height", (i) => i.height).attr("fill", (i) => i.fill), dt.append("text").attr("x", 0).attr("y", 0).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1006
+ "dominant-baseline",
1007
+ (i) => h(i.text.horizontalPos)
1008
+ ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text)).text((i) => i.text.text), yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((i) => i.text).attr("fill", (i) => i.fill).attr("font-size", (i) => i.fontSize).attr("dominant-baseline", (i) => h(i.horizontalPos)).attr("text-anchor", (i) => p(i.verticalPos)).attr("transform", (i) => y(i));
1009
+ const ut = G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class", "data-point");
1010
+ ut.append("circle").attr("cx", (i) => i.x).attr("cy", (i) => i.y).attr("r", (i) => i.radius).attr("fill", (i) => i.fill).attr("stroke", (i) => i.strokeColor).attr("stroke-width", (i) => i.strokeWidth), ut.append("text").attr("x", 0).attr("y", 0).text((i) => i.text.text).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1011
+ "dominant-baseline",
1012
+ (i) => h(i.text.horizontalPos)
1013
+ ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text));
1014
+ }, "draw"), Re = {
1015
+ draw: Be
1016
+ }, Ue = {
1017
+ parser: De,
1018
+ db: we,
1019
+ renderer: Re,
1020
+ styles: /* @__PURE__ */ o(() => "", "styles")
1021
+ };
1022
+ export {
1023
+ Ue as diagram
1024
+ };
src/backend/gradio_dropdownplus/templates/component/requirementDiagram-EGVEC5DT-KqYC7Myr.js ADDED
@@ -0,0 +1,852 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { g as Ge } from "./chunk-WVR4S24B-Br22bM8P.js";
2
+ import { s as ze } from "./chunk-NRVI72HA-CQ3LV39f.js";
3
+ import { _ as f, b as Xe, a as Je, s as Ze, g as et, p as tt, q as st, c as Ne, l as qe, y as it, B as rt, o as nt, r as at, u as lt } from "./mermaid.core-DH6TRyjK.js";
4
+ var Ae = function() {
5
+ var e = /* @__PURE__ */ f(function(P, i, r, l) {
6
+ for (r = r || {}, l = P.length; l--; r[P[l]] = i) ;
7
+ return r;
8
+ }, "o"), a = [1, 3], u = [1, 4], o = [1, 5], m = [1, 6], c = [5, 6, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 77, 89, 90], p = [1, 22], R = [2, 7], h = [1, 26], E = [1, 27], I = [1, 28], k = [1, 29], A = [1, 33], C = [1, 34], V = [1, 35], v = [1, 36], x = [1, 37], L = [1, 38], D = [1, 24], O = [1, 31], w = [1, 32], M = [1, 30], g = [1, 39], _ = [1, 40], y = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 77, 89, 90], $ = [1, 61], X = [89, 90], Ce = [5, 8, 9, 11, 13, 21, 22, 23, 24, 27, 29, 41, 42, 43, 44, 45, 46, 54, 61, 63, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], de = [27, 29], Ve = [1, 70], ve = [1, 71], xe = [1, 72], Le = [1, 73], De = [1, 74], Oe = [1, 75], we = [1, 76], ee = [1, 83], U = [1, 80], te = [1, 84], se = [1, 85], ie = [1, 86], re = [1, 87], ne = [1, 88], ae = [1, 89], le = [1, 90], ce = [1, 91], oe = [1, 92], pe = [5, 8, 9, 11, 13, 21, 22, 23, 24, 27, 41, 42, 43, 44, 45, 46, 54, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], Y = [63, 64], Me = [1, 101], Fe = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 76, 77, 89, 90], N = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], B = [1, 110], Q = [1, 106], H = [1, 107], K = [1, 108], W = [1, 109], j = [1, 111], he = [1, 116], ue = [1, 117], fe = [1, 114], me = [1, 115], Se = {
9
+ trace: /* @__PURE__ */ f(function() {
10
+ }, "trace"),
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, directive: 4, NEWLINE: 5, RD: 6, diagram: 7, EOF: 8, acc_title: 9, acc_title_value: 10, acc_descr: 11, acc_descr_value: 12, acc_descr_multiline_value: 13, requirementDef: 14, elementDef: 15, relationshipDef: 16, direction: 17, styleStatement: 18, classDefStatement: 19, classStatement: 20, direction_tb: 21, direction_bt: 22, direction_rl: 23, direction_lr: 24, requirementType: 25, requirementName: 26, STRUCT_START: 27, requirementBody: 28, STYLE_SEPARATOR: 29, idList: 30, ID: 31, COLONSEP: 32, id: 33, TEXT: 34, text: 35, RISK: 36, riskLevel: 37, VERIFYMTHD: 38, verifyType: 39, STRUCT_STOP: 40, REQUIREMENT: 41, FUNCTIONAL_REQUIREMENT: 42, INTERFACE_REQUIREMENT: 43, PERFORMANCE_REQUIREMENT: 44, PHYSICAL_REQUIREMENT: 45, DESIGN_CONSTRAINT: 46, LOW_RISK: 47, MED_RISK: 48, HIGH_RISK: 49, VERIFY_ANALYSIS: 50, VERIFY_DEMONSTRATION: 51, VERIFY_INSPECTION: 52, VERIFY_TEST: 53, ELEMENT: 54, elementName: 55, elementBody: 56, TYPE: 57, type: 58, DOCREF: 59, ref: 60, END_ARROW_L: 61, relationship: 62, LINE: 63, END_ARROW_R: 64, CONTAINS: 65, COPIES: 66, DERIVES: 67, SATISFIES: 68, VERIFIES: 69, REFINES: 70, TRACES: 71, CLASSDEF: 72, stylesOpt: 73, CLASS: 74, ALPHA: 75, COMMA: 76, STYLE: 77, style: 78, styleComponent: 79, NUM: 80, COLON: 81, UNIT: 82, SPACE: 83, BRKT: 84, PCT: 85, MINUS: 86, LABEL: 87, SEMICOLON: 88, unqString: 89, qString: 90, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 21: "direction_tb", 22: "direction_bt", 23: "direction_rl", 24: "direction_lr", 27: "STRUCT_START", 29: "STYLE_SEPARATOR", 31: "ID", 32: "COLONSEP", 34: "TEXT", 36: "RISK", 38: "VERIFYMTHD", 40: "STRUCT_STOP", 41: "REQUIREMENT", 42: "FUNCTIONAL_REQUIREMENT", 43: "INTERFACE_REQUIREMENT", 44: "PERFORMANCE_REQUIREMENT", 45: "PHYSICAL_REQUIREMENT", 46: "DESIGN_CONSTRAINT", 47: "LOW_RISK", 48: "MED_RISK", 49: "HIGH_RISK", 50: "VERIFY_ANALYSIS", 51: "VERIFY_DEMONSTRATION", 52: "VERIFY_INSPECTION", 53: "VERIFY_TEST", 54: "ELEMENT", 57: "TYPE", 59: "DOCREF", 61: "END_ARROW_L", 63: "LINE", 64: "END_ARROW_R", 65: "CONTAINS", 66: "COPIES", 67: "DERIVES", 68: "SATISFIES", 69: "VERIFIES", 70: "REFINES", 71: "TRACES", 72: "CLASSDEF", 74: "CLASS", 75: "ALPHA", 76: "COMMA", 77: "STYLE", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 86: "MINUS", 87: "LABEL", 88: "SEMICOLON", 89: "unqString", 90: "qString" },
14
+ productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [17, 1], [17, 1], [17, 1], [17, 1], [14, 5], [14, 7], [28, 5], [28, 5], [28, 5], [28, 5], [28, 2], [28, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [37, 1], [37, 1], [37, 1], [39, 1], [39, 1], [39, 1], [39, 1], [15, 5], [15, 7], [56, 5], [56, 5], [56, 2], [56, 1], [16, 5], [16, 5], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [19, 3], [20, 3], [20, 3], [30, 1], [30, 3], [30, 1], [30, 3], [18, 3], [73, 1], [73, 3], [78, 1], [78, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [26, 1], [26, 1], [33, 1], [33, 1], [35, 1], [35, 1], [55, 1], [55, 1], [58, 1], [58, 1], [60, 1], [60, 1]],
15
+ performAction: /* @__PURE__ */ f(function(i, r, l, s, d, t, Ee) {
16
+ var n = t.length - 1;
17
+ switch (d) {
18
+ case 4:
19
+ this.$ = t[n].trim(), s.setAccTitle(this.$);
20
+ break;
21
+ case 5:
22
+ case 6:
23
+ this.$ = t[n].trim(), s.setAccDescription(this.$);
24
+ break;
25
+ case 7:
26
+ this.$ = [];
27
+ break;
28
+ case 17:
29
+ s.setDirection("TB");
30
+ break;
31
+ case 18:
32
+ s.setDirection("BT");
33
+ break;
34
+ case 19:
35
+ s.setDirection("RL");
36
+ break;
37
+ case 20:
38
+ s.setDirection("LR");
39
+ break;
40
+ case 21:
41
+ s.addRequirement(t[n - 3], t[n - 4]);
42
+ break;
43
+ case 22:
44
+ s.addRequirement(t[n - 5], t[n - 6]), s.setClass([t[n - 5]], t[n - 3]);
45
+ break;
46
+ case 23:
47
+ s.setNewReqId(t[n - 2]);
48
+ break;
49
+ case 24:
50
+ s.setNewReqText(t[n - 2]);
51
+ break;
52
+ case 25:
53
+ s.setNewReqRisk(t[n - 2]);
54
+ break;
55
+ case 26:
56
+ s.setNewReqVerifyMethod(t[n - 2]);
57
+ break;
58
+ case 29:
59
+ this.$ = s.RequirementType.REQUIREMENT;
60
+ break;
61
+ case 30:
62
+ this.$ = s.RequirementType.FUNCTIONAL_REQUIREMENT;
63
+ break;
64
+ case 31:
65
+ this.$ = s.RequirementType.INTERFACE_REQUIREMENT;
66
+ break;
67
+ case 32:
68
+ this.$ = s.RequirementType.PERFORMANCE_REQUIREMENT;
69
+ break;
70
+ case 33:
71
+ this.$ = s.RequirementType.PHYSICAL_REQUIREMENT;
72
+ break;
73
+ case 34:
74
+ this.$ = s.RequirementType.DESIGN_CONSTRAINT;
75
+ break;
76
+ case 35:
77
+ this.$ = s.RiskLevel.LOW_RISK;
78
+ break;
79
+ case 36:
80
+ this.$ = s.RiskLevel.MED_RISK;
81
+ break;
82
+ case 37:
83
+ this.$ = s.RiskLevel.HIGH_RISK;
84
+ break;
85
+ case 38:
86
+ this.$ = s.VerifyType.VERIFY_ANALYSIS;
87
+ break;
88
+ case 39:
89
+ this.$ = s.VerifyType.VERIFY_DEMONSTRATION;
90
+ break;
91
+ case 40:
92
+ this.$ = s.VerifyType.VERIFY_INSPECTION;
93
+ break;
94
+ case 41:
95
+ this.$ = s.VerifyType.VERIFY_TEST;
96
+ break;
97
+ case 42:
98
+ s.addElement(t[n - 3]);
99
+ break;
100
+ case 43:
101
+ s.addElement(t[n - 5]), s.setClass([t[n - 5]], t[n - 3]);
102
+ break;
103
+ case 44:
104
+ s.setNewElementType(t[n - 2]);
105
+ break;
106
+ case 45:
107
+ s.setNewElementDocRef(t[n - 2]);
108
+ break;
109
+ case 48:
110
+ s.addRelationship(t[n - 2], t[n], t[n - 4]);
111
+ break;
112
+ case 49:
113
+ s.addRelationship(t[n - 2], t[n - 4], t[n]);
114
+ break;
115
+ case 50:
116
+ this.$ = s.Relationships.CONTAINS;
117
+ break;
118
+ case 51:
119
+ this.$ = s.Relationships.COPIES;
120
+ break;
121
+ case 52:
122
+ this.$ = s.Relationships.DERIVES;
123
+ break;
124
+ case 53:
125
+ this.$ = s.Relationships.SATISFIES;
126
+ break;
127
+ case 54:
128
+ this.$ = s.Relationships.VERIFIES;
129
+ break;
130
+ case 55:
131
+ this.$ = s.Relationships.REFINES;
132
+ break;
133
+ case 56:
134
+ this.$ = s.Relationships.TRACES;
135
+ break;
136
+ case 57:
137
+ this.$ = t[n - 2], s.defineClass(t[n - 1], t[n]);
138
+ break;
139
+ case 58:
140
+ s.setClass(t[n - 1], t[n]);
141
+ break;
142
+ case 59:
143
+ s.setClass([t[n - 2]], t[n]);
144
+ break;
145
+ case 60:
146
+ case 62:
147
+ this.$ = [t[n]];
148
+ break;
149
+ case 61:
150
+ case 63:
151
+ this.$ = t[n - 2].concat([t[n]]);
152
+ break;
153
+ case 64:
154
+ this.$ = t[n - 2], s.setCssStyle(t[n - 1], t[n]);
155
+ break;
156
+ case 65:
157
+ this.$ = [t[n]];
158
+ break;
159
+ case 66:
160
+ t[n - 2].push(t[n]), this.$ = t[n - 2];
161
+ break;
162
+ case 68:
163
+ this.$ = t[n - 1] + t[n];
164
+ break;
165
+ }
166
+ }, "anonymous"),
167
+ table: [{ 3: 1, 4: 2, 6: a, 9: u, 11: o, 13: m }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: a, 9: u, 11: o, 13: m }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, e(c, [2, 6]), { 3: 12, 4: 2, 6: a, 9: u, 11: o, 13: m }, { 1: [2, 2] }, { 4: 17, 5: p, 7: 13, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, e(c, [2, 4]), e(c, [2, 5]), { 1: [2, 1] }, { 8: [1, 41] }, { 4: 17, 5: p, 7: 42, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 43, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 44, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 45, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 46, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 47, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 48, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 49, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 4: 17, 5: p, 7: 50, 8: R, 9: u, 11: o, 13: m, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: h, 22: E, 23: I, 24: k, 25: 23, 33: 25, 41: A, 42: C, 43: V, 44: v, 45: x, 46: L, 54: D, 72: O, 74: w, 77: M, 89: g, 90: _ }, { 26: 51, 89: [1, 52], 90: [1, 53] }, { 55: 54, 89: [1, 55], 90: [1, 56] }, { 29: [1, 59], 61: [1, 57], 63: [1, 58] }, e(y, [2, 17]), e(y, [2, 18]), e(y, [2, 19]), e(y, [2, 20]), { 30: 60, 33: 62, 75: $, 89: g, 90: _ }, { 30: 63, 33: 62, 75: $, 89: g, 90: _ }, { 30: 64, 33: 62, 75: $, 89: g, 90: _ }, e(X, [2, 29]), e(X, [2, 30]), e(X, [2, 31]), e(X, [2, 32]), e(X, [2, 33]), e(X, [2, 34]), e(Ce, [2, 81]), e(Ce, [2, 82]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 8: [2, 13] }, { 8: [2, 14] }, { 8: [2, 15] }, { 8: [2, 16] }, { 27: [1, 65], 29: [1, 66] }, e(de, [2, 79]), e(de, [2, 80]), { 27: [1, 67], 29: [1, 68] }, e(de, [2, 85]), e(de, [2, 86]), { 62: 69, 65: Ve, 66: ve, 67: xe, 68: Le, 69: De, 70: Oe, 71: we }, { 62: 77, 65: Ve, 66: ve, 67: xe, 68: Le, 69: De, 70: Oe, 71: we }, { 30: 78, 33: 62, 75: $, 89: g, 90: _ }, { 73: 79, 75: ee, 76: U, 78: 81, 79: 82, 80: te, 81: se, 82: ie, 83: re, 84: ne, 85: ae, 86: le, 87: ce, 88: oe }, e(pe, [2, 60]), e(pe, [2, 62]), { 73: 93, 75: ee, 76: U, 78: 81, 79: 82, 80: te, 81: se, 82: ie, 83: re, 84: ne, 85: ae, 86: le, 87: ce, 88: oe }, { 30: 94, 33: 62, 75: $, 76: U, 89: g, 90: _ }, { 5: [1, 95] }, { 30: 96, 33: 62, 75: $, 89: g, 90: _ }, { 5: [1, 97] }, { 30: 98, 33: 62, 75: $, 89: g, 90: _ }, { 63: [1, 99] }, e(Y, [2, 50]), e(Y, [2, 51]), e(Y, [2, 52]), e(Y, [2, 53]), e(Y, [2, 54]), e(Y, [2, 55]), e(Y, [2, 56]), { 64: [1, 100] }, e(y, [2, 59], { 76: U }), e(y, [2, 64], { 76: Me }), { 33: 103, 75: [1, 102], 89: g, 90: _ }, e(Fe, [2, 65], { 79: 104, 75: ee, 80: te, 81: se, 82: ie, 83: re, 84: ne, 85: ae, 86: le, 87: ce, 88: oe }), e(N, [2, 67]), e(N, [2, 69]), e(N, [2, 70]), e(N, [2, 71]), e(N, [2, 72]), e(N, [2, 73]), e(N, [2, 74]), e(N, [2, 75]), e(N, [2, 76]), e(N, [2, 77]), e(N, [2, 78]), e(y, [2, 57], { 76: Me }), e(y, [2, 58], { 76: U }), { 5: B, 28: 105, 31: Q, 34: H, 36: K, 38: W, 40: j }, { 27: [1, 112], 76: U }, { 5: he, 40: ue, 56: 113, 57: fe, 59: me }, { 27: [1, 118], 76: U }, { 33: 119, 89: g, 90: _ }, { 33: 120, 89: g, 90: _ }, { 75: ee, 78: 121, 79: 82, 80: te, 81: se, 82: ie, 83: re, 84: ne, 85: ae, 86: le, 87: ce, 88: oe }, e(pe, [2, 61]), e(pe, [2, 63]), e(N, [2, 68]), e(y, [2, 21]), { 32: [1, 122] }, { 32: [1, 123] }, { 32: [1, 124] }, { 32: [1, 125] }, { 5: B, 28: 126, 31: Q, 34: H, 36: K, 38: W, 40: j }, e(y, [2, 28]), { 5: [1, 127] }, e(y, [2, 42]), { 32: [1, 128] }, { 32: [1, 129] }, { 5: he, 40: ue, 56: 130, 57: fe, 59: me }, e(y, [2, 47]), { 5: [1, 131] }, e(y, [2, 48]), e(y, [2, 49]), e(Fe, [2, 66], { 79: 104, 75: ee, 80: te, 81: se, 82: ie, 83: re, 84: ne, 85: ae, 86: le, 87: ce, 88: oe }), { 33: 132, 89: g, 90: _ }, { 35: 133, 89: [1, 134], 90: [1, 135] }, { 37: 136, 47: [1, 137], 48: [1, 138], 49: [1, 139] }, { 39: 140, 50: [1, 141], 51: [1, 142], 52: [1, 143], 53: [1, 144] }, e(y, [2, 27]), { 5: B, 28: 145, 31: Q, 34: H, 36: K, 38: W, 40: j }, { 58: 146, 89: [1, 147], 90: [1, 148] }, { 60: 149, 89: [1, 150], 90: [1, 151] }, e(y, [2, 46]), { 5: he, 40: ue, 56: 152, 57: fe, 59: me }, { 5: [1, 153] }, { 5: [1, 154] }, { 5: [2, 83] }, { 5: [2, 84] }, { 5: [1, 155] }, { 5: [2, 35] }, { 5: [2, 36] }, { 5: [2, 37] }, { 5: [1, 156] }, { 5: [2, 38] }, { 5: [2, 39] }, { 5: [2, 40] }, { 5: [2, 41] }, e(y, [2, 22]), { 5: [1, 157] }, { 5: [2, 87] }, { 5: [2, 88] }, { 5: [1, 158] }, { 5: [2, 89] }, { 5: [2, 90] }, e(y, [2, 43]), { 5: B, 28: 159, 31: Q, 34: H, 36: K, 38: W, 40: j }, { 5: B, 28: 160, 31: Q, 34: H, 36: K, 38: W, 40: j }, { 5: B, 28: 161, 31: Q, 34: H, 36: K, 38: W, 40: j }, { 5: B, 28: 162, 31: Q, 34: H, 36: K, 38: W, 40: j }, { 5: he, 40: ue, 56: 163, 57: fe, 59: me }, { 5: he, 40: ue, 56: 164, 57: fe, 59: me }, e(y, [2, 23]), e(y, [2, 24]), e(y, [2, 25]), e(y, [2, 26]), e(y, [2, 44]), e(y, [2, 45])],
168
+ defaultActions: { 8: [2, 2], 12: [2, 1], 41: [2, 3], 42: [2, 8], 43: [2, 9], 44: [2, 10], 45: [2, 11], 46: [2, 12], 47: [2, 13], 48: [2, 14], 49: [2, 15], 50: [2, 16], 134: [2, 83], 135: [2, 84], 137: [2, 35], 138: [2, 36], 139: [2, 37], 141: [2, 38], 142: [2, 39], 143: [2, 40], 144: [2, 41], 147: [2, 87], 148: [2, 88], 150: [2, 89], 151: [2, 90] },
169
+ parseError: /* @__PURE__ */ f(function(i, r) {
170
+ if (r.recoverable)
171
+ this.trace(i);
172
+ else {
173
+ var l = new Error(i);
174
+ throw l.hash = r, l;
175
+ }
176
+ }, "parseError"),
177
+ parse: /* @__PURE__ */ f(function(i) {
178
+ var r = this, l = [0], s = [], d = [null], t = [], Ee = this.table, n = "", ye = 0, Pe = 0, He = 2, $e = 1, Ke = t.slice.call(arguments, 1), S = Object.create(this.lexer), G = { yy: {} };
179
+ for (var Ie in this.yy)
180
+ Object.prototype.hasOwnProperty.call(this.yy, Ie) && (G.yy[Ie] = this.yy[Ie]);
181
+ S.setInput(i, G.yy), G.yy.lexer = S, G.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
182
+ var be = S.yylloc;
183
+ t.push(be);
184
+ var We = S.options && S.options.ranges;
185
+ typeof G.yy.parseError == "function" ? this.parseError = G.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
186
+ function je(T) {
187
+ l.length = l.length - 2 * T, d.length = d.length - T, t.length = t.length - T;
188
+ }
189
+ f(je, "popStack");
190
+ function Ue() {
191
+ var T;
192
+ return T = s.pop() || S.lex() || $e, typeof T != "number" && (T instanceof Array && (s = T, T = s.pop()), T = r.symbols_[T] || T), T;
193
+ }
194
+ f(Ue, "lex");
195
+ for (var b, z, q, Te, J = {}, ge, F, Ye, _e; ; ) {
196
+ if (z = l[l.length - 1], this.defaultActions[z] ? q = this.defaultActions[z] : ((b === null || typeof b > "u") && (b = Ue()), q = Ee[z] && Ee[z][b]), typeof q > "u" || !q.length || !q[0]) {
197
+ var ke = "";
198
+ _e = [];
199
+ for (ge in Ee[z])
200
+ this.terminals_[ge] && ge > He && _e.push("'" + this.terminals_[ge] + "'");
201
+ S.showPosition ? ke = "Parse error on line " + (ye + 1) + `:
202
+ ` + S.showPosition() + `
203
+ Expecting ` + _e.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : ke = "Parse error on line " + (ye + 1) + ": Unexpected " + (b == $e ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(ke, {
204
+ text: S.match,
205
+ token: this.terminals_[b] || b,
206
+ line: S.yylineno,
207
+ loc: be,
208
+ expected: _e
209
+ });
210
+ }
211
+ if (q[0] instanceof Array && q.length > 1)
212
+ throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + b);
213
+ switch (q[0]) {
214
+ case 1:
215
+ l.push(b), d.push(S.yytext), t.push(S.yylloc), l.push(q[1]), b = null, Pe = S.yyleng, n = S.yytext, ye = S.yylineno, be = S.yylloc;
216
+ break;
217
+ case 2:
218
+ if (F = this.productions_[q[1]][1], J.$ = d[d.length - F], J._$ = {
219
+ first_line: t[t.length - (F || 1)].first_line,
220
+ last_line: t[t.length - 1].last_line,
221
+ first_column: t[t.length - (F || 1)].first_column,
222
+ last_column: t[t.length - 1].last_column
223
+ }, We && (J._$.range = [
224
+ t[t.length - (F || 1)].range[0],
225
+ t[t.length - 1].range[1]
226
+ ]), Te = this.performAction.apply(J, [
227
+ n,
228
+ Pe,
229
+ ye,
230
+ G.yy,
231
+ q[1],
232
+ d,
233
+ t
234
+ ].concat(Ke)), typeof Te < "u")
235
+ return Te;
236
+ F && (l = l.slice(0, -1 * F * 2), d = d.slice(0, -1 * F), t = t.slice(0, -1 * F)), l.push(this.productions_[q[1]][0]), d.push(J.$), t.push(J._$), Ye = Ee[l[l.length - 2]][l[l.length - 1]], l.push(Ye);
237
+ break;
238
+ case 3:
239
+ return !0;
240
+ }
241
+ }
242
+ return !0;
243
+ }, "parse")
244
+ }, Qe = /* @__PURE__ */ function() {
245
+ var P = {
246
+ EOF: 1,
247
+ parseError: /* @__PURE__ */ f(function(r, l) {
248
+ if (this.yy.parser)
249
+ this.yy.parser.parseError(r, l);
250
+ else
251
+ throw new Error(r);
252
+ }, "parseError"),
253
+ // resets the lexer, sets new input
254
+ setInput: /* @__PURE__ */ f(function(i, r) {
255
+ return this.yy = r || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
256
+ first_line: 1,
257
+ first_column: 0,
258
+ last_line: 1,
259
+ last_column: 0
260
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
261
+ }, "setInput"),
262
+ // consumes and returns one char from the input
263
+ input: /* @__PURE__ */ f(function() {
264
+ var i = this._input[0];
265
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
266
+ var r = i.match(/(?:\r\n?|\n).*/g);
267
+ return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
268
+ }, "input"),
269
+ // unshifts one char (or a string) into the input
270
+ unput: /* @__PURE__ */ f(function(i) {
271
+ var r = i.length, l = i.split(/(?:\r\n?|\n)/g);
272
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
273
+ var s = this.match.split(/(?:\r\n?|\n)/g);
274
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
275
+ var d = this.yylloc.range;
276
+ return this.yylloc = {
277
+ first_line: this.yylloc.first_line,
278
+ last_line: this.yylineno + 1,
279
+ first_column: this.yylloc.first_column,
280
+ last_column: l ? (l.length === s.length ? this.yylloc.first_column : 0) + s[s.length - l.length].length - l[0].length : this.yylloc.first_column - r
281
+ }, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
282
+ }, "unput"),
283
+ // When called from action, caches matched text and appends it on next action
284
+ more: /* @__PURE__ */ f(function() {
285
+ return this._more = !0, this;
286
+ }, "more"),
287
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
288
+ reject: /* @__PURE__ */ f(function() {
289
+ if (this.options.backtrack_lexer)
290
+ this._backtrack = !0;
291
+ else
292
+ return 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).
293
+ ` + this.showPosition(), {
294
+ text: "",
295
+ token: null,
296
+ line: this.yylineno
297
+ });
298
+ return this;
299
+ }, "reject"),
300
+ // retain first n characters of the match
301
+ less: /* @__PURE__ */ f(function(i) {
302
+ this.unput(this.match.slice(i));
303
+ }, "less"),
304
+ // displays already matched input, i.e. for error messages
305
+ pastInput: /* @__PURE__ */ f(function() {
306
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
307
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
308
+ }, "pastInput"),
309
+ // displays upcoming input, i.e. for error messages
310
+ upcomingInput: /* @__PURE__ */ f(function() {
311
+ var i = this.match;
312
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
313
+ }, "upcomingInput"),
314
+ // displays the character position where the lexing error occurred, i.e. for error messages
315
+ showPosition: /* @__PURE__ */ f(function() {
316
+ var i = this.pastInput(), r = new Array(i.length + 1).join("-");
317
+ return i + this.upcomingInput() + `
318
+ ` + r + "^";
319
+ }, "showPosition"),
320
+ // test the lexed token: return FALSE when not a match, otherwise return token
321
+ test_match: /* @__PURE__ */ f(function(i, r) {
322
+ var l, s, d;
323
+ if (this.options.backtrack_lexer && (d = {
324
+ yylineno: this.yylineno,
325
+ yylloc: {
326
+ first_line: this.yylloc.first_line,
327
+ last_line: this.last_line,
328
+ first_column: this.yylloc.first_column,
329
+ last_column: this.yylloc.last_column
330
+ },
331
+ yytext: this.yytext,
332
+ match: this.match,
333
+ matches: this.matches,
334
+ matched: this.matched,
335
+ yyleng: this.yyleng,
336
+ offset: this.offset,
337
+ _more: this._more,
338
+ _input: this._input,
339
+ yy: this.yy,
340
+ conditionStack: this.conditionStack.slice(0),
341
+ done: this.done
342
+ }, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), s = i[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = {
343
+ first_line: this.yylloc.last_line,
344
+ last_line: this.yylineno + 1,
345
+ first_column: this.yylloc.last_column,
346
+ last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
347
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], l = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
348
+ return l;
349
+ if (this._backtrack) {
350
+ for (var t in d)
351
+ this[t] = d[t];
352
+ return !1;
353
+ }
354
+ return !1;
355
+ }, "test_match"),
356
+ // return next match in input
357
+ next: /* @__PURE__ */ f(function() {
358
+ if (this.done)
359
+ return this.EOF;
360
+ this._input || (this.done = !0);
361
+ var i, r, l, s;
362
+ this._more || (this.yytext = "", this.match = "");
363
+ for (var d = this._currentRules(), t = 0; t < d.length; t++)
364
+ if (l = this._input.match(this.rules[d[t]]), l && (!r || l[0].length > r[0].length)) {
365
+ if (r = l, s = t, this.options.backtrack_lexer) {
366
+ if (i = this.test_match(l, d[t]), i !== !1)
367
+ return i;
368
+ if (this._backtrack) {
369
+ r = !1;
370
+ continue;
371
+ } else
372
+ return !1;
373
+ } else if (!this.options.flex)
374
+ break;
375
+ }
376
+ return r ? (i = this.test_match(r, d[s]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
377
+ ` + this.showPosition(), {
378
+ text: "",
379
+ token: null,
380
+ line: this.yylineno
381
+ });
382
+ }, "next"),
383
+ // return next match that has a token
384
+ lex: /* @__PURE__ */ f(function() {
385
+ var r = this.next();
386
+ return r || this.lex();
387
+ }, "lex"),
388
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
389
+ begin: /* @__PURE__ */ f(function(r) {
390
+ this.conditionStack.push(r);
391
+ }, "begin"),
392
+ // pop the previously active lexer condition state off the condition stack
393
+ popState: /* @__PURE__ */ f(function() {
394
+ var r = this.conditionStack.length - 1;
395
+ return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
396
+ }, "popState"),
397
+ // produce the lexer rule set which is active for the currently active lexer condition state
398
+ _currentRules: /* @__PURE__ */ f(function() {
399
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
400
+ }, "_currentRules"),
401
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
402
+ topState: /* @__PURE__ */ f(function(r) {
403
+ return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
404
+ }, "topState"),
405
+ // alias for begin(condition)
406
+ pushState: /* @__PURE__ */ f(function(r) {
407
+ this.begin(r);
408
+ }, "pushState"),
409
+ // return the number of states currently on the stack
410
+ stateStackSize: /* @__PURE__ */ f(function() {
411
+ return this.conditionStack.length;
412
+ }, "stateStackSize"),
413
+ options: { "case-insensitive": !0 },
414
+ performAction: /* @__PURE__ */ f(function(r, l, s, d) {
415
+ switch (s) {
416
+ case 0:
417
+ return "title";
418
+ case 1:
419
+ return this.begin("acc_title"), 9;
420
+ case 2:
421
+ return this.popState(), "acc_title_value";
422
+ case 3:
423
+ return this.begin("acc_descr"), 11;
424
+ case 4:
425
+ return this.popState(), "acc_descr_value";
426
+ case 5:
427
+ this.begin("acc_descr_multiline");
428
+ break;
429
+ case 6:
430
+ this.popState();
431
+ break;
432
+ case 7:
433
+ return "acc_descr_multiline_value";
434
+ case 8:
435
+ return 21;
436
+ case 9:
437
+ return 22;
438
+ case 10:
439
+ return 23;
440
+ case 11:
441
+ return 24;
442
+ case 12:
443
+ return 5;
444
+ case 13:
445
+ break;
446
+ case 14:
447
+ break;
448
+ case 15:
449
+ break;
450
+ case 16:
451
+ return 8;
452
+ case 17:
453
+ return 6;
454
+ case 18:
455
+ return 27;
456
+ case 19:
457
+ return 40;
458
+ case 20:
459
+ return 29;
460
+ case 21:
461
+ return 32;
462
+ case 22:
463
+ return 31;
464
+ case 23:
465
+ return 34;
466
+ case 24:
467
+ return 36;
468
+ case 25:
469
+ return 38;
470
+ case 26:
471
+ return 41;
472
+ case 27:
473
+ return 42;
474
+ case 28:
475
+ return 43;
476
+ case 29:
477
+ return 44;
478
+ case 30:
479
+ return 45;
480
+ case 31:
481
+ return 46;
482
+ case 32:
483
+ return 47;
484
+ case 33:
485
+ return 48;
486
+ case 34:
487
+ return 49;
488
+ case 35:
489
+ return 50;
490
+ case 36:
491
+ return 51;
492
+ case 37:
493
+ return 52;
494
+ case 38:
495
+ return 53;
496
+ case 39:
497
+ return 54;
498
+ case 40:
499
+ return 65;
500
+ case 41:
501
+ return 66;
502
+ case 42:
503
+ return 67;
504
+ case 43:
505
+ return 68;
506
+ case 44:
507
+ return 69;
508
+ case 45:
509
+ return 70;
510
+ case 46:
511
+ return 71;
512
+ case 47:
513
+ return 57;
514
+ case 48:
515
+ return 59;
516
+ case 49:
517
+ return this.begin("style"), 77;
518
+ case 50:
519
+ return 75;
520
+ case 51:
521
+ return 81;
522
+ case 52:
523
+ return 88;
524
+ case 53:
525
+ return "PERCENT";
526
+ case 54:
527
+ return 86;
528
+ case 55:
529
+ return 84;
530
+ case 56:
531
+ break;
532
+ case 57:
533
+ this.begin("string");
534
+ break;
535
+ case 58:
536
+ this.popState();
537
+ break;
538
+ case 59:
539
+ return this.begin("style"), 72;
540
+ case 60:
541
+ return this.begin("style"), 74;
542
+ case 61:
543
+ return 61;
544
+ case 62:
545
+ return 64;
546
+ case 63:
547
+ return 63;
548
+ case 64:
549
+ this.begin("string");
550
+ break;
551
+ case 65:
552
+ this.popState();
553
+ break;
554
+ case 66:
555
+ return "qString";
556
+ case 67:
557
+ return l.yytext = l.yytext.trim(), 89;
558
+ case 68:
559
+ return 75;
560
+ case 69:
561
+ return 80;
562
+ case 70:
563
+ return 76;
564
+ }
565
+ }, "anonymous"),
566
+ rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::{3})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:style\b)/i, /^(?:\w+)/i, /^(?::)/i, /^(?:;)/i, /^(?:%)/i, /^(?:-)/i, /^(?:#)/i, /^(?: )/i, /^(?:["])/i, /^(?:\n)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i, /^(?:\w+)/i, /^(?:[0-9]+)/i, /^(?:,)/i],
567
+ conditions: { acc_descr_multiline: { rules: [6, 7, 68, 69, 70], inclusive: !1 }, acc_descr: { rules: [4, 68, 69, 70], inclusive: !1 }, acc_title: { rules: [2, 68, 69, 70], inclusive: !1 }, style: { rules: [50, 51, 52, 53, 54, 55, 56, 57, 58, 68, 69, 70], inclusive: !1 }, unqString: { rules: [68, 69, 70], inclusive: !1 }, token: { rules: [68, 69, 70], inclusive: !1 }, string: { rules: [65, 66, 68, 69, 70], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 59, 60, 61, 62, 63, 64, 67, 68, 69, 70], inclusive: !0 } }
568
+ };
569
+ return P;
570
+ }();
571
+ Se.lexer = Qe;
572
+ function Re() {
573
+ this.yy = {};
574
+ }
575
+ return f(Re, "Parser"), Re.prototype = Se, Se.Parser = Re, new Re();
576
+ }();
577
+ Ae.parser = Ae;
578
+ var ct = Ae, Z, ot = (Z = class {
579
+ constructor() {
580
+ this.relations = [], this.latestRequirement = this.getInitialRequirement(), this.requirements = /* @__PURE__ */ new Map(), this.latestElement = this.getInitialElement(), this.elements = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.RequirementType = {
581
+ REQUIREMENT: "Requirement",
582
+ FUNCTIONAL_REQUIREMENT: "Functional Requirement",
583
+ INTERFACE_REQUIREMENT: "Interface Requirement",
584
+ PERFORMANCE_REQUIREMENT: "Performance Requirement",
585
+ PHYSICAL_REQUIREMENT: "Physical Requirement",
586
+ DESIGN_CONSTRAINT: "Design Constraint"
587
+ }, this.RiskLevel = {
588
+ LOW_RISK: "Low",
589
+ MED_RISK: "Medium",
590
+ HIGH_RISK: "High"
591
+ }, this.VerifyType = {
592
+ VERIFY_ANALYSIS: "Analysis",
593
+ VERIFY_DEMONSTRATION: "Demonstration",
594
+ VERIFY_INSPECTION: "Inspection",
595
+ VERIFY_TEST: "Test"
596
+ }, this.Relationships = {
597
+ CONTAINS: "contains",
598
+ COPIES: "copies",
599
+ DERIVES: "derives",
600
+ SATISFIES: "satisfies",
601
+ VERIFIES: "verifies",
602
+ REFINES: "refines",
603
+ TRACES: "traces"
604
+ }, this.setAccTitle = Xe, this.getAccTitle = Je, this.setAccDescription = Ze, this.getAccDescription = et, this.setDiagramTitle = tt, this.getDiagramTitle = st, this.getConfig = /* @__PURE__ */ f(() => Ne().requirement, "getConfig"), this.clear(), this.setDirection = this.setDirection.bind(this), this.addRequirement = this.addRequirement.bind(this), this.setNewReqId = this.setNewReqId.bind(this), this.setNewReqRisk = this.setNewReqRisk.bind(this), this.setNewReqText = this.setNewReqText.bind(this), this.setNewReqVerifyMethod = this.setNewReqVerifyMethod.bind(this), this.addElement = this.addElement.bind(this), this.setNewElementType = this.setNewElementType.bind(this), this.setNewElementDocRef = this.setNewElementDocRef.bind(this), this.addRelationship = this.addRelationship.bind(this), this.setCssStyle = this.setCssStyle.bind(this), this.setClass = this.setClass.bind(this), this.defineClass = this.defineClass.bind(this), this.setAccTitle = this.setAccTitle.bind(this), this.setAccDescription = this.setAccDescription.bind(this);
605
+ }
606
+ getDirection() {
607
+ return this.direction;
608
+ }
609
+ setDirection(a) {
610
+ this.direction = a;
611
+ }
612
+ resetLatestRequirement() {
613
+ this.latestRequirement = this.getInitialRequirement();
614
+ }
615
+ resetLatestElement() {
616
+ this.latestElement = this.getInitialElement();
617
+ }
618
+ getInitialRequirement() {
619
+ return {
620
+ requirementId: "",
621
+ text: "",
622
+ risk: "",
623
+ verifyMethod: "",
624
+ name: "",
625
+ type: "",
626
+ cssStyles: [],
627
+ classes: ["default"]
628
+ };
629
+ }
630
+ getInitialElement() {
631
+ return {
632
+ name: "",
633
+ type: "",
634
+ docRef: "",
635
+ cssStyles: [],
636
+ classes: ["default"]
637
+ };
638
+ }
639
+ addRequirement(a, u) {
640
+ return this.requirements.has(a) || this.requirements.set(a, {
641
+ name: a,
642
+ type: u,
643
+ requirementId: this.latestRequirement.requirementId,
644
+ text: this.latestRequirement.text,
645
+ risk: this.latestRequirement.risk,
646
+ verifyMethod: this.latestRequirement.verifyMethod,
647
+ cssStyles: [],
648
+ classes: ["default"]
649
+ }), this.resetLatestRequirement(), this.requirements.get(a);
650
+ }
651
+ getRequirements() {
652
+ return this.requirements;
653
+ }
654
+ setNewReqId(a) {
655
+ this.latestRequirement !== void 0 && (this.latestRequirement.requirementId = a);
656
+ }
657
+ setNewReqText(a) {
658
+ this.latestRequirement !== void 0 && (this.latestRequirement.text = a);
659
+ }
660
+ setNewReqRisk(a) {
661
+ this.latestRequirement !== void 0 && (this.latestRequirement.risk = a);
662
+ }
663
+ setNewReqVerifyMethod(a) {
664
+ this.latestRequirement !== void 0 && (this.latestRequirement.verifyMethod = a);
665
+ }
666
+ addElement(a) {
667
+ return this.elements.has(a) || (this.elements.set(a, {
668
+ name: a,
669
+ type: this.latestElement.type,
670
+ docRef: this.latestElement.docRef,
671
+ cssStyles: [],
672
+ classes: ["default"]
673
+ }), qe.info("Added new element: ", a)), this.resetLatestElement(), this.elements.get(a);
674
+ }
675
+ getElements() {
676
+ return this.elements;
677
+ }
678
+ setNewElementType(a) {
679
+ this.latestElement !== void 0 && (this.latestElement.type = a);
680
+ }
681
+ setNewElementDocRef(a) {
682
+ this.latestElement !== void 0 && (this.latestElement.docRef = a);
683
+ }
684
+ addRelationship(a, u, o) {
685
+ this.relations.push({
686
+ type: a,
687
+ src: u,
688
+ dst: o
689
+ });
690
+ }
691
+ getRelationships() {
692
+ return this.relations;
693
+ }
694
+ clear() {
695
+ this.relations = [], this.resetLatestRequirement(), this.requirements = /* @__PURE__ */ new Map(), this.resetLatestElement(), this.elements = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), it();
696
+ }
697
+ setCssStyle(a, u) {
698
+ for (const o of a) {
699
+ const m = this.requirements.get(o) ?? this.elements.get(o);
700
+ if (!u || !m)
701
+ return;
702
+ for (const c of u)
703
+ c.includes(",") ? m.cssStyles.push(...c.split(",")) : m.cssStyles.push(c);
704
+ }
705
+ }
706
+ setClass(a, u) {
707
+ var o;
708
+ for (const m of a) {
709
+ const c = this.requirements.get(m) ?? this.elements.get(m);
710
+ if (c)
711
+ for (const p of u) {
712
+ c.classes.push(p);
713
+ const R = (o = this.classes.get(p)) == null ? void 0 : o.styles;
714
+ R && c.cssStyles.push(...R);
715
+ }
716
+ }
717
+ }
718
+ defineClass(a, u) {
719
+ for (const o of a) {
720
+ let m = this.classes.get(o);
721
+ m === void 0 && (m = { id: o, styles: [], textStyles: [] }, this.classes.set(o, m)), u && u.forEach(function(c) {
722
+ if (/color/.exec(c)) {
723
+ const p = c.replace("fill", "bgFill");
724
+ m.textStyles.push(p);
725
+ }
726
+ m.styles.push(c);
727
+ }), this.requirements.forEach((c) => {
728
+ c.classes.includes(o) && c.cssStyles.push(...u.flatMap((p) => p.split(",")));
729
+ }), this.elements.forEach((c) => {
730
+ c.classes.includes(o) && c.cssStyles.push(...u.flatMap((p) => p.split(",")));
731
+ });
732
+ }
733
+ }
734
+ getClasses() {
735
+ return this.classes;
736
+ }
737
+ getData() {
738
+ var m, c, p, R;
739
+ const a = Ne(), u = [], o = [];
740
+ for (const h of this.requirements.values()) {
741
+ const E = h;
742
+ E.id = h.name, E.cssStyles = h.cssStyles, E.cssClasses = h.classes.join(" "), E.shape = "requirementBox", E.look = a.look, u.push(E);
743
+ }
744
+ for (const h of this.elements.values()) {
745
+ const E = h;
746
+ E.shape = "requirementBox", E.look = a.look, E.id = h.name, E.cssStyles = h.cssStyles, E.cssClasses = h.classes.join(" "), u.push(E);
747
+ }
748
+ for (const h of this.relations) {
749
+ let E = 0;
750
+ const I = h.type === this.Relationships.CONTAINS, k = {
751
+ id: `${h.src}-${h.dst}-${E}`,
752
+ start: ((m = this.requirements.get(h.src)) == null ? void 0 : m.name) ?? ((c = this.elements.get(h.src)) == null ? void 0 : c.name),
753
+ end: ((p = this.requirements.get(h.dst)) == null ? void 0 : p.name) ?? ((R = this.elements.get(h.dst)) == null ? void 0 : R.name),
754
+ label: `&lt;&lt;${h.type}&gt;&gt;`,
755
+ classes: "relationshipLine",
756
+ style: ["fill:none", I ? "" : "stroke-dasharray: 10,7"],
757
+ labelpos: "c",
758
+ thickness: "normal",
759
+ type: "normal",
760
+ pattern: I ? "normal" : "dashed",
761
+ arrowTypeStart: I ? "requirement_contains" : "",
762
+ arrowTypeEnd: I ? "" : "requirement_arrow",
763
+ look: a.look
764
+ };
765
+ o.push(k), E++;
766
+ }
767
+ return { nodes: u, edges: o, other: {}, config: a, direction: this.getDirection() };
768
+ }
769
+ }, f(Z, "RequirementDB"), Z), ht = /* @__PURE__ */ f((e) => `
770
+
771
+ marker {
772
+ fill: ${e.relationColor};
773
+ stroke: ${e.relationColor};
774
+ }
775
+
776
+ marker.cross {
777
+ stroke: ${e.lineColor};
778
+ }
779
+
780
+ svg {
781
+ font-family: ${e.fontFamily};
782
+ font-size: ${e.fontSize};
783
+ }
784
+
785
+ .reqBox {
786
+ fill: ${e.requirementBackground};
787
+ fill-opacity: 1.0;
788
+ stroke: ${e.requirementBorderColor};
789
+ stroke-width: ${e.requirementBorderSize};
790
+ }
791
+
792
+ .reqTitle, .reqLabel{
793
+ fill: ${e.requirementTextColor};
794
+ }
795
+ .reqLabelBox {
796
+ fill: ${e.relationLabelBackground};
797
+ fill-opacity: 1.0;
798
+ }
799
+
800
+ .req-title-line {
801
+ stroke: ${e.requirementBorderColor};
802
+ stroke-width: ${e.requirementBorderSize};
803
+ }
804
+ .relationshipLine {
805
+ stroke: ${e.relationColor};
806
+ stroke-width: 1;
807
+ }
808
+ .relationshipLabel {
809
+ fill: ${e.relationLabelColor};
810
+ }
811
+ .divider {
812
+ stroke: ${e.nodeBorder};
813
+ stroke-width: 1;
814
+ }
815
+ .label {
816
+ font-family: ${e.fontFamily};
817
+ color: ${e.nodeTextColor || e.textColor};
818
+ }
819
+ .label text,span {
820
+ fill: ${e.nodeTextColor || e.textColor};
821
+ color: ${e.nodeTextColor || e.textColor};
822
+ }
823
+ .labelBkg {
824
+ background-color: ${e.edgeLabelBackground};
825
+ }
826
+
827
+ `, "getStyles"), ut = ht, Be = {};
828
+ rt(Be, {
829
+ draw: () => ft
830
+ });
831
+ var ft = /* @__PURE__ */ f(async function(e, a, u, o) {
832
+ qe.info("REF0:"), qe.info("Drawing requirement diagram (unified)", a);
833
+ const { securityLevel: m, state: c, layout: p } = Ne(), R = o.db.getData(), h = Ge(a, m);
834
+ R.type = o.type, R.layoutAlgorithm = nt(p), R.nodeSpacing = (c == null ? void 0 : c.nodeSpacing) ?? 50, R.rankSpacing = (c == null ? void 0 : c.rankSpacing) ?? 50, R.markers = ["requirement_contains", "requirement_arrow"], R.diagramId = a, await at(R, h);
835
+ const E = 8;
836
+ lt.insertTitle(
837
+ h,
838
+ "requirementDiagramTitleText",
839
+ (c == null ? void 0 : c.titleTopMargin) ?? 25,
840
+ o.db.getDiagramTitle()
841
+ ), ze(h, E, "requirementDiagram", (c == null ? void 0 : c.useMaxWidth) ?? !0);
842
+ }, "draw"), pt = {
843
+ parser: ct,
844
+ get db() {
845
+ return new ot();
846
+ },
847
+ renderer: Be,
848
+ styles: ut
849
+ };
850
+ export {
851
+ pt as diagram
852
+ };
src/backend/gradio_dropdownplus/templates/component/sankeyDiagram-HRAUVNP4-BatwK8JX.js ADDED
@@ -0,0 +1,810 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as p, p as _t, q as xt, s as vt, g as bt, b as wt, a as St, c as lt, z as Lt, d as H, V as Et, y as At, k as Tt } from "./mermaid.core-DH6TRyjK.js";
2
+ import { o as Mt } from "./ordinal-DfAQgscy.js";
3
+ function Nt(t) {
4
+ for (var e = t.length / 6 | 0, i = new Array(e), a = 0; a < e; ) i[a] = "#" + t.slice(a * 6, ++a * 6);
5
+ return i;
6
+ }
7
+ const It = Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
8
+ function ct(t, e) {
9
+ let i;
10
+ if (e === void 0)
11
+ for (const a of t)
12
+ a != null && (i < a || i === void 0 && a >= a) && (i = a);
13
+ else {
14
+ let a = -1;
15
+ for (let h of t)
16
+ (h = e(h, ++a, t)) != null && (i < h || i === void 0 && h >= h) && (i = h);
17
+ }
18
+ return i;
19
+ }
20
+ function pt(t, e) {
21
+ let i;
22
+ if (e === void 0)
23
+ for (const a of t)
24
+ a != null && (i > a || i === void 0 && a >= a) && (i = a);
25
+ else {
26
+ let a = -1;
27
+ for (let h of t)
28
+ (h = e(h, ++a, t)) != null && (i > h || i === void 0 && h >= h) && (i = h);
29
+ }
30
+ return i;
31
+ }
32
+ function nt(t, e) {
33
+ let i = 0;
34
+ if (e === void 0)
35
+ for (let a of t)
36
+ (a = +a) && (i += a);
37
+ else {
38
+ let a = -1;
39
+ for (let h of t)
40
+ (h = +e(h, ++a, t)) && (i += h);
41
+ }
42
+ return i;
43
+ }
44
+ function Pt(t) {
45
+ return t.target.depth;
46
+ }
47
+ function Ct(t) {
48
+ return t.depth;
49
+ }
50
+ function Ot(t, e) {
51
+ return e - 1 - t.height;
52
+ }
53
+ function mt(t, e) {
54
+ return t.sourceLinks.length ? t.depth : e - 1;
55
+ }
56
+ function zt(t) {
57
+ return t.targetLinks.length ? t.depth : t.sourceLinks.length ? pt(t.sourceLinks, Pt) - 1 : 0;
58
+ }
59
+ function X(t) {
60
+ return function() {
61
+ return t;
62
+ };
63
+ }
64
+ function ut(t, e) {
65
+ return Q(t.source, e.source) || t.index - e.index;
66
+ }
67
+ function ht(t, e) {
68
+ return Q(t.target, e.target) || t.index - e.index;
69
+ }
70
+ function Q(t, e) {
71
+ return t.y0 - e.y0;
72
+ }
73
+ function it(t) {
74
+ return t.value;
75
+ }
76
+ function Dt(t) {
77
+ return t.index;
78
+ }
79
+ function $t(t) {
80
+ return t.nodes;
81
+ }
82
+ function jt(t) {
83
+ return t.links;
84
+ }
85
+ function ft(t, e) {
86
+ const i = t.get(e);
87
+ if (!i) throw new Error("missing: " + e);
88
+ return i;
89
+ }
90
+ function yt({ nodes: t }) {
91
+ for (const e of t) {
92
+ let i = e.y0, a = i;
93
+ for (const h of e.sourceLinks)
94
+ h.y0 = i + h.width / 2, i += h.width;
95
+ for (const h of e.targetLinks)
96
+ h.y1 = a + h.width / 2, a += h.width;
97
+ }
98
+ }
99
+ function Bt() {
100
+ let t = 0, e = 0, i = 1, a = 1, h = 24, d = 8, m, _ = Dt, s = mt, o, l, x = $t, v = jt, y = 6;
101
+ function b() {
102
+ const n = { nodes: x.apply(null, arguments), links: v.apply(null, arguments) };
103
+ return M(n), T(n), N(n), C(n), S(n), yt(n), n;
104
+ }
105
+ b.update = function(n) {
106
+ return yt(n), n;
107
+ }, b.nodeId = function(n) {
108
+ return arguments.length ? (_ = typeof n == "function" ? n : X(n), b) : _;
109
+ }, b.nodeAlign = function(n) {
110
+ return arguments.length ? (s = typeof n == "function" ? n : X(n), b) : s;
111
+ }, b.nodeSort = function(n) {
112
+ return arguments.length ? (o = n, b) : o;
113
+ }, b.nodeWidth = function(n) {
114
+ return arguments.length ? (h = +n, b) : h;
115
+ }, b.nodePadding = function(n) {
116
+ return arguments.length ? (d = m = +n, b) : d;
117
+ }, b.nodes = function(n) {
118
+ return arguments.length ? (x = typeof n == "function" ? n : X(n), b) : x;
119
+ }, b.links = function(n) {
120
+ return arguments.length ? (v = typeof n == "function" ? n : X(n), b) : v;
121
+ }, b.linkSort = function(n) {
122
+ return arguments.length ? (l = n, b) : l;
123
+ }, b.size = function(n) {
124
+ return arguments.length ? (t = e = 0, i = +n[0], a = +n[1], b) : [i - t, a - e];
125
+ }, b.extent = function(n) {
126
+ return arguments.length ? (t = +n[0][0], i = +n[1][0], e = +n[0][1], a = +n[1][1], b) : [[t, e], [i, a]];
127
+ }, b.iterations = function(n) {
128
+ return arguments.length ? (y = +n, b) : y;
129
+ };
130
+ function M({ nodes: n, links: f }) {
131
+ for (const [c, r] of n.entries())
132
+ r.index = c, r.sourceLinks = [], r.targetLinks = [];
133
+ const u = new Map(n.map((c, r) => [_(c, r, n), c]));
134
+ for (const [c, r] of f.entries()) {
135
+ r.index = c;
136
+ let { source: k, target: w } = r;
137
+ typeof k != "object" && (k = r.source = ft(u, k)), typeof w != "object" && (w = r.target = ft(u, w)), k.sourceLinks.push(r), w.targetLinks.push(r);
138
+ }
139
+ if (l != null)
140
+ for (const { sourceLinks: c, targetLinks: r } of n)
141
+ c.sort(l), r.sort(l);
142
+ }
143
+ function T({ nodes: n }) {
144
+ for (const f of n)
145
+ f.value = f.fixedValue === void 0 ? Math.max(nt(f.sourceLinks, it), nt(f.targetLinks, it)) : f.fixedValue;
146
+ }
147
+ function N({ nodes: n }) {
148
+ const f = n.length;
149
+ let u = new Set(n), c = /* @__PURE__ */ new Set(), r = 0;
150
+ for (; u.size; ) {
151
+ for (const k of u) {
152
+ k.depth = r;
153
+ for (const { target: w } of k.sourceLinks)
154
+ c.add(w);
155
+ }
156
+ if (++r > f) throw new Error("circular link");
157
+ u = c, c = /* @__PURE__ */ new Set();
158
+ }
159
+ }
160
+ function C({ nodes: n }) {
161
+ const f = n.length;
162
+ let u = new Set(n), c = /* @__PURE__ */ new Set(), r = 0;
163
+ for (; u.size; ) {
164
+ for (const k of u) {
165
+ k.height = r;
166
+ for (const { source: w } of k.targetLinks)
167
+ c.add(w);
168
+ }
169
+ if (++r > f) throw new Error("circular link");
170
+ u = c, c = /* @__PURE__ */ new Set();
171
+ }
172
+ }
173
+ function D({ nodes: n }) {
174
+ const f = ct(n, (r) => r.depth) + 1, u = (i - t - h) / (f - 1), c = new Array(f);
175
+ for (const r of n) {
176
+ const k = Math.max(0, Math.min(f - 1, Math.floor(s.call(null, r, f))));
177
+ r.layer = k, r.x0 = t + k * u, r.x1 = r.x0 + h, c[k] ? c[k].push(r) : c[k] = [r];
178
+ }
179
+ if (o) for (const r of c)
180
+ r.sort(o);
181
+ return c;
182
+ }
183
+ function R(n) {
184
+ const f = pt(n, (u) => (a - e - (u.length - 1) * m) / nt(u, it));
185
+ for (const u of n) {
186
+ let c = e;
187
+ for (const r of u) {
188
+ r.y0 = c, r.y1 = c + r.value * f, c = r.y1 + m;
189
+ for (const k of r.sourceLinks)
190
+ k.width = k.value * f;
191
+ }
192
+ c = (a - c + m) / (u.length + 1);
193
+ for (let r = 0; r < u.length; ++r) {
194
+ const k = u[r];
195
+ k.y0 += c * (r + 1), k.y1 += c * (r + 1);
196
+ }
197
+ A(u);
198
+ }
199
+ }
200
+ function S(n) {
201
+ const f = D(n);
202
+ m = Math.min(d, (a - e) / (ct(f, (u) => u.length) - 1)), R(f);
203
+ for (let u = 0; u < y; ++u) {
204
+ const c = Math.pow(0.99, u), r = Math.max(1 - c, (u + 1) / y);
205
+ B(f, c, r), P(f, c, r);
206
+ }
207
+ }
208
+ function P(n, f, u) {
209
+ for (let c = 1, r = n.length; c < r; ++c) {
210
+ const k = n[c];
211
+ for (const w of k) {
212
+ let L = 0, V = 0;
213
+ for (const { source: Y, value: et } of w.targetLinks) {
214
+ let q = et * (w.layer - Y.layer);
215
+ L += $(Y, w) * q, V += q;
216
+ }
217
+ if (!(V > 0)) continue;
218
+ let G = (L / V - w.y0) * f;
219
+ w.y0 += G, w.y1 += G, E(w);
220
+ }
221
+ o === void 0 && k.sort(Q), O(k, u);
222
+ }
223
+ }
224
+ function B(n, f, u) {
225
+ for (let c = n.length, r = c - 2; r >= 0; --r) {
226
+ const k = n[r];
227
+ for (const w of k) {
228
+ let L = 0, V = 0;
229
+ for (const { target: Y, value: et } of w.sourceLinks) {
230
+ let q = et * (Y.layer - w.layer);
231
+ L += I(w, Y) * q, V += q;
232
+ }
233
+ if (!(V > 0)) continue;
234
+ let G = (L / V - w.y0) * f;
235
+ w.y0 += G, w.y1 += G, E(w);
236
+ }
237
+ o === void 0 && k.sort(Q), O(k, u);
238
+ }
239
+ }
240
+ function O(n, f) {
241
+ const u = n.length >> 1, c = n[u];
242
+ g(n, c.y0 - m, u - 1, f), z(n, c.y1 + m, u + 1, f), g(n, a, n.length - 1, f), z(n, e, 0, f);
243
+ }
244
+ function z(n, f, u, c) {
245
+ for (; u < n.length; ++u) {
246
+ const r = n[u], k = (f - r.y0) * c;
247
+ k > 1e-6 && (r.y0 += k, r.y1 += k), f = r.y1 + m;
248
+ }
249
+ }
250
+ function g(n, f, u, c) {
251
+ for (; u >= 0; --u) {
252
+ const r = n[u], k = (r.y1 - f) * c;
253
+ k > 1e-6 && (r.y0 -= k, r.y1 -= k), f = r.y0 - m;
254
+ }
255
+ }
256
+ function E({ sourceLinks: n, targetLinks: f }) {
257
+ if (l === void 0) {
258
+ for (const { source: { sourceLinks: u } } of f)
259
+ u.sort(ht);
260
+ for (const { target: { targetLinks: u } } of n)
261
+ u.sort(ut);
262
+ }
263
+ }
264
+ function A(n) {
265
+ if (l === void 0)
266
+ for (const { sourceLinks: f, targetLinks: u } of n)
267
+ f.sort(ht), u.sort(ut);
268
+ }
269
+ function $(n, f) {
270
+ let u = n.y0 - (n.sourceLinks.length - 1) * m / 2;
271
+ for (const { target: c, width: r } of n.sourceLinks) {
272
+ if (c === f) break;
273
+ u += r + m;
274
+ }
275
+ for (const { source: c, width: r } of f.targetLinks) {
276
+ if (c === n) break;
277
+ u -= r;
278
+ }
279
+ return u;
280
+ }
281
+ function I(n, f) {
282
+ let u = f.y0 - (f.targetLinks.length - 1) * m / 2;
283
+ for (const { source: c, width: r } of f.targetLinks) {
284
+ if (c === n) break;
285
+ u += r + m;
286
+ }
287
+ for (const { target: c, width: r } of n.sourceLinks) {
288
+ if (c === f) break;
289
+ u -= r;
290
+ }
291
+ return u;
292
+ }
293
+ return b;
294
+ }
295
+ var st = Math.PI, rt = 2 * st, F = 1e-6, Rt = rt - F;
296
+ function ot() {
297
+ this._x0 = this._y0 = // start of current subpath
298
+ this._x1 = this._y1 = null, this._ = "";
299
+ }
300
+ function kt() {
301
+ return new ot();
302
+ }
303
+ ot.prototype = kt.prototype = {
304
+ constructor: ot,
305
+ moveTo: function(t, e) {
306
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e);
307
+ },
308
+ closePath: function() {
309
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
310
+ },
311
+ lineTo: function(t, e) {
312
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +e);
313
+ },
314
+ quadraticCurveTo: function(t, e, i, a) {
315
+ this._ += "Q" + +t + "," + +e + "," + (this._x1 = +i) + "," + (this._y1 = +a);
316
+ },
317
+ bezierCurveTo: function(t, e, i, a, h, d) {
318
+ this._ += "C" + +t + "," + +e + "," + +i + "," + +a + "," + (this._x1 = +h) + "," + (this._y1 = +d);
319
+ },
320
+ arcTo: function(t, e, i, a, h) {
321
+ t = +t, e = +e, i = +i, a = +a, h = +h;
322
+ var d = this._x1, m = this._y1, _ = i - t, s = a - e, o = d - t, l = m - e, x = o * o + l * l;
323
+ if (h < 0) throw new Error("negative radius: " + h);
324
+ if (this._x1 === null)
325
+ this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
326
+ else if (x > F) if (!(Math.abs(l * _ - s * o) > F) || !h)
327
+ this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
328
+ else {
329
+ var v = i - d, y = a - m, b = _ * _ + s * s, M = v * v + y * y, T = Math.sqrt(b), N = Math.sqrt(x), C = h * Math.tan((st - Math.acos((b + x - M) / (2 * T * N))) / 2), D = C / N, R = C / T;
330
+ Math.abs(D - 1) > F && (this._ += "L" + (t + D * o) + "," + (e + D * l)), this._ += "A" + h + "," + h + ",0,0," + +(l * v > o * y) + "," + (this._x1 = t + R * _) + "," + (this._y1 = e + R * s);
331
+ }
332
+ },
333
+ arc: function(t, e, i, a, h, d) {
334
+ t = +t, e = +e, i = +i, d = !!d;
335
+ var m = i * Math.cos(a), _ = i * Math.sin(a), s = t + m, o = e + _, l = 1 ^ d, x = d ? a - h : h - a;
336
+ if (i < 0) throw new Error("negative radius: " + i);
337
+ this._x1 === null ? this._ += "M" + s + "," + o : (Math.abs(this._x1 - s) > F || Math.abs(this._y1 - o) > F) && (this._ += "L" + s + "," + o), i && (x < 0 && (x = x % rt + rt), x > Rt ? this._ += "A" + i + "," + i + ",0,1," + l + "," + (t - m) + "," + (e - _) + "A" + i + "," + i + ",0,1," + l + "," + (this._x1 = s) + "," + (this._y1 = o) : x > F && (this._ += "A" + i + "," + i + ",0," + +(x >= st) + "," + l + "," + (this._x1 = t + i * Math.cos(h)) + "," + (this._y1 = e + i * Math.sin(h))));
338
+ },
339
+ rect: function(t, e, i, a) {
340
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e) + "h" + +i + "v" + +a + "h" + -i + "Z";
341
+ },
342
+ toString: function() {
343
+ return this._;
344
+ }
345
+ };
346
+ function dt(t) {
347
+ return function() {
348
+ return t;
349
+ };
350
+ }
351
+ function Vt(t) {
352
+ return t[0];
353
+ }
354
+ function Ft(t) {
355
+ return t[1];
356
+ }
357
+ var Wt = Array.prototype.slice;
358
+ function Ut(t) {
359
+ return t.source;
360
+ }
361
+ function Gt(t) {
362
+ return t.target;
363
+ }
364
+ function Yt(t) {
365
+ var e = Ut, i = Gt, a = Vt, h = Ft, d = null;
366
+ function m() {
367
+ var _, s = Wt.call(arguments), o = e.apply(this, s), l = i.apply(this, s);
368
+ if (d || (d = _ = kt()), t(d, +a.apply(this, (s[0] = o, s)), +h.apply(this, s), +a.apply(this, (s[0] = l, s)), +h.apply(this, s)), _) return d = null, _ + "" || null;
369
+ }
370
+ return m.source = function(_) {
371
+ return arguments.length ? (e = _, m) : e;
372
+ }, m.target = function(_) {
373
+ return arguments.length ? (i = _, m) : i;
374
+ }, m.x = function(_) {
375
+ return arguments.length ? (a = typeof _ == "function" ? _ : dt(+_), m) : a;
376
+ }, m.y = function(_) {
377
+ return arguments.length ? (h = typeof _ == "function" ? _ : dt(+_), m) : h;
378
+ }, m.context = function(_) {
379
+ return arguments.length ? (d = _ ?? null, m) : d;
380
+ }, m;
381
+ }
382
+ function qt(t, e, i, a, h) {
383
+ t.moveTo(e, i), t.bezierCurveTo(e = (e + a) / 2, i, e, h, a, h);
384
+ }
385
+ function Ht() {
386
+ return Yt(qt);
387
+ }
388
+ function Xt(t) {
389
+ return [t.source.x1, t.y0];
390
+ }
391
+ function Qt(t) {
392
+ return [t.target.x0, t.y1];
393
+ }
394
+ function Kt() {
395
+ return Ht().source(Xt).target(Qt);
396
+ }
397
+ var at = function() {
398
+ var t = /* @__PURE__ */ p(function(_, s, o, l) {
399
+ for (o = o || {}, l = _.length; l--; o[_[l]] = s) ;
400
+ return o;
401
+ }, "o"), e = [1, 9], i = [1, 10], a = [1, 5, 10, 12], h = {
402
+ trace: /* @__PURE__ */ p(function() {
403
+ }, "trace"),
404
+ yy: {},
405
+ symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
406
+ terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
407
+ productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
408
+ performAction: /* @__PURE__ */ p(function(s, o, l, x, v, y, b) {
409
+ var M = y.length - 1;
410
+ switch (v) {
411
+ case 7:
412
+ const T = x.findOrCreateNode(y[M - 4].trim().replaceAll('""', '"')), N = x.findOrCreateNode(y[M - 2].trim().replaceAll('""', '"')), C = parseFloat(y[M].trim());
413
+ x.addLink(T, N, C);
414
+ break;
415
+ case 8:
416
+ case 9:
417
+ case 11:
418
+ this.$ = y[M];
419
+ break;
420
+ case 10:
421
+ this.$ = y[M - 1];
422
+ break;
423
+ }
424
+ }, "anonymous"),
425
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: i }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(i, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(a, [2, 8]), t(a, [2, 9]), { 19: [1, 16] }, t(a, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(i, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: i }, { 15: 18, 16: 7, 17: 8, 18: e, 20: i }, { 18: [1, 19] }, t(i, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: e, 20: i }, t([1, 5, 10], [2, 7])],
426
+ defaultActions: { 11: [2, 1], 12: [2, 5] },
427
+ parseError: /* @__PURE__ */ p(function(s, o) {
428
+ if (o.recoverable)
429
+ this.trace(s);
430
+ else {
431
+ var l = new Error(s);
432
+ throw l.hash = o, l;
433
+ }
434
+ }, "parseError"),
435
+ parse: /* @__PURE__ */ p(function(s) {
436
+ var o = this, l = [0], x = [], v = [null], y = [], b = this.table, M = "", T = 0, N = 0, C = 2, D = 1, R = y.slice.call(arguments, 1), S = Object.create(this.lexer), P = { yy: {} };
437
+ for (var B in this.yy)
438
+ Object.prototype.hasOwnProperty.call(this.yy, B) && (P.yy[B] = this.yy[B]);
439
+ S.setInput(s, P.yy), P.yy.lexer = S, P.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
440
+ var O = S.yylloc;
441
+ y.push(O);
442
+ var z = S.options && S.options.ranges;
443
+ typeof P.yy.parseError == "function" ? this.parseError = P.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
444
+ function g(L) {
445
+ l.length = l.length - 2 * L, v.length = v.length - L, y.length = y.length - L;
446
+ }
447
+ p(g, "popStack");
448
+ function E() {
449
+ var L;
450
+ return L = x.pop() || S.lex() || D, typeof L != "number" && (L instanceof Array && (x = L, L = x.pop()), L = o.symbols_[L] || L), L;
451
+ }
452
+ p(E, "lex");
453
+ for (var A, $, I, n, f = {}, u, c, r, k; ; ) {
454
+ if ($ = l[l.length - 1], this.defaultActions[$] ? I = this.defaultActions[$] : ((A === null || typeof A > "u") && (A = E()), I = b[$] && b[$][A]), typeof I > "u" || !I.length || !I[0]) {
455
+ var w = "";
456
+ k = [];
457
+ for (u in b[$])
458
+ this.terminals_[u] && u > C && k.push("'" + this.terminals_[u] + "'");
459
+ S.showPosition ? w = "Parse error on line " + (T + 1) + `:
460
+ ` + S.showPosition() + `
461
+ Expecting ` + k.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : w = "Parse error on line " + (T + 1) + ": Unexpected " + (A == D ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(w, {
462
+ text: S.match,
463
+ token: this.terminals_[A] || A,
464
+ line: S.yylineno,
465
+ loc: O,
466
+ expected: k
467
+ });
468
+ }
469
+ if (I[0] instanceof Array && I.length > 1)
470
+ throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + A);
471
+ switch (I[0]) {
472
+ case 1:
473
+ l.push(A), v.push(S.yytext), y.push(S.yylloc), l.push(I[1]), A = null, N = S.yyleng, M = S.yytext, T = S.yylineno, O = S.yylloc;
474
+ break;
475
+ case 2:
476
+ if (c = this.productions_[I[1]][1], f.$ = v[v.length - c], f._$ = {
477
+ first_line: y[y.length - (c || 1)].first_line,
478
+ last_line: y[y.length - 1].last_line,
479
+ first_column: y[y.length - (c || 1)].first_column,
480
+ last_column: y[y.length - 1].last_column
481
+ }, z && (f._$.range = [
482
+ y[y.length - (c || 1)].range[0],
483
+ y[y.length - 1].range[1]
484
+ ]), n = this.performAction.apply(f, [
485
+ M,
486
+ N,
487
+ T,
488
+ P.yy,
489
+ I[1],
490
+ v,
491
+ y
492
+ ].concat(R)), typeof n < "u")
493
+ return n;
494
+ c && (l = l.slice(0, -1 * c * 2), v = v.slice(0, -1 * c), y = y.slice(0, -1 * c)), l.push(this.productions_[I[1]][0]), v.push(f.$), y.push(f._$), r = b[l[l.length - 2]][l[l.length - 1]], l.push(r);
495
+ break;
496
+ case 3:
497
+ return !0;
498
+ }
499
+ }
500
+ return !0;
501
+ }, "parse")
502
+ }, d = /* @__PURE__ */ function() {
503
+ var _ = {
504
+ EOF: 1,
505
+ parseError: /* @__PURE__ */ p(function(o, l) {
506
+ if (this.yy.parser)
507
+ this.yy.parser.parseError(o, l);
508
+ else
509
+ throw new Error(o);
510
+ }, "parseError"),
511
+ // resets the lexer, sets new input
512
+ setInput: /* @__PURE__ */ p(function(s, o) {
513
+ return this.yy = o || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
514
+ first_line: 1,
515
+ first_column: 0,
516
+ last_line: 1,
517
+ last_column: 0
518
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
519
+ }, "setInput"),
520
+ // consumes and returns one char from the input
521
+ input: /* @__PURE__ */ p(function() {
522
+ var s = this._input[0];
523
+ this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
524
+ var o = s.match(/(?:\r\n?|\n).*/g);
525
+ return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
526
+ }, "input"),
527
+ // unshifts one char (or a string) into the input
528
+ unput: /* @__PURE__ */ p(function(s) {
529
+ var o = s.length, l = s.split(/(?:\r\n?|\n)/g);
530
+ this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
531
+ var x = this.match.split(/(?:\r\n?|\n)/g);
532
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
533
+ var v = this.yylloc.range;
534
+ return this.yylloc = {
535
+ first_line: this.yylloc.first_line,
536
+ last_line: this.yylineno + 1,
537
+ first_column: this.yylloc.first_column,
538
+ last_column: l ? (l.length === x.length ? this.yylloc.first_column : 0) + x[x.length - l.length].length - l[0].length : this.yylloc.first_column - o
539
+ }, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
540
+ }, "unput"),
541
+ // When called from action, caches matched text and appends it on next action
542
+ more: /* @__PURE__ */ p(function() {
543
+ return this._more = !0, this;
544
+ }, "more"),
545
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
546
+ reject: /* @__PURE__ */ p(function() {
547
+ if (this.options.backtrack_lexer)
548
+ this._backtrack = !0;
549
+ else
550
+ return 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).
551
+ ` + this.showPosition(), {
552
+ text: "",
553
+ token: null,
554
+ line: this.yylineno
555
+ });
556
+ return this;
557
+ }, "reject"),
558
+ // retain first n characters of the match
559
+ less: /* @__PURE__ */ p(function(s) {
560
+ this.unput(this.match.slice(s));
561
+ }, "less"),
562
+ // displays already matched input, i.e. for error messages
563
+ pastInput: /* @__PURE__ */ p(function() {
564
+ var s = this.matched.substr(0, this.matched.length - this.match.length);
565
+ return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
566
+ }, "pastInput"),
567
+ // displays upcoming input, i.e. for error messages
568
+ upcomingInput: /* @__PURE__ */ p(function() {
569
+ var s = this.match;
570
+ return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
571
+ }, "upcomingInput"),
572
+ // displays the character position where the lexing error occurred, i.e. for error messages
573
+ showPosition: /* @__PURE__ */ p(function() {
574
+ var s = this.pastInput(), o = new Array(s.length + 1).join("-");
575
+ return s + this.upcomingInput() + `
576
+ ` + o + "^";
577
+ }, "showPosition"),
578
+ // test the lexed token: return FALSE when not a match, otherwise return token
579
+ test_match: /* @__PURE__ */ p(function(s, o) {
580
+ var l, x, v;
581
+ if (this.options.backtrack_lexer && (v = {
582
+ yylineno: this.yylineno,
583
+ yylloc: {
584
+ first_line: this.yylloc.first_line,
585
+ last_line: this.last_line,
586
+ first_column: this.yylloc.first_column,
587
+ last_column: this.yylloc.last_column
588
+ },
589
+ yytext: this.yytext,
590
+ match: this.match,
591
+ matches: this.matches,
592
+ matched: this.matched,
593
+ yyleng: this.yyleng,
594
+ offset: this.offset,
595
+ _more: this._more,
596
+ _input: this._input,
597
+ yy: this.yy,
598
+ conditionStack: this.conditionStack.slice(0),
599
+ done: this.done
600
+ }, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), x = s[0].match(/(?:\r\n?|\n).*/g), x && (this.yylineno += x.length), this.yylloc = {
601
+ first_line: this.yylloc.last_line,
602
+ last_line: this.yylineno + 1,
603
+ first_column: this.yylloc.last_column,
604
+ last_column: x ? x[x.length - 1].length - x[x.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
605
+ }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], l = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
606
+ return l;
607
+ if (this._backtrack) {
608
+ for (var y in v)
609
+ this[y] = v[y];
610
+ return !1;
611
+ }
612
+ return !1;
613
+ }, "test_match"),
614
+ // return next match in input
615
+ next: /* @__PURE__ */ p(function() {
616
+ if (this.done)
617
+ return this.EOF;
618
+ this._input || (this.done = !0);
619
+ var s, o, l, x;
620
+ this._more || (this.yytext = "", this.match = "");
621
+ for (var v = this._currentRules(), y = 0; y < v.length; y++)
622
+ if (l = this._input.match(this.rules[v[y]]), l && (!o || l[0].length > o[0].length)) {
623
+ if (o = l, x = y, this.options.backtrack_lexer) {
624
+ if (s = this.test_match(l, v[y]), s !== !1)
625
+ return s;
626
+ if (this._backtrack) {
627
+ o = !1;
628
+ continue;
629
+ } else
630
+ return !1;
631
+ } else if (!this.options.flex)
632
+ break;
633
+ }
634
+ return o ? (s = this.test_match(o, v[x]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
635
+ ` + this.showPosition(), {
636
+ text: "",
637
+ token: null,
638
+ line: this.yylineno
639
+ });
640
+ }, "next"),
641
+ // return next match that has a token
642
+ lex: /* @__PURE__ */ p(function() {
643
+ var o = this.next();
644
+ return o || this.lex();
645
+ }, "lex"),
646
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
647
+ begin: /* @__PURE__ */ p(function(o) {
648
+ this.conditionStack.push(o);
649
+ }, "begin"),
650
+ // pop the previously active lexer condition state off the condition stack
651
+ popState: /* @__PURE__ */ p(function() {
652
+ var o = this.conditionStack.length - 1;
653
+ return o > 0 ? this.conditionStack.pop() : this.conditionStack[0];
654
+ }, "popState"),
655
+ // produce the lexer rule set which is active for the currently active lexer condition state
656
+ _currentRules: /* @__PURE__ */ p(function() {
657
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
658
+ }, "_currentRules"),
659
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
660
+ topState: /* @__PURE__ */ p(function(o) {
661
+ return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
662
+ }, "topState"),
663
+ // alias for begin(condition)
664
+ pushState: /* @__PURE__ */ p(function(o) {
665
+ this.begin(o);
666
+ }, "pushState"),
667
+ // return the number of states currently on the stack
668
+ stateStackSize: /* @__PURE__ */ p(function() {
669
+ return this.conditionStack.length;
670
+ }, "stateStackSize"),
671
+ options: { "case-insensitive": !0 },
672
+ performAction: /* @__PURE__ */ p(function(o, l, x, v) {
673
+ switch (x) {
674
+ case 0:
675
+ return this.pushState("csv"), 4;
676
+ case 1:
677
+ return this.pushState("csv"), 4;
678
+ case 2:
679
+ return 10;
680
+ case 3:
681
+ return 5;
682
+ case 4:
683
+ return 12;
684
+ case 5:
685
+ return this.pushState("escaped_text"), 18;
686
+ case 6:
687
+ return 20;
688
+ case 7:
689
+ return this.popState("escaped_text"), 18;
690
+ case 8:
691
+ return 19;
692
+ }
693
+ }, "anonymous"),
694
+ rules: [/^(?:sankey-beta\b)/i, /^(?:sankey\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
695
+ conditions: { csv: { rules: [2, 3, 4, 5, 6, 7, 8], inclusive: !1 }, escaped_text: { rules: [7, 8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8], inclusive: !0 } }
696
+ };
697
+ return _;
698
+ }();
699
+ h.lexer = d;
700
+ function m() {
701
+ this.yy = {};
702
+ }
703
+ return p(m, "Parser"), m.prototype = h, h.Parser = m, new m();
704
+ }();
705
+ at.parser = at;
706
+ var K = at, J = [], tt = [], Z = /* @__PURE__ */ new Map(), Zt = /* @__PURE__ */ p(() => {
707
+ J = [], tt = [], Z = /* @__PURE__ */ new Map(), At();
708
+ }, "clear"), W, Jt = (W = class {
709
+ constructor(e, i, a = 0) {
710
+ this.source = e, this.target = i, this.value = a;
711
+ }
712
+ }, p(W, "SankeyLink"), W), te = /* @__PURE__ */ p((t, e, i) => {
713
+ J.push(new Jt(t, e, i));
714
+ }, "addLink"), U, ee = (U = class {
715
+ constructor(e) {
716
+ this.ID = e;
717
+ }
718
+ }, p(U, "SankeyNode"), U), ne = /* @__PURE__ */ p((t) => {
719
+ t = Tt.sanitizeText(t, lt());
720
+ let e = Z.get(t);
721
+ return e === void 0 && (e = new ee(t), Z.set(t, e), tt.push(e)), e;
722
+ }, "findOrCreateNode"), ie = /* @__PURE__ */ p(() => tt, "getNodes"), se = /* @__PURE__ */ p(() => J, "getLinks"), re = /* @__PURE__ */ p(() => ({
723
+ nodes: tt.map((t) => ({ id: t.ID })),
724
+ links: J.map((t) => ({
725
+ source: t.source.ID,
726
+ target: t.target.ID,
727
+ value: t.value
728
+ }))
729
+ }), "getGraph"), oe = {
730
+ nodesMap: Z,
731
+ getConfig: /* @__PURE__ */ p(() => lt().sankey, "getConfig"),
732
+ getNodes: ie,
733
+ getLinks: se,
734
+ getGraph: re,
735
+ addLink: te,
736
+ findOrCreateNode: ne,
737
+ getAccTitle: St,
738
+ setAccTitle: wt,
739
+ getAccDescription: bt,
740
+ setAccDescription: vt,
741
+ getDiagramTitle: xt,
742
+ setDiagramTitle: _t,
743
+ clear: Zt
744
+ }, j, gt = (j = class {
745
+ static next(e) {
746
+ return new j(e + ++j.count);
747
+ }
748
+ constructor(e) {
749
+ this.id = e, this.href = `#${e}`;
750
+ }
751
+ toString() {
752
+ return "url(" + this.href + ")";
753
+ }
754
+ }, p(j, "Uid"), j.count = 0, j), ae = {
755
+ left: Ct,
756
+ right: Ot,
757
+ center: zt,
758
+ justify: mt
759
+ }, le = /* @__PURE__ */ p(function(t, e, i, a) {
760
+ const { securityLevel: h, sankey: d } = lt(), m = Lt.sankey;
761
+ let _;
762
+ h === "sandbox" && (_ = H("#i" + e));
763
+ const s = h === "sandbox" ? H(_.nodes()[0].contentDocument.body) : H("body"), o = h === "sandbox" ? s.select(`[id="${e}"]`) : H(`[id="${e}"]`), l = (d == null ? void 0 : d.width) ?? m.width, x = (d == null ? void 0 : d.height) ?? m.width, v = (d == null ? void 0 : d.useMaxWidth) ?? m.useMaxWidth, y = (d == null ? void 0 : d.nodeAlignment) ?? m.nodeAlignment, b = (d == null ? void 0 : d.prefix) ?? m.prefix, M = (d == null ? void 0 : d.suffix) ?? m.suffix, T = (d == null ? void 0 : d.showValues) ?? m.showValues, N = a.db.getGraph(), C = ae[y];
764
+ Bt().nodeId((g) => g.id).nodeWidth(10).nodePadding(10 + (T ? 15 : 0)).nodeAlign(C).extent([
765
+ [0, 0],
766
+ [l, x]
767
+ ])(N);
768
+ const S = Mt(It);
769
+ o.append("g").attr("class", "nodes").selectAll(".node").data(N.nodes).join("g").attr("class", "node").attr("id", (g) => (g.uid = gt.next("node-")).id).attr("transform", function(g) {
770
+ return "translate(" + g.x0 + "," + g.y0 + ")";
771
+ }).attr("x", (g) => g.x0).attr("y", (g) => g.y0).append("rect").attr("height", (g) => g.y1 - g.y0).attr("width", (g) => g.x1 - g.x0).attr("fill", (g) => S(g.id));
772
+ const P = /* @__PURE__ */ p(({ id: g, value: E }) => T ? `${g}
773
+ ${b}${Math.round(E * 100) / 100}${M}` : g, "getText");
774
+ o.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(N.nodes).join("text").attr("x", (g) => g.x0 < l / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", `${T ? "0" : "0.35"}em`).attr("text-anchor", (g) => g.x0 < l / 2 ? "start" : "end").text(P);
775
+ const B = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(N.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), O = (d == null ? void 0 : d.linkColor) ?? "gradient";
776
+ if (O === "gradient") {
777
+ const g = B.append("linearGradient").attr("id", (E) => (E.uid = gt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (E) => E.source.x1).attr("x2", (E) => E.target.x0);
778
+ g.append("stop").attr("offset", "0%").attr("stop-color", (E) => S(E.source.id)), g.append("stop").attr("offset", "100%").attr("stop-color", (E) => S(E.target.id));
779
+ }
780
+ let z;
781
+ switch (O) {
782
+ case "gradient":
783
+ z = /* @__PURE__ */ p((g) => g.uid, "coloring");
784
+ break;
785
+ case "source":
786
+ z = /* @__PURE__ */ p((g) => S(g.source.id), "coloring");
787
+ break;
788
+ case "target":
789
+ z = /* @__PURE__ */ p((g) => S(g.target.id), "coloring");
790
+ break;
791
+ default:
792
+ z = O;
793
+ }
794
+ B.append("path").attr("d", Kt()).attr("stroke", z).attr("stroke-width", (g) => Math.max(1, g.width)), Et(void 0, o, 0, v);
795
+ }, "draw"), ce = {
796
+ draw: le
797
+ }, ue = /* @__PURE__ */ p((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
798
+ `).trim(), "prepareTextForParsing"), he = /* @__PURE__ */ p((t) => `.label {
799
+ font-family: ${t.fontFamily};
800
+ }`, "getStyles"), fe = he, ye = K.parse.bind(K);
801
+ K.parse = (t) => ye(ue(t));
802
+ var pe = {
803
+ styles: fe,
804
+ parser: K,
805
+ db: oe,
806
+ renderer: ce
807
+ };
808
+ export {
809
+ pe as diagram
810
+ };
src/backend/gradio_dropdownplus/templates/component/sequenceDiagram-4MX5Z3NR-B4PDpSYW.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/stateDiagram-UUKSUZ4H-Ca5vxZdh.js ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { s as G, a as W, S as N } from "./chunk-LXBSTHXV-CNtjhS2l.js";
2
+ import { _ as f, c as t, d as H, l as S, e as P, k as z, R as _, S as U, O as C, u as F } from "./mermaid.core-DH6TRyjK.js";
3
+ import { G as O } from "./graph-Ngrd9eu7.js";
4
+ import { l as J } from "./layout-C7Nz_rwh.js";
5
+ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), D = /* @__PURE__ */ f((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), Y = /* @__PURE__ */ f((e, i) => {
6
+ const d = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = d.node().getBBox();
7
+ return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), d;
8
+ }, "drawSimpleState"), I = /* @__PURE__ */ f((e, i) => {
9
+ const d = /* @__PURE__ */ f(function(g, m, B) {
10
+ const E = g.append("tspan").attr("x", 2 * t().state.padding).text(m);
11
+ B || E.attr("dy", t().state.textHeight);
12
+ }, "addTspan"), n = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 1.3 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), l = n.height, x = e.append("text").attr("x", t().state.padding).attr(
13
+ "y",
14
+ l + t().state.padding * 0.4 + t().state.dividerMargin + t().state.textHeight
15
+ ).attr("class", "state-description");
16
+ let a = !0, s = !0;
17
+ i.descriptions.forEach(function(g) {
18
+ a || (d(x, g, s), s = !1), a = !1;
19
+ });
20
+ const w = e.append("line").attr("x1", t().state.padding).attr("y1", t().state.padding + l + t().state.dividerMargin / 2).attr("y2", t().state.padding + l + t().state.dividerMargin / 2).attr("class", "descr-divider"), p = x.node().getBBox(), o = Math.max(p.width, n.width);
21
+ return w.attr("x2", o + 3 * t().state.padding), e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", o + 2 * t().state.padding).attr("height", p.height + l + 2 * t().state.padding).attr("rx", t().state.radius), e;
22
+ }, "drawDescrState"), $ = /* @__PURE__ */ f((e, i, d) => {
23
+ const c = t().state.padding, n = 2 * t().state.padding, l = e.node().getBBox(), x = l.width, a = l.x, s = e.append("text").attr("x", 0).attr("y", t().state.titleShift).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), p = s.node().getBBox().width + n;
24
+ let o = Math.max(p, x);
25
+ o === x && (o = o + n);
26
+ let g;
27
+ const m = e.node().getBBox();
28
+ i.doc, g = a - c, p > x && (g = (x - o) / 2 + c), Math.abs(a - m.x) < c && p > x && (g = a - (p - x) / 2);
29
+ const B = 1 - t().state.textHeight;
30
+ return e.insert("rect", ":first-child").attr("x", g).attr("y", B).attr("class", d ? "alt-composit" : "composit").attr("width", o).attr(
31
+ "height",
32
+ m.height + t().state.textHeight + t().state.titleShift + 1
33
+ ).attr("rx", "0"), s.attr("x", g + c), p <= x && s.attr("x", a + (o - n) / 2 - p / 2 + c), e.insert("rect", ":first-child").attr("x", g).attr(
34
+ "y",
35
+ t().state.titleShift - t().state.textHeight - t().state.padding
36
+ ).attr("width", o).attr("height", t().state.textHeight * 3).attr("rx", t().state.radius), e.insert("rect", ":first-child").attr("x", g).attr(
37
+ "y",
38
+ t().state.titleShift - t().state.textHeight - t().state.padding
39
+ ).attr("width", o).attr("height", m.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e;
40
+ }, "addTitleAndBox"), q = /* @__PURE__ */ f((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
41
+ "cx",
42
+ t().state.padding + t().state.sizeUnit + t().state.miniPadding
43
+ ).attr(
44
+ "cy",
45
+ t().state.padding + t().state.sizeUnit + t().state.miniPadding
46
+ ), e.append("circle").attr("class", "end-state-inner").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit + 2).attr("cy", t().state.padding + t().state.sizeUnit + 2)), "drawEndState"), Z = /* @__PURE__ */ f((e, i) => {
47
+ let d = t().state.forkWidth, c = t().state.forkHeight;
48
+ if (i.parentId) {
49
+ let n = d;
50
+ d = c, c = n;
51
+ }
52
+ return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", d).attr("height", c).attr("x", t().state.padding).attr("y", t().state.padding);
53
+ }, "drawForkJoinState"), j = /* @__PURE__ */ f((e, i, d, c) => {
54
+ let n = 0;
55
+ const l = c.append("text");
56
+ l.style("text-anchor", "start"), l.attr("class", "noteText");
57
+ let x = e.replace(/\r\n/g, "<br/>");
58
+ x = x.replace(/\n/g, "<br/>");
59
+ const a = x.split(z.lineBreakRegex);
60
+ let s = 1.25 * t().state.noteMargin;
61
+ for (const w of a) {
62
+ const p = w.trim();
63
+ if (p.length > 0) {
64
+ const o = l.append("tspan");
65
+ if (o.text(p), s === 0) {
66
+ const g = o.node().getBBox();
67
+ s += g.height;
68
+ }
69
+ n += s, o.attr("x", i + t().state.noteMargin), o.attr("y", d + n + 1.25 * t().state.noteMargin);
70
+ }
71
+ }
72
+ return { textWidth: l.node().getBBox().width, textHeight: n };
73
+ }, "_drawLongText"), K = /* @__PURE__ */ f((e, i) => {
74
+ i.attr("class", "state-note");
75
+ const d = i.append("rect").attr("x", 0).attr("y", t().state.padding), c = i.append("g"), { textWidth: n, textHeight: l } = j(e, 0, 0, c);
76
+ return d.attr("height", l + 2 * t().state.noteMargin), d.attr("width", n + t().state.noteMargin * 2), d;
77
+ }, "drawNote"), L = /* @__PURE__ */ f(function(e, i) {
78
+ const d = i.id, c = {
79
+ id: d,
80
+ label: i.id,
81
+ width: 0,
82
+ height: 0
83
+ }, n = e.append("g").attr("id", d).attr("class", "stateGroup");
84
+ i.type === "start" && X(n), i.type === "end" && q(n), (i.type === "fork" || i.type === "join") && Z(n, i), i.type === "note" && K(i.note.text, n), i.type === "divider" && D(n), i.type === "default" && i.descriptions.length === 0 && Y(n, i), i.type === "default" && i.descriptions.length > 0 && I(n, i);
85
+ const l = n.node().getBBox();
86
+ return c.width = l.width + 2 * t().state.padding, c.height = l.height + 2 * t().state.padding, c;
87
+ }, "drawState"), R = 0, Q = /* @__PURE__ */ f(function(e, i, d) {
88
+ const c = /* @__PURE__ */ f(function(s) {
89
+ switch (s) {
90
+ case N.relationType.AGGREGATION:
91
+ return "aggregation";
92
+ case N.relationType.EXTENSION:
93
+ return "extension";
94
+ case N.relationType.COMPOSITION:
95
+ return "composition";
96
+ case N.relationType.DEPENDENCY:
97
+ return "dependency";
98
+ }
99
+ }, "getRelationType");
100
+ i.points = i.points.filter((s) => !Number.isNaN(s.y));
101
+ const n = i.points, l = _().x(function(s) {
102
+ return s.x;
103
+ }).y(function(s) {
104
+ return s.y;
105
+ }).curve(U), x = e.append("path").attr("d", l(n)).attr("id", "edge" + R).attr("class", "transition");
106
+ let a = "";
107
+ if (t().state.arrowMarkerAbsolute && (a = C(!0)), x.attr(
108
+ "marker-end",
109
+ "url(" + a + "#" + c(N.relationType.DEPENDENCY) + "End)"
110
+ ), d.title !== void 0) {
111
+ const s = e.append("g").attr("class", "stateLabel"), { x: w, y: p } = F.calcLabelPosition(i.points), o = z.getRows(d.title);
112
+ let g = 0;
113
+ const m = [];
114
+ let B = 0, E = 0;
115
+ for (let u = 0; u <= o.length; u++) {
116
+ const h = s.append("text").attr("text-anchor", "middle").text(o[u]).attr("x", w).attr("y", p + g), y = h.node().getBBox();
117
+ B = Math.max(B, y.width), E = Math.min(E, y.x), S.info(y.x, w, p + g), g === 0 && (g = h.node().getBBox().height, S.info("Title height", g, p)), m.push(h);
118
+ }
119
+ let k = g * o.length;
120
+ if (o.length > 1) {
121
+ const u = (o.length - 1) * g * 0.5;
122
+ m.forEach((h, y) => h.attr("y", p + y * g - u)), k = g * o.length;
123
+ }
124
+ const r = s.node().getBBox();
125
+ s.insert("rect", ":first-child").attr("class", "box").attr("x", w - B / 2 - t().state.padding / 2).attr("y", p - k / 2 - t().state.padding / 2 - 3.5).attr("width", B + t().state.padding).attr("height", k + t().state.padding), S.info(r);
126
+ }
127
+ R++;
128
+ }, "drawEdge"), b, T = {}, V = /* @__PURE__ */ f(function() {
129
+ }, "setConf"), tt = /* @__PURE__ */ f(function(e) {
130
+ e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
131
+ }, "insertMarkers"), et = /* @__PURE__ */ f(function(e, i, d, c) {
132
+ b = t().state;
133
+ const n = t().securityLevel;
134
+ let l;
135
+ n === "sandbox" && (l = H("#i" + i));
136
+ const x = n === "sandbox" ? H(l.nodes()[0].contentDocument.body) : H("body"), a = n === "sandbox" ? l.nodes()[0].contentDocument : document;
137
+ S.debug("Rendering diagram " + e);
138
+ const s = x.select(`[id='${i}']`);
139
+ tt(s);
140
+ const w = c.db.getRootDoc();
141
+ A(w, s, void 0, !1, x, a, c);
142
+ const p = b.padding, o = s.node().getBBox(), g = o.width + p * 2, m = o.height + p * 2, B = g * 1.75;
143
+ P(s, m, B, b.useMaxWidth), s.attr(
144
+ "viewBox",
145
+ `${o.x - b.padding} ${o.y - b.padding} ` + g + " " + m
146
+ );
147
+ }, "draw"), at = /* @__PURE__ */ f((e) => e ? e.length * b.fontSizeFactor : 1, "getLabelWidth"), A = /* @__PURE__ */ f((e, i, d, c, n, l, x) => {
148
+ const a = new O({
149
+ compound: !0,
150
+ multigraph: !0
151
+ });
152
+ let s, w = !0;
153
+ for (s = 0; s < e.length; s++)
154
+ if (e[s].stmt === "relation") {
155
+ w = !1;
156
+ break;
157
+ }
158
+ d ? a.setGraph({
159
+ rankdir: "LR",
160
+ multigraph: !0,
161
+ compound: !0,
162
+ // acyclicer: 'greedy',
163
+ ranker: "tight-tree",
164
+ ranksep: w ? 1 : b.edgeLengthFactor,
165
+ nodeSep: w ? 1 : 50,
166
+ isMultiGraph: !0
167
+ // ranksep: 5,
168
+ // nodesep: 1
169
+ }) : a.setGraph({
170
+ rankdir: "TB",
171
+ multigraph: !0,
172
+ compound: !0,
173
+ // isCompound: true,
174
+ // acyclicer: 'greedy',
175
+ // ranker: 'longest-path'
176
+ ranksep: w ? 1 : b.edgeLengthFactor,
177
+ nodeSep: w ? 1 : 50,
178
+ ranker: "tight-tree",
179
+ // ranker: 'network-simplex'
180
+ isMultiGraph: !0
181
+ }), a.setDefaultEdgeLabel(function() {
182
+ return {};
183
+ });
184
+ const p = x.db.getStates(), o = x.db.getRelations(), g = Object.keys(p);
185
+ for (const r of g) {
186
+ const u = p[r];
187
+ d && (u.parentId = d);
188
+ let h;
189
+ if (u.doc) {
190
+ let y = i.append("g").attr("id", u.id).attr("class", "stateGroup");
191
+ h = A(u.doc, y, u.id, !c, n, l, x);
192
+ {
193
+ y = $(y, u, c);
194
+ let v = y.node().getBBox();
195
+ h.width = v.width, h.height = v.height + b.padding / 2, T[u.id] = { y: b.compositTitleSize };
196
+ }
197
+ } else
198
+ h = L(i, u, a);
199
+ if (u.note) {
200
+ const y = {
201
+ descriptions: [],
202
+ id: u.id + "-note",
203
+ note: u.note,
204
+ type: "note"
205
+ }, v = L(i, y, a);
206
+ u.note.position === "left of" ? (a.setNode(h.id + "-note", v), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", v)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
207
+ } else
208
+ a.setNode(h.id, h);
209
+ }
210
+ S.debug("Count=", a.nodeCount(), a);
211
+ let m = 0;
212
+ o.forEach(function(r) {
213
+ m++, S.debug("Setting edge", r), a.setEdge(
214
+ r.id1,
215
+ r.id2,
216
+ {
217
+ relation: r,
218
+ width: at(r.title),
219
+ height: b.labelHeight * z.getRows(r.title).length,
220
+ labelpos: "c"
221
+ },
222
+ "id" + m
223
+ );
224
+ }), J(a), S.debug("Graph after layout", a.nodes());
225
+ const B = i.node();
226
+ a.nodes().forEach(function(r) {
227
+ r !== void 0 && a.node(r) !== void 0 ? (S.warn("Node " + r + ": " + JSON.stringify(a.node(r))), n.select("#" + B.id + " #" + r).attr(
228
+ "transform",
229
+ "translate(" + (a.node(r).x - a.node(r).width / 2) + "," + (a.node(r).y + (T[r] ? T[r].y : 0) - a.node(r).height / 2) + " )"
230
+ ), n.select("#" + B.id + " #" + r).attr("data-x-shift", a.node(r).x - a.node(r).width / 2), l.querySelectorAll("#" + B.id + " #" + r + " .divider").forEach((h) => {
231
+ const y = h.parentElement;
232
+ let v = 0, M = 0;
233
+ y && (y.parentElement && (v = y.parentElement.getBBox().width), M = parseInt(y.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", v - M - 8);
234
+ })) : S.debug("No Node " + r + ": " + JSON.stringify(a.node(r)));
235
+ });
236
+ let E = B.getBBox();
237
+ a.edges().forEach(function(r) {
238
+ r !== void 0 && a.edge(r) !== void 0 && (S.debug("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(a.edge(r))), Q(i, a.edge(r), a.edge(r).relation));
239
+ }), E = B.getBBox();
240
+ const k = {
241
+ id: d || "root",
242
+ label: d || "root",
243
+ width: 0,
244
+ height: 0
245
+ };
246
+ return k.width = E.width + 2 * b.padding, k.height = E.height + 2 * b.padding, S.debug("Doc rendered", k, a), k;
247
+ }, "renderDoc"), it = {
248
+ setConf: V,
249
+ draw: et
250
+ }, ot = {
251
+ parser: W,
252
+ get db() {
253
+ return new N(1);
254
+ },
255
+ renderer: it,
256
+ styles: G,
257
+ init: /* @__PURE__ */ f((e) => {
258
+ e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
259
+ }, "init")
260
+ };
261
+ export {
262
+ ot as diagram
263
+ };
src/backend/gradio_dropdownplus/templates/component/stateDiagram-v2-EYPG3UTE-CVroge-A.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { s as a, b as t, a as r, S as s } from "./chunk-LXBSTHXV-CNtjhS2l.js";
2
+ import { _ as i } from "./mermaid.core-DH6TRyjK.js";
3
+ var _ = {
4
+ parser: r,
5
+ get db() {
6
+ return new s(2);
7
+ },
8
+ renderer: t,
9
+ styles: a,
10
+ init: /* @__PURE__ */ i((e) => {
11
+ e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
12
+ }, "init")
13
+ };
14
+ export {
15
+ _ as diagram
16
+ };
src/backend/gradio_dropdownplus/templates/component/style.css CHANGED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/timeline-definition-3HZDQTIS-CzrghR2L.js ADDED
@@ -0,0 +1,801 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as s, c as xt, l as E, d as q, V as kt, W as vt, X as _t, Y as bt, B as wt, $ as St, y as Et } from "./mermaid.core-DH6TRyjK.js";
2
+ import { d as nt } from "./arc-Bt6Yqp6j.js";
3
+ var X = function() {
4
+ var n = /* @__PURE__ */ s(function(f, r, a, h) {
5
+ for (a = a || {}, h = f.length; h--; a[f[h]] = r) ;
6
+ return a;
7
+ }, "o"), t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], l = [1, 10], i = [1, 11], d = [1, 12], c = [1, 13], g = [1, 16], m = [1, 17], p = {
8
+ trace: /* @__PURE__ */ s(function() {
9
+ }, "trace"),
10
+ yy: {},
11
+ symbols_: { error: 2, start: 3, timeline: 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, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 },
12
+ terminals_: { 2: "error", 4: "timeline", 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", 20: "period", 21: "event" },
13
+ 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, 1], [9, 1], [18, 1], [19, 1]],
14
+ performAction: /* @__PURE__ */ s(function(r, a, h, u, y, o, S) {
15
+ var k = o.length - 1;
16
+ switch (y) {
17
+ case 1:
18
+ return o[k - 1];
19
+ case 2:
20
+ this.$ = [];
21
+ break;
22
+ case 3:
23
+ o[k - 1].push(o[k]), this.$ = o[k - 1];
24
+ break;
25
+ case 4:
26
+ case 5:
27
+ this.$ = o[k];
28
+ break;
29
+ case 6:
30
+ case 7:
31
+ this.$ = [];
32
+ break;
33
+ case 8:
34
+ u.getCommonDb().setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
35
+ break;
36
+ case 9:
37
+ this.$ = o[k].trim(), u.getCommonDb().setAccTitle(this.$);
38
+ break;
39
+ case 10:
40
+ case 11:
41
+ this.$ = o[k].trim(), u.getCommonDb().setAccDescription(this.$);
42
+ break;
43
+ case 12:
44
+ u.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
45
+ break;
46
+ case 15:
47
+ u.addTask(o[k], 0, ""), this.$ = o[k];
48
+ break;
49
+ case 16:
50
+ u.addEvent(o[k].substr(2)), this.$ = o[k];
51
+ break;
52
+ }
53
+ }, "anonymous"),
54
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: l, 14: i, 16: d, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: l, 14: i, 16: d, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])],
55
+ defaultActions: {},
56
+ parseError: /* @__PURE__ */ s(function(r, a) {
57
+ if (a.recoverable)
58
+ this.trace(r);
59
+ else {
60
+ var h = new Error(r);
61
+ throw h.hash = a, h;
62
+ }
63
+ }, "parseError"),
64
+ parse: /* @__PURE__ */ s(function(r) {
65
+ var a = this, h = [0], u = [], y = [null], o = [], S = this.table, k = "", $ = 0, C = 0, B = 2, J = 1, O = o.slice.call(arguments, 1), v = Object.create(this.lexer), N = { yy: {} };
66
+ for (var L in this.yy)
67
+ Object.prototype.hasOwnProperty.call(this.yy, L) && (N.yy[L] = this.yy[L]);
68
+ v.setInput(r, N.yy), N.yy.lexer = v, N.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
69
+ var b = v.yylloc;
70
+ o.push(b);
71
+ var M = v.options && v.options.ranges;
72
+ typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
73
+ function R(T) {
74
+ h.length = h.length - 2 * T, y.length = y.length - T, o.length = o.length - T;
75
+ }
76
+ s(R, "popStack");
77
+ function A() {
78
+ var T;
79
+ return T = u.pop() || v.lex() || J, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = a.symbols_[T] || T), T;
80
+ }
81
+ s(A, "lex");
82
+ for (var w, H, I, K, V = {}, j, P, et, G; ; ) {
83
+ if (H = h[h.length - 1], this.defaultActions[H] ? I = this.defaultActions[H] : ((w === null || typeof w > "u") && (w = A()), I = S[H] && S[H][w]), typeof I > "u" || !I.length || !I[0]) {
84
+ var Q = "";
85
+ G = [];
86
+ for (j in S[H])
87
+ this.terminals_[j] && j > B && G.push("'" + this.terminals_[j] + "'");
88
+ v.showPosition ? Q = "Parse error on line " + ($ + 1) + `:
89
+ ` + v.showPosition() + `
90
+ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "Parse error on line " + ($ + 1) + ": Unexpected " + (w == J ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Q, {
91
+ text: v.match,
92
+ token: this.terminals_[w] || w,
93
+ line: v.yylineno,
94
+ loc: b,
95
+ expected: G
96
+ });
97
+ }
98
+ if (I[0] instanceof Array && I.length > 1)
99
+ throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + w);
100
+ switch (I[0]) {
101
+ case 1:
102
+ h.push(w), y.push(v.yytext), o.push(v.yylloc), h.push(I[1]), w = null, C = v.yyleng, k = v.yytext, $ = v.yylineno, b = v.yylloc;
103
+ break;
104
+ case 2:
105
+ if (P = this.productions_[I[1]][1], V.$ = y[y.length - P], V._$ = {
106
+ first_line: o[o.length - (P || 1)].first_line,
107
+ last_line: o[o.length - 1].last_line,
108
+ first_column: o[o.length - (P || 1)].first_column,
109
+ last_column: o[o.length - 1].last_column
110
+ }, M && (V._$.range = [
111
+ o[o.length - (P || 1)].range[0],
112
+ o[o.length - 1].range[1]
113
+ ]), K = this.performAction.apply(V, [
114
+ k,
115
+ C,
116
+ $,
117
+ N.yy,
118
+ I[1],
119
+ y,
120
+ o
121
+ ].concat(O)), typeof K < "u")
122
+ return K;
123
+ P && (h = h.slice(0, -1 * P * 2), y = y.slice(0, -1 * P), o = o.slice(0, -1 * P)), h.push(this.productions_[I[1]][0]), y.push(V.$), o.push(V._$), et = S[h[h.length - 2]][h[h.length - 1]], h.push(et);
124
+ break;
125
+ case 3:
126
+ return !0;
127
+ }
128
+ }
129
+ return !0;
130
+ }, "parse")
131
+ }, x = /* @__PURE__ */ function() {
132
+ var f = {
133
+ EOF: 1,
134
+ parseError: /* @__PURE__ */ s(function(a, h) {
135
+ if (this.yy.parser)
136
+ this.yy.parser.parseError(a, h);
137
+ else
138
+ throw new Error(a);
139
+ }, "parseError"),
140
+ // resets the lexer, sets new input
141
+ setInput: /* @__PURE__ */ s(function(r, a) {
142
+ return this.yy = a || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
143
+ first_line: 1,
144
+ first_column: 0,
145
+ last_line: 1,
146
+ last_column: 0
147
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
148
+ }, "setInput"),
149
+ // consumes and returns one char from the input
150
+ input: /* @__PURE__ */ s(function() {
151
+ var r = this._input[0];
152
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
153
+ var a = r.match(/(?:\r\n?|\n).*/g);
154
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
155
+ }, "input"),
156
+ // unshifts one char (or a string) into the input
157
+ unput: /* @__PURE__ */ s(function(r) {
158
+ var a = r.length, h = r.split(/(?:\r\n?|\n)/g);
159
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
160
+ var u = this.match.split(/(?:\r\n?|\n)/g);
161
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1);
162
+ var y = this.yylloc.range;
163
+ return this.yylloc = {
164
+ first_line: this.yylloc.first_line,
165
+ last_line: this.yylineno + 1,
166
+ first_column: this.yylloc.first_column,
167
+ last_column: h ? (h.length === u.length ? this.yylloc.first_column : 0) + u[u.length - h.length].length - h[0].length : this.yylloc.first_column - a
168
+ }, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
169
+ }, "unput"),
170
+ // When called from action, caches matched text and appends it on next action
171
+ more: /* @__PURE__ */ s(function() {
172
+ return this._more = !0, this;
173
+ }, "more"),
174
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
175
+ reject: /* @__PURE__ */ s(function() {
176
+ if (this.options.backtrack_lexer)
177
+ this._backtrack = !0;
178
+ else
179
+ return 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).
180
+ ` + this.showPosition(), {
181
+ text: "",
182
+ token: null,
183
+ line: this.yylineno
184
+ });
185
+ return this;
186
+ }, "reject"),
187
+ // retain first n characters of the match
188
+ less: /* @__PURE__ */ s(function(r) {
189
+ this.unput(this.match.slice(r));
190
+ }, "less"),
191
+ // displays already matched input, i.e. for error messages
192
+ pastInput: /* @__PURE__ */ s(function() {
193
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
194
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
195
+ }, "pastInput"),
196
+ // displays upcoming input, i.e. for error messages
197
+ upcomingInput: /* @__PURE__ */ s(function() {
198
+ var r = this.match;
199
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
200
+ }, "upcomingInput"),
201
+ // displays the character position where the lexing error occurred, i.e. for error messages
202
+ showPosition: /* @__PURE__ */ s(function() {
203
+ var r = this.pastInput(), a = new Array(r.length + 1).join("-");
204
+ return r + this.upcomingInput() + `
205
+ ` + a + "^";
206
+ }, "showPosition"),
207
+ // test the lexed token: return FALSE when not a match, otherwise return token
208
+ test_match: /* @__PURE__ */ s(function(r, a) {
209
+ var h, u, y;
210
+ if (this.options.backtrack_lexer && (y = {
211
+ yylineno: this.yylineno,
212
+ yylloc: {
213
+ first_line: this.yylloc.first_line,
214
+ last_line: this.last_line,
215
+ first_column: this.yylloc.first_column,
216
+ last_column: this.yylloc.last_column
217
+ },
218
+ yytext: this.yytext,
219
+ match: this.match,
220
+ matches: this.matches,
221
+ matched: this.matched,
222
+ yyleng: this.yyleng,
223
+ offset: this.offset,
224
+ _more: this._more,
225
+ _input: this._input,
226
+ yy: this.yy,
227
+ conditionStack: this.conditionStack.slice(0),
228
+ done: this.done
229
+ }, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), u = r[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
230
+ first_line: this.yylloc.last_line,
231
+ last_line: this.yylineno + 1,
232
+ first_column: this.yylloc.last_column,
233
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
234
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], h = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
235
+ return h;
236
+ if (this._backtrack) {
237
+ for (var o in y)
238
+ this[o] = y[o];
239
+ return !1;
240
+ }
241
+ return !1;
242
+ }, "test_match"),
243
+ // return next match in input
244
+ next: /* @__PURE__ */ s(function() {
245
+ if (this.done)
246
+ return this.EOF;
247
+ this._input || (this.done = !0);
248
+ var r, a, h, u;
249
+ this._more || (this.yytext = "", this.match = "");
250
+ for (var y = this._currentRules(), o = 0; o < y.length; o++)
251
+ if (h = this._input.match(this.rules[y[o]]), h && (!a || h[0].length > a[0].length)) {
252
+ if (a = h, u = o, this.options.backtrack_lexer) {
253
+ if (r = this.test_match(h, y[o]), r !== !1)
254
+ return r;
255
+ if (this._backtrack) {
256
+ a = !1;
257
+ continue;
258
+ } else
259
+ return !1;
260
+ } else if (!this.options.flex)
261
+ break;
262
+ }
263
+ return a ? (r = this.test_match(a, y[u]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
264
+ ` + this.showPosition(), {
265
+ text: "",
266
+ token: null,
267
+ line: this.yylineno
268
+ });
269
+ }, "next"),
270
+ // return next match that has a token
271
+ lex: /* @__PURE__ */ s(function() {
272
+ var a = this.next();
273
+ return a || this.lex();
274
+ }, "lex"),
275
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
276
+ begin: /* @__PURE__ */ s(function(a) {
277
+ this.conditionStack.push(a);
278
+ }, "begin"),
279
+ // pop the previously active lexer condition state off the condition stack
280
+ popState: /* @__PURE__ */ s(function() {
281
+ var a = this.conditionStack.length - 1;
282
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
283
+ }, "popState"),
284
+ // produce the lexer rule set which is active for the currently active lexer condition state
285
+ _currentRules: /* @__PURE__ */ s(function() {
286
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
287
+ }, "_currentRules"),
288
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
289
+ topState: /* @__PURE__ */ s(function(a) {
290
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
291
+ }, "topState"),
292
+ // alias for begin(condition)
293
+ pushState: /* @__PURE__ */ s(function(a) {
294
+ this.begin(a);
295
+ }, "pushState"),
296
+ // return the number of states currently on the stack
297
+ stateStackSize: /* @__PURE__ */ s(function() {
298
+ return this.conditionStack.length;
299
+ }, "stateStackSize"),
300
+ options: { "case-insensitive": !0 },
301
+ performAction: /* @__PURE__ */ s(function(a, h, u, y) {
302
+ switch (u) {
303
+ case 0:
304
+ break;
305
+ case 1:
306
+ break;
307
+ case 2:
308
+ return 10;
309
+ case 3:
310
+ break;
311
+ case 4:
312
+ break;
313
+ case 5:
314
+ return 4;
315
+ case 6:
316
+ return 11;
317
+ case 7:
318
+ return this.begin("acc_title"), 12;
319
+ case 8:
320
+ return this.popState(), "acc_title_value";
321
+ case 9:
322
+ return this.begin("acc_descr"), 14;
323
+ case 10:
324
+ return this.popState(), "acc_descr_value";
325
+ case 11:
326
+ this.begin("acc_descr_multiline");
327
+ break;
328
+ case 12:
329
+ this.popState();
330
+ break;
331
+ case 13:
332
+ return "acc_descr_multiline_value";
333
+ case 14:
334
+ return 17;
335
+ case 15:
336
+ return 21;
337
+ case 16:
338
+ return 20;
339
+ case 17:
340
+ return 6;
341
+ case 18:
342
+ return "INVALID";
343
+ }
344
+ }, "anonymous"),
345
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\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, /^(?::\s(?:[^:\n]|:(?!\s))+)/i, /^(?:[^#:\n]+)/i, /^(?:$)/i, /^(?:.)/i],
346
+ 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], inclusive: !0 } }
347
+ };
348
+ return f;
349
+ }();
350
+ p.lexer = x;
351
+ function _() {
352
+ this.yy = {};
353
+ }
354
+ return s(_, "Parser"), _.prototype = p, p.Parser = _, new _();
355
+ }();
356
+ X.parser = X;
357
+ var Tt = X, at = {};
358
+ wt(at, {
359
+ addEvent: () => yt,
360
+ addSection: () => ht,
361
+ addTask: () => pt,
362
+ addTaskOrg: () => gt,
363
+ clear: () => ct,
364
+ default: () => It,
365
+ getCommonDb: () => ot,
366
+ getSections: () => dt,
367
+ getTasks: () => ut
368
+ });
369
+ var W = "", lt = 0, Y = [], U = [], z = [], ot = /* @__PURE__ */ s(() => St, "getCommonDb"), ct = /* @__PURE__ */ s(function() {
370
+ Y.length = 0, U.length = 0, W = "", z.length = 0, Et();
371
+ }, "clear"), ht = /* @__PURE__ */ s(function(n) {
372
+ W = n, Y.push(n);
373
+ }, "addSection"), dt = /* @__PURE__ */ s(function() {
374
+ return Y;
375
+ }, "getSections"), ut = /* @__PURE__ */ s(function() {
376
+ let n = it();
377
+ const t = 100;
378
+ let e = 0;
379
+ for (; !n && e < t; )
380
+ n = it(), e++;
381
+ return U.push(...z), U;
382
+ }, "getTasks"), pt = /* @__PURE__ */ s(function(n, t, e) {
383
+ const l = {
384
+ id: lt++,
385
+ section: W,
386
+ type: W,
387
+ task: n,
388
+ score: t || 0,
389
+ //if event is defined, then add it the events array
390
+ events: e ? [e] : []
391
+ };
392
+ z.push(l);
393
+ }, "addTask"), yt = /* @__PURE__ */ s(function(n) {
394
+ z.find((e) => e.id === lt - 1).events.push(n);
395
+ }, "addEvent"), gt = /* @__PURE__ */ s(function(n) {
396
+ const t = {
397
+ section: W,
398
+ type: W,
399
+ description: n,
400
+ task: n,
401
+ classes: []
402
+ };
403
+ U.push(t);
404
+ }, "addTaskOrg"), it = /* @__PURE__ */ s(function() {
405
+ const n = /* @__PURE__ */ s(function(e) {
406
+ return z[e].processed;
407
+ }, "compileTask");
408
+ let t = !0;
409
+ for (const [e, l] of z.entries())
410
+ n(e), t = t && l.processed;
411
+ return t;
412
+ }, "compileTasks"), It = {
413
+ clear: ct,
414
+ getCommonDb: ot,
415
+ addSection: ht,
416
+ getSections: dt,
417
+ getTasks: ut,
418
+ addTask: pt,
419
+ addTaskOrg: gt,
420
+ addEvent: yt
421
+ }, Nt = 12, Z = /* @__PURE__ */ s(function(n, t) {
422
+ const e = n.append("rect");
423
+ return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
424
+ }, "drawRect"), Lt = /* @__PURE__ */ s(function(n, t) {
425
+ const l = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = n.append("g");
426
+ i.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), i.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
427
+ function d(m) {
428
+ const p = nt().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
429
+ m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
430
+ }
431
+ s(d, "smile");
432
+ function c(m) {
433
+ const p = nt().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
434
+ m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
435
+ }
436
+ s(c, "sad");
437
+ function g(m) {
438
+ m.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
439
+ }
440
+ return s(g, "ambivalent"), t.score > 3 ? d(i) : t.score < 3 ? c(i) : g(i), l;
441
+ }, "drawFace"), $t = /* @__PURE__ */ s(function(n, t) {
442
+ const e = n.append("circle");
443
+ return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
444
+ }, "drawCircle"), ft = /* @__PURE__ */ s(function(n, t) {
445
+ const e = t.text.replace(/<br\s*\/?>/gi, " "), l = n.append("text");
446
+ l.attr("x", t.x), l.attr("y", t.y), l.attr("class", "legend"), l.style("text-anchor", t.anchor), t.class !== void 0 && l.attr("class", t.class);
447
+ const i = l.append("tspan");
448
+ return i.attr("x", t.x + t.textMargin * 2), i.text(e), l;
449
+ }, "drawText"), Mt = /* @__PURE__ */ s(function(n, t) {
450
+ function e(i, d, c, g, m) {
451
+ return i + "," + d + " " + (i + c) + "," + d + " " + (i + c) + "," + (d + g - m) + " " + (i + c - m * 1.2) + "," + (d + g) + " " + i + "," + (d + g);
452
+ }
453
+ s(e, "genPoints");
454
+ const l = n.append("polygon");
455
+ l.attr("points", e(t.x, t.y, 50, 20, 7)), l.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
456
+ }, "drawLabel"), Ht = /* @__PURE__ */ s(function(n, t, e) {
457
+ const l = n.append("g"), i = D();
458
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, Z(l, i), mt(e)(
459
+ t.text,
460
+ l,
461
+ i.x,
462
+ i.y,
463
+ i.width,
464
+ i.height,
465
+ { class: "journey-section section-type-" + t.num },
466
+ e,
467
+ t.colour
468
+ );
469
+ }, "drawSection"), rt = -1, Pt = /* @__PURE__ */ s(function(n, t, e) {
470
+ const l = t.x + e.width / 2, i = n.append("g");
471
+ rt++;
472
+ const d = 300 + 5 * 30;
473
+ i.append("line").attr("id", "task" + rt).attr("x1", l).attr("y1", t.y).attr("x2", l).attr("y2", d).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Lt(i, {
474
+ cx: l,
475
+ cy: 300 + (5 - t.score) * 30,
476
+ score: t.score
477
+ });
478
+ const c = D();
479
+ c.x = t.x, c.y = t.y, c.fill = t.fill, c.width = e.width, c.height = e.height, c.class = "task task-type-" + t.num, c.rx = 3, c.ry = 3, Z(i, c), mt(e)(
480
+ t.task,
481
+ i,
482
+ c.x,
483
+ c.y,
484
+ c.width,
485
+ c.height,
486
+ { class: "task" },
487
+ e,
488
+ t.colour
489
+ );
490
+ }, "drawTask"), At = /* @__PURE__ */ s(function(n, t) {
491
+ Z(n, {
492
+ x: t.startx,
493
+ y: t.starty,
494
+ width: t.stopx - t.startx,
495
+ height: t.stopy - t.starty,
496
+ fill: t.fill,
497
+ class: "rect"
498
+ }).lower();
499
+ }, "drawBackgroundRect"), Ct = /* @__PURE__ */ s(function() {
500
+ return {
501
+ x: 0,
502
+ y: 0,
503
+ fill: void 0,
504
+ "text-anchor": "start",
505
+ width: 100,
506
+ height: 100,
507
+ textMargin: 0,
508
+ rx: 0,
509
+ ry: 0
510
+ };
511
+ }, "getTextObj"), D = /* @__PURE__ */ s(function() {
512
+ return {
513
+ x: 0,
514
+ y: 0,
515
+ width: 100,
516
+ anchor: "start",
517
+ height: 100,
518
+ rx: 0,
519
+ ry: 0
520
+ };
521
+ }, "getNoteRect"), mt = /* @__PURE__ */ function() {
522
+ function n(i, d, c, g, m, p, x, _) {
523
+ const f = d.append("text").attr("x", c + m / 2).attr("y", g + p / 2 + 5).style("font-color", _).style("text-anchor", "middle").text(i);
524
+ l(f, x);
525
+ }
526
+ s(n, "byText");
527
+ function t(i, d, c, g, m, p, x, _, f) {
528
+ const { taskFontSize: r, taskFontFamily: a } = _, h = i.split(/<br\s*\/?>/gi);
529
+ for (let u = 0; u < h.length; u++) {
530
+ const y = u * r - r * (h.length - 1) / 2, o = d.append("text").attr("x", c + m / 2).attr("y", g).attr("fill", f).style("text-anchor", "middle").style("font-size", r).style("font-family", a);
531
+ o.append("tspan").attr("x", c + m / 2).attr("dy", y).text(h[u]), o.attr("y", g + p / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(o, x);
532
+ }
533
+ }
534
+ s(t, "byTspan");
535
+ function e(i, d, c, g, m, p, x, _) {
536
+ const f = d.append("switch"), a = f.append("foreignObject").attr("x", c).attr("y", g).attr("width", m).attr("height", p).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
537
+ a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, f, c, g, m, p, x, _), l(a, x);
538
+ }
539
+ s(e, "byFo");
540
+ function l(i, d) {
541
+ for (const c in d)
542
+ c in d && i.attr(c, d[c]);
543
+ }
544
+ return s(l, "_setTextAttrs"), function(i) {
545
+ return i.textPlacement === "fo" ? e : i.textPlacement === "old" ? n : t;
546
+ };
547
+ }(), Rt = /* @__PURE__ */ s(function(n) {
548
+ n.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");
549
+ }, "initGraphics");
550
+ function tt(n, t) {
551
+ n.each(function() {
552
+ var e = q(this), l = e.text().split(/(\s+|<br>)/).reverse(), i, d = [], c = 1.1, g = e.attr("y"), m = parseFloat(e.attr("dy")), p = e.text(null).append("tspan").attr("x", 0).attr("y", g).attr("dy", m + "em");
553
+ for (let x = 0; x < l.length; x++)
554
+ i = l[l.length - 1 - x], d.push(i), p.text(d.join(" ").trim()), (p.node().getComputedTextLength() > t || i === "<br>") && (d.pop(), p.text(d.join(" ").trim()), i === "<br>" ? d = [""] : d = [i], p = e.append("tspan").attr("x", 0).attr("y", g).attr("dy", c + "em").text(i));
555
+ });
556
+ }
557
+ s(tt, "wrap");
558
+ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
559
+ var _;
560
+ const i = e % Nt - 1, d = n.append("g");
561
+ t.section = i, d.attr(
562
+ "class",
563
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + i)
564
+ );
565
+ const c = d.append("g"), g = d.append("g"), p = g.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), x = (_ = l.fontSize) != null && _.replace ? l.fontSize.replace("px", "") : l.fontSize;
566
+ return t.height = p.height + x * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, g.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Wt(c, t, i, l), t;
567
+ }, "drawNode"), Vt = /* @__PURE__ */ s(function(n, t, e) {
568
+ var g;
569
+ const l = n.append("g"), d = l.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), c = (g = e.fontSize) != null && g.replace ? e.fontSize.replace("px", "") : e.fontSize;
570
+ return l.remove(), d.height + c * 1.1 * 0.5 + t.padding;
571
+ }, "getVirtualNodeHeight"), Wt = /* @__PURE__ */ s(function(n, t, e) {
572
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
573
+ "d",
574
+ `M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z`
575
+ ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
576
+ }, "defaultBkg"), F = {
577
+ drawRect: Z,
578
+ drawCircle: $t,
579
+ drawSection: Ht,
580
+ drawText: ft,
581
+ drawLabel: Mt,
582
+ drawTask: Pt,
583
+ drawBackgroundRect: At,
584
+ getTextObj: Ct,
585
+ getNoteRect: D,
586
+ initGraphics: Rt,
587
+ drawNode: Ft,
588
+ getVirtualNodeHeight: Vt
589
+ }, zt = /* @__PURE__ */ s(function(n, t, e, l) {
590
+ var O, v, N;
591
+ const i = xt(), d = ((O = i.timeline) == null ? void 0 : O.leftMargin) ?? 50;
592
+ E.debug("timeline", l.db);
593
+ const c = i.securityLevel;
594
+ let g;
595
+ c === "sandbox" && (g = q("#i" + t));
596
+ const p = (c === "sandbox" ? q(g.nodes()[0].contentDocument.body) : q("body")).select("#" + t);
597
+ p.append("g");
598
+ const x = l.db.getTasks(), _ = l.db.getCommonDb().getDiagramTitle();
599
+ E.debug("task", x), F.initGraphics(p);
600
+ const f = l.db.getSections();
601
+ E.debug("sections", f);
602
+ let r = 0, a = 0, h = 0, u = 0, y = 50 + d, o = 50;
603
+ u = 50;
604
+ let S = 0, k = !0;
605
+ f.forEach(function(L) {
606
+ const b = {
607
+ number: S,
608
+ descr: L,
609
+ section: S,
610
+ width: 150,
611
+ padding: 20,
612
+ maxHeight: r
613
+ }, M = F.getVirtualNodeHeight(p, b, i);
614
+ E.debug("sectionHeight before draw", M), r = Math.max(r, M + 20);
615
+ });
616
+ let $ = 0, C = 0;
617
+ E.debug("tasks.length", x.length);
618
+ for (const [L, b] of x.entries()) {
619
+ const M = {
620
+ number: L,
621
+ descr: b,
622
+ section: b.section,
623
+ width: 150,
624
+ padding: 20,
625
+ maxHeight: a
626
+ }, R = F.getVirtualNodeHeight(p, M, i);
627
+ E.debug("taskHeight before draw", R), a = Math.max(a, R + 20), $ = Math.max($, b.events.length);
628
+ let A = 0;
629
+ for (const w of b.events) {
630
+ const H = {
631
+ descr: w,
632
+ section: b.section,
633
+ number: b.section,
634
+ width: 150,
635
+ padding: 20,
636
+ maxHeight: 50
637
+ };
638
+ A += F.getVirtualNodeHeight(p, H, i);
639
+ }
640
+ b.events.length > 0 && (A += (b.events.length - 1) * 10), C = Math.max(C, A);
641
+ }
642
+ E.debug("maxSectionHeight before draw", r), E.debug("maxTaskHeight before draw", a), f && f.length > 0 ? f.forEach((L) => {
643
+ const b = x.filter((w) => w.section === L), M = {
644
+ number: S,
645
+ descr: L,
646
+ section: S,
647
+ width: 200 * Math.max(b.length, 1) - 50,
648
+ padding: 20,
649
+ maxHeight: r
650
+ };
651
+ E.debug("sectionNode", M);
652
+ const R = p.append("g"), A = F.drawNode(R, M, S, i);
653
+ E.debug("sectionNode output", A), R.attr("transform", `translate(${y}, ${u})`), o += r + 50, b.length > 0 && st(
654
+ p,
655
+ b,
656
+ S,
657
+ y,
658
+ o,
659
+ a,
660
+ i,
661
+ $,
662
+ C,
663
+ r,
664
+ !1
665
+ ), y += 200 * Math.max(b.length, 1), o = u, S++;
666
+ }) : (k = !1, st(
667
+ p,
668
+ x,
669
+ S,
670
+ y,
671
+ o,
672
+ a,
673
+ i,
674
+ $,
675
+ C,
676
+ r,
677
+ !0
678
+ ));
679
+ const B = p.node().getBBox();
680
+ E.debug("bounds", B), _ && p.append("text").text(_).attr("x", B.width / 2 - d).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), h = k ? r + a + 150 : a + 100, p.append("g").attr("class", "lineWrapper").append("line").attr("x1", d).attr("y1", h).attr("x2", B.width + 3 * d).attr("y2", h).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), kt(
681
+ void 0,
682
+ p,
683
+ ((v = i.timeline) == null ? void 0 : v.padding) ?? 50,
684
+ ((N = i.timeline) == null ? void 0 : N.useMaxWidth) ?? !1
685
+ );
686
+ }, "draw"), st = /* @__PURE__ */ s(function(n, t, e, l, i, d, c, g, m, p, x) {
687
+ var _;
688
+ for (const f of t) {
689
+ const r = {
690
+ descr: f.task,
691
+ section: e,
692
+ number: e,
693
+ width: 150,
694
+ padding: 20,
695
+ maxHeight: d
696
+ };
697
+ E.debug("taskNode", r);
698
+ const a = n.append("g").attr("class", "taskWrapper"), u = F.drawNode(a, r, e, c).height;
699
+ if (E.debug("taskHeight after draw", u), a.attr("transform", `translate(${l}, ${i})`), d = Math.max(d, u), f.events) {
700
+ const y = n.append("g").attr("class", "lineWrapper");
701
+ let o = d;
702
+ i += 100, o = o + Bt(n, f.events, e, l, i, c), i -= 100, y.append("line").attr("x1", l + 190 / 2).attr("y1", i + d).attr("x2", l + 190 / 2).attr("y2", i + d + 100 + m + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
703
+ }
704
+ l = l + 200, x && !((_ = c.timeline) != null && _.disableMulticolor) && e++;
705
+ }
706
+ i = i - 10;
707
+ }, "drawTasks"), Bt = /* @__PURE__ */ s(function(n, t, e, l, i, d) {
708
+ let c = 0;
709
+ const g = i;
710
+ i = i + 100;
711
+ for (const m of t) {
712
+ const p = {
713
+ descr: m,
714
+ section: e,
715
+ number: e,
716
+ width: 150,
717
+ padding: 20,
718
+ maxHeight: 50
719
+ };
720
+ E.debug("eventNode", p);
721
+ const x = n.append("g").attr("class", "eventWrapper"), f = F.drawNode(x, p, e, d).height;
722
+ c = c + f, x.attr("transform", `translate(${l}, ${i})`), i = i + 10 + f;
723
+ }
724
+ return i = g, c;
725
+ }, "drawEvents"), Ot = {
726
+ setConf: /* @__PURE__ */ s(() => {
727
+ }, "setConf"),
728
+ draw: zt
729
+ }, jt = /* @__PURE__ */ s((n) => {
730
+ let t = "";
731
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
732
+ n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], vt(n["lineColor" + e]) ? n["lineColor" + e] = _t(n["lineColor" + e], 20) : n["lineColor" + e] = bt(n["lineColor" + e], 20);
733
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
734
+ const l = "" + (17 - 3 * e);
735
+ t += `
736
+ .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
737
+ fill: ${n["cScale" + e]};
738
+ }
739
+ .section-${e - 1} text {
740
+ fill: ${n["cScaleLabel" + e]};
741
+ }
742
+ .node-icon-${e - 1} {
743
+ font-size: 40px;
744
+ color: ${n["cScaleLabel" + e]};
745
+ }
746
+ .section-edge-${e - 1}{
747
+ stroke: ${n["cScale" + e]};
748
+ }
749
+ .edge-depth-${e - 1}{
750
+ stroke-width: ${l};
751
+ }
752
+ .section-${e - 1} line {
753
+ stroke: ${n["cScaleInv" + e]} ;
754
+ stroke-width: 3;
755
+ }
756
+
757
+ .lineWrapper line{
758
+ stroke: ${n["cScaleLabel" + e]} ;
759
+ }
760
+
761
+ .disabled, .disabled circle, .disabled text {
762
+ fill: lightgray;
763
+ }
764
+ .disabled text {
765
+ fill: #efefef;
766
+ }
767
+ `;
768
+ }
769
+ return t;
770
+ }, "genSections"), Gt = /* @__PURE__ */ s((n) => `
771
+ .edge {
772
+ stroke-width: 3;
773
+ }
774
+ ${jt(n)}
775
+ .section-root rect, .section-root path, .section-root circle {
776
+ fill: ${n.git0};
777
+ }
778
+ .section-root text {
779
+ fill: ${n.gitBranchLabel0};
780
+ }
781
+ .icon-container {
782
+ height:100%;
783
+ display: flex;
784
+ justify-content: center;
785
+ align-items: center;
786
+ }
787
+ .edge {
788
+ fill: none;
789
+ }
790
+ .eventWrapper {
791
+ filter: brightness(120%);
792
+ }
793
+ `, "getStyles"), qt = Gt, Jt = {
794
+ db: at,
795
+ renderer: Ot,
796
+ parser: Tt,
797
+ styles: qt
798
+ };
799
+ export {
800
+ Jt as diagram
801
+ };
src/backend/gradio_dropdownplus/templates/component/treemap-75Q7IDZK-o7HSbXc7.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_dropdownplus/templates/component/xychartDiagram-FDP5SA34-BjiN55_k.js ADDED
@@ -0,0 +1,1340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Nt, H as mi, e as yi, y as bi, E as St, D as Yt, F as Ai, K as wi, i as Ci, aF as Si, R as Wt } from "./mermaid.core-DH6TRyjK.js";
2
+ import { i as _i } from "./init-DjUOC4st.js";
3
+ import { o as ki } from "./ordinal-DfAQgscy.js";
4
+ import { l as zt } from "./linear-LzsmWjnq.js";
5
+ function Ri(e, t, i) {
6
+ e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
7
+ for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
8
+ o[s] = e + s * i;
9
+ return o;
10
+ }
11
+ function yt() {
12
+ var e = ki().unknown(void 0), t = e.domain, i = e.range, s = 0, n = 1, o, g, m = !1, p = 0, k = 0, v = 0.5;
13
+ delete e.unknown;
14
+ function C() {
15
+ var b = t().length, E = n < s, D = E ? n : s, P = E ? s : n;
16
+ o = (P - D) / Math.max(1, b - p + k * 2), m && (o = Math.floor(o)), D += (P - D - o * (b - p)) * v, g = o * (1 - p), m && (D = Math.round(D), g = Math.round(g));
17
+ var I = Ri(b).map(function(y) {
18
+ return D + o * y;
19
+ });
20
+ return i(E ? I.reverse() : I);
21
+ }
22
+ return e.domain = function(b) {
23
+ return arguments.length ? (t(b), C()) : t();
24
+ }, e.range = function(b) {
25
+ return arguments.length ? ([s, n] = b, s = +s, n = +n, C()) : [s, n];
26
+ }, e.rangeRound = function(b) {
27
+ return [s, n] = b, s = +s, n = +n, m = !0, C();
28
+ }, e.bandwidth = function() {
29
+ return g;
30
+ }, e.step = function() {
31
+ return o;
32
+ }, e.round = function(b) {
33
+ return arguments.length ? (m = !!b, C()) : m;
34
+ }, e.padding = function(b) {
35
+ return arguments.length ? (p = Math.min(1, k = +b), C()) : p;
36
+ }, e.paddingInner = function(b) {
37
+ return arguments.length ? (p = Math.min(1, b), C()) : p;
38
+ }, e.paddingOuter = function(b) {
39
+ return arguments.length ? (k = +b, C()) : k;
40
+ }, e.align = function(b) {
41
+ return arguments.length ? (v = Math.max(0, Math.min(1, b)), C()) : v;
42
+ }, e.copy = function() {
43
+ return yt(t(), [s, n]).round(m).paddingInner(p).paddingOuter(k).align(v);
44
+ }, _i.apply(C(), arguments);
45
+ }
46
+ var bt = function() {
47
+ var e = /* @__PURE__ */ a(function(F, h, u, x) {
48
+ for (u = u || {}, x = F.length; x--; u[F[x]] = h) ;
49
+ return u;
50
+ }, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], n = [1, 5], o = [1, 6], g = [1, 7], m = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], p = [1, 25], k = [1, 26], v = [1, 28], C = [1, 29], b = [1, 30], E = [1, 31], D = [1, 32], P = [1, 33], I = [1, 34], y = [1, 35], _ = [1, 36], c = [1, 37], W = [1, 43], z = [1, 42], U = [1, 47], X = [1, 50], l = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], L = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], R = [1, 64], $ = {
51
+ trace: /* @__PURE__ */ a(function() {
52
+ }, "trace"),
53
+ yy: {},
54
+ symbols_: { error: 2, start: 3, eol: 4, XYCHART: 5, chartConfig: 6, document: 7, CHART_ORIENTATION: 8, statement: 9, title: 10, text: 11, X_AXIS: 12, parseXAxis: 13, Y_AXIS: 14, parseYAxis: 15, LINE: 16, plotData: 17, BAR: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, SQUARE_BRACES_START: 24, commaSeparatedNumbers: 25, SQUARE_BRACES_END: 26, NUMBER_WITH_DECIMAL: 27, COMMA: 28, xAxisData: 29, bandData: 30, ARROW_DELIMITER: 31, commaSeparatedTexts: 32, yAxisData: 33, NEWLINE: 34, SEMI: 35, EOF: 36, alphaNum: 37, STR: 38, MD_STR: 39, alphaNumToken: 40, AMP: 41, NUM: 42, ALPHA: 43, PLUS: 44, EQUALS: 45, MULT: 46, DOT: 47, BRKT: 48, MINUS: 49, UNDERSCORE: 50, $accept: 0, $end: 1 },
55
+ terminals_: { 2: "error", 5: "XYCHART", 8: "CHART_ORIENTATION", 10: "title", 12: "X_AXIS", 14: "Y_AXIS", 16: "LINE", 18: "BAR", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "SQUARE_BRACES_START", 26: "SQUARE_BRACES_END", 27: "NUMBER_WITH_DECIMAL", 28: "COMMA", 31: "ARROW_DELIMITER", 34: "NEWLINE", 35: "SEMI", 36: "EOF", 38: "STR", 39: "MD_STR", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "PLUS", 45: "EQUALS", 46: "MULT", 47: "DOT", 48: "BRKT", 49: "MINUS", 50: "UNDERSCORE" },
56
+ productions_: [0, [3, 2], [3, 3], [3, 2], [3, 1], [6, 1], [7, 0], [7, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 3], [9, 2], [9, 3], [9, 2], [9, 2], [9, 1], [17, 3], [25, 3], [25, 1], [13, 1], [13, 2], [13, 1], [29, 1], [29, 3], [30, 3], [32, 3], [32, 1], [15, 1], [15, 2], [15, 1], [33, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [37, 1], [37, 2], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1]],
57
+ performAction: /* @__PURE__ */ a(function(h, u, x, d, w, r, at) {
58
+ var f = r.length - 1;
59
+ switch (w) {
60
+ case 5:
61
+ d.setOrientation(r[f]);
62
+ break;
63
+ case 9:
64
+ d.setDiagramTitle(r[f].text.trim());
65
+ break;
66
+ case 12:
67
+ d.setLineData({ text: "", type: "text" }, r[f]);
68
+ break;
69
+ case 13:
70
+ d.setLineData(r[f - 1], r[f]);
71
+ break;
72
+ case 14:
73
+ d.setBarData({ text: "", type: "text" }, r[f]);
74
+ break;
75
+ case 15:
76
+ d.setBarData(r[f - 1], r[f]);
77
+ break;
78
+ case 16:
79
+ this.$ = r[f].trim(), d.setAccTitle(this.$);
80
+ break;
81
+ case 17:
82
+ case 18:
83
+ this.$ = r[f].trim(), d.setAccDescription(this.$);
84
+ break;
85
+ case 19:
86
+ this.$ = r[f - 1];
87
+ break;
88
+ case 20:
89
+ this.$ = [Number(r[f - 2]), ...r[f]];
90
+ break;
91
+ case 21:
92
+ this.$ = [Number(r[f])];
93
+ break;
94
+ case 22:
95
+ d.setXAxisTitle(r[f]);
96
+ break;
97
+ case 23:
98
+ d.setXAxisTitle(r[f - 1]);
99
+ break;
100
+ case 24:
101
+ d.setXAxisTitle({ type: "text", text: "" });
102
+ break;
103
+ case 25:
104
+ d.setXAxisBand(r[f]);
105
+ break;
106
+ case 26:
107
+ d.setXAxisRangeData(Number(r[f - 2]), Number(r[f]));
108
+ break;
109
+ case 27:
110
+ this.$ = r[f - 1];
111
+ break;
112
+ case 28:
113
+ this.$ = [r[f - 2], ...r[f]];
114
+ break;
115
+ case 29:
116
+ this.$ = [r[f]];
117
+ break;
118
+ case 30:
119
+ d.setYAxisTitle(r[f]);
120
+ break;
121
+ case 31:
122
+ d.setYAxisTitle(r[f - 1]);
123
+ break;
124
+ case 32:
125
+ d.setYAxisTitle({ type: "text", text: "" });
126
+ break;
127
+ case 33:
128
+ d.setYAxisRangeData(Number(r[f - 2]), Number(r[f]));
129
+ break;
130
+ case 37:
131
+ this.$ = { text: r[f], type: "text" };
132
+ break;
133
+ case 38:
134
+ this.$ = { text: r[f], type: "text" };
135
+ break;
136
+ case 39:
137
+ this.$ = { text: r[f], type: "markdown" };
138
+ break;
139
+ case 40:
140
+ this.$ = r[f];
141
+ break;
142
+ case 41:
143
+ this.$ = r[f - 1] + "" + r[f];
144
+ break;
145
+ }
146
+ }, "anonymous"),
147
+ table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 34: n, 35: o, 36: g }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 34: n, 35: o, 36: g }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 34: n, 35: o, 36: g }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, e(m, [2, 34]), e(m, [2, 35]), e(m, [2, 36]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 34: n, 35: o, 36: g }), { 1: [2, 3] }, e(m, [2, 5]), e(t, [2, 7], { 4: 22, 34: n, 35: o, 36: g }), { 11: 23, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 39, 13: 38, 24: W, 27: z, 29: 40, 30: 41, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 45, 15: 44, 27: U, 33: 46, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 49, 17: 48, 24: X, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 11: 52, 17: 51, 24: X, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, { 20: [1, 53] }, { 22: [1, 54] }, e(l, [2, 18]), { 1: [2, 2] }, e(l, [2, 8]), e(l, [2, 9]), e(L, [2, 37], { 40: 55, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }), e(L, [2, 38]), e(L, [2, 39]), e(S, [2, 40]), e(S, [2, 42]), e(S, [2, 43]), e(S, [2, 44]), e(S, [2, 45]), e(S, [2, 46]), e(S, [2, 47]), e(S, [2, 48]), e(S, [2, 49]), e(S, [2, 50]), e(S, [2, 51]), e(l, [2, 10]), e(l, [2, 22], { 30: 41, 29: 56, 24: W, 27: z }), e(l, [2, 24]), e(l, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, e(l, [2, 11]), e(l, [2, 30], { 33: 60, 27: U }), e(l, [2, 32]), { 31: [1, 61] }, e(l, [2, 12]), { 17: 62, 24: X }, { 25: 63, 27: R }, e(l, [2, 14]), { 17: 65, 24: X }, e(l, [2, 16]), e(l, [2, 17]), e(S, [2, 41]), e(l, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, e(l, [2, 31]), { 27: [1, 69] }, e(l, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, e(l, [2, 15]), e(l, [2, 26]), e(l, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: p, 39: k, 40: 27, 41: v, 42: C, 43: b, 44: E, 45: D, 46: P, 47: I, 48: y, 49: _, 50: c }, e(l, [2, 33]), e(l, [2, 19]), { 25: 73, 27: R }, { 26: [2, 28] }, { 26: [2, 20] }],
148
+ defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] },
149
+ parseError: /* @__PURE__ */ a(function(h, u) {
150
+ if (u.recoverable)
151
+ this.trace(h);
152
+ else {
153
+ var x = new Error(h);
154
+ throw x.hash = u, x;
155
+ }
156
+ }, "parseError"),
157
+ parse: /* @__PURE__ */ a(function(h) {
158
+ var u = this, x = [0], d = [], w = [null], r = [], at = this.table, f = "", lt = 0, It = 0, hi = 2, Mt = 1, li = r.slice.call(arguments, 1), T = Object.create(this.lexer), Y = { yy: {} };
159
+ for (var dt in this.yy)
160
+ Object.prototype.hasOwnProperty.call(this.yy, dt) && (Y.yy[dt] = this.yy[dt]);
161
+ T.setInput(h, Y.yy), Y.yy.lexer = T, Y.yy.parser = this, typeof T.yylloc > "u" && (T.yylloc = {});
162
+ var ft = T.yylloc;
163
+ r.push(ft);
164
+ var ci = T.options && T.options.ranges;
165
+ typeof Y.yy.parseError == "function" ? this.parseError = Y.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
166
+ function ui(V) {
167
+ x.length = x.length - 2 * V, w.length = w.length - V, r.length = r.length - V;
168
+ }
169
+ a(ui, "popStack");
170
+ function Vt() {
171
+ var V;
172
+ return V = d.pop() || T.lex() || Mt, typeof V != "number" && (V instanceof Array && (d = V, V = d.pop()), V = u.symbols_[V] || V), V;
173
+ }
174
+ a(Vt, "lex");
175
+ for (var M, H, B, pt, q = {}, ct, O, Bt, ut; ; ) {
176
+ if (H = x[x.length - 1], this.defaultActions[H] ? B = this.defaultActions[H] : ((M === null || typeof M > "u") && (M = Vt()), B = at[H] && at[H][M]), typeof B > "u" || !B.length || !B[0]) {
177
+ var mt = "";
178
+ ut = [];
179
+ for (ct in at[H])
180
+ this.terminals_[ct] && ct > hi && ut.push("'" + this.terminals_[ct] + "'");
181
+ T.showPosition ? mt = "Parse error on line " + (lt + 1) + `:
182
+ ` + T.showPosition() + `
183
+ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt = "Parse error on line " + (lt + 1) + ": Unexpected " + (M == Mt ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(mt, {
184
+ text: T.match,
185
+ token: this.terminals_[M] || M,
186
+ line: T.yylineno,
187
+ loc: ft,
188
+ expected: ut
189
+ });
190
+ }
191
+ if (B[0] instanceof Array && B.length > 1)
192
+ throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + M);
193
+ switch (B[0]) {
194
+ case 1:
195
+ x.push(M), w.push(T.yytext), r.push(T.yylloc), x.push(B[1]), M = null, It = T.yyleng, f = T.yytext, lt = T.yylineno, ft = T.yylloc;
196
+ break;
197
+ case 2:
198
+ if (O = this.productions_[B[1]][1], q.$ = w[w.length - O], q._$ = {
199
+ first_line: r[r.length - (O || 1)].first_line,
200
+ last_line: r[r.length - 1].last_line,
201
+ first_column: r[r.length - (O || 1)].first_column,
202
+ last_column: r[r.length - 1].last_column
203
+ }, ci && (q._$.range = [
204
+ r[r.length - (O || 1)].range[0],
205
+ r[r.length - 1].range[1]
206
+ ]), pt = this.performAction.apply(q, [
207
+ f,
208
+ It,
209
+ lt,
210
+ Y.yy,
211
+ B[1],
212
+ w,
213
+ r
214
+ ].concat(li)), typeof pt < "u")
215
+ return pt;
216
+ O && (x = x.slice(0, -1 * O * 2), w = w.slice(0, -1 * O), r = r.slice(0, -1 * O)), x.push(this.productions_[B[1]][0]), w.push(q.$), r.push(q._$), Bt = at[x[x.length - 2]][x[x.length - 1]], x.push(Bt);
217
+ break;
218
+ case 3:
219
+ return !0;
220
+ }
221
+ }
222
+ return !0;
223
+ }, "parse")
224
+ }, Et = /* @__PURE__ */ function() {
225
+ var F = {
226
+ EOF: 1,
227
+ parseError: /* @__PURE__ */ a(function(u, x) {
228
+ if (this.yy.parser)
229
+ this.yy.parser.parseError(u, x);
230
+ else
231
+ throw new Error(u);
232
+ }, "parseError"),
233
+ // resets the lexer, sets new input
234
+ setInput: /* @__PURE__ */ a(function(h, u) {
235
+ return this.yy = u || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
236
+ first_line: 1,
237
+ first_column: 0,
238
+ last_line: 1,
239
+ last_column: 0
240
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
241
+ }, "setInput"),
242
+ // consumes and returns one char from the input
243
+ input: /* @__PURE__ */ a(function() {
244
+ var h = this._input[0];
245
+ this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
246
+ var u = h.match(/(?:\r\n?|\n).*/g);
247
+ return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
248
+ }, "input"),
249
+ // unshifts one char (or a string) into the input
250
+ unput: /* @__PURE__ */ a(function(h) {
251
+ var u = h.length, x = h.split(/(?:\r\n?|\n)/g);
252
+ this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
253
+ var d = this.match.split(/(?:\r\n?|\n)/g);
254
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
255
+ var w = this.yylloc.range;
256
+ return this.yylloc = {
257
+ first_line: this.yylloc.first_line,
258
+ last_line: this.yylineno + 1,
259
+ first_column: this.yylloc.first_column,
260
+ last_column: x ? (x.length === d.length ? this.yylloc.first_column : 0) + d[d.length - x.length].length - x[0].length : this.yylloc.first_column - u
261
+ }, this.options.ranges && (this.yylloc.range = [w[0], w[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
262
+ }, "unput"),
263
+ // When called from action, caches matched text and appends it on next action
264
+ more: /* @__PURE__ */ a(function() {
265
+ return this._more = !0, this;
266
+ }, "more"),
267
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
268
+ reject: /* @__PURE__ */ a(function() {
269
+ if (this.options.backtrack_lexer)
270
+ this._backtrack = !0;
271
+ else
272
+ return 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).
273
+ ` + this.showPosition(), {
274
+ text: "",
275
+ token: null,
276
+ line: this.yylineno
277
+ });
278
+ return this;
279
+ }, "reject"),
280
+ // retain first n characters of the match
281
+ less: /* @__PURE__ */ a(function(h) {
282
+ this.unput(this.match.slice(h));
283
+ }, "less"),
284
+ // displays already matched input, i.e. for error messages
285
+ pastInput: /* @__PURE__ */ a(function() {
286
+ var h = this.matched.substr(0, this.matched.length - this.match.length);
287
+ return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
288
+ }, "pastInput"),
289
+ // displays upcoming input, i.e. for error messages
290
+ upcomingInput: /* @__PURE__ */ a(function() {
291
+ var h = this.match;
292
+ return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
293
+ }, "upcomingInput"),
294
+ // displays the character position where the lexing error occurred, i.e. for error messages
295
+ showPosition: /* @__PURE__ */ a(function() {
296
+ var h = this.pastInput(), u = new Array(h.length + 1).join("-");
297
+ return h + this.upcomingInput() + `
298
+ ` + u + "^";
299
+ }, "showPosition"),
300
+ // test the lexed token: return FALSE when not a match, otherwise return token
301
+ test_match: /* @__PURE__ */ a(function(h, u) {
302
+ var x, d, w;
303
+ if (this.options.backtrack_lexer && (w = {
304
+ yylineno: this.yylineno,
305
+ yylloc: {
306
+ first_line: this.yylloc.first_line,
307
+ last_line: this.last_line,
308
+ first_column: this.yylloc.first_column,
309
+ last_column: this.yylloc.last_column
310
+ },
311
+ yytext: this.yytext,
312
+ match: this.match,
313
+ matches: this.matches,
314
+ matched: this.matched,
315
+ yyleng: this.yyleng,
316
+ offset: this.offset,
317
+ _more: this._more,
318
+ _input: this._input,
319
+ yy: this.yy,
320
+ conditionStack: this.conditionStack.slice(0),
321
+ done: this.done
322
+ }, this.options.ranges && (w.yylloc.range = this.yylloc.range.slice(0))), d = h[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
323
+ first_line: this.yylloc.last_line,
324
+ last_line: this.yylineno + 1,
325
+ first_column: this.yylloc.last_column,
326
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
327
+ }, this.yytext += h[0], this.match += h[0], this.matches = h, 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(h[0].length), this.matched += h[0], x = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
328
+ return x;
329
+ if (this._backtrack) {
330
+ for (var r in w)
331
+ this[r] = w[r];
332
+ return !1;
333
+ }
334
+ return !1;
335
+ }, "test_match"),
336
+ // return next match in input
337
+ next: /* @__PURE__ */ a(function() {
338
+ if (this.done)
339
+ return this.EOF;
340
+ this._input || (this.done = !0);
341
+ var h, u, x, d;
342
+ this._more || (this.yytext = "", this.match = "");
343
+ for (var w = this._currentRules(), r = 0; r < w.length; r++)
344
+ if (x = this._input.match(this.rules[w[r]]), x && (!u || x[0].length > u[0].length)) {
345
+ if (u = x, d = r, this.options.backtrack_lexer) {
346
+ if (h = this.test_match(x, w[r]), h !== !1)
347
+ return h;
348
+ if (this._backtrack) {
349
+ u = !1;
350
+ continue;
351
+ } else
352
+ return !1;
353
+ } else if (!this.options.flex)
354
+ break;
355
+ }
356
+ return u ? (h = this.test_match(u, w[d]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
357
+ ` + this.showPosition(), {
358
+ text: "",
359
+ token: null,
360
+ line: this.yylineno
361
+ });
362
+ }, "next"),
363
+ // return next match that has a token
364
+ lex: /* @__PURE__ */ a(function() {
365
+ var u = this.next();
366
+ return u || this.lex();
367
+ }, "lex"),
368
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
369
+ begin: /* @__PURE__ */ a(function(u) {
370
+ this.conditionStack.push(u);
371
+ }, "begin"),
372
+ // pop the previously active lexer condition state off the condition stack
373
+ popState: /* @__PURE__ */ a(function() {
374
+ var u = this.conditionStack.length - 1;
375
+ return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
376
+ }, "popState"),
377
+ // produce the lexer rule set which is active for the currently active lexer condition state
378
+ _currentRules: /* @__PURE__ */ a(function() {
379
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
380
+ }, "_currentRules"),
381
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
382
+ topState: /* @__PURE__ */ a(function(u) {
383
+ return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
384
+ }, "topState"),
385
+ // alias for begin(condition)
386
+ pushState: /* @__PURE__ */ a(function(u) {
387
+ this.begin(u);
388
+ }, "pushState"),
389
+ // return the number of states currently on the stack
390
+ stateStackSize: /* @__PURE__ */ a(function() {
391
+ return this.conditionStack.length;
392
+ }, "stateStackSize"),
393
+ options: { "case-insensitive": !0 },
394
+ performAction: /* @__PURE__ */ a(function(u, x, d, w) {
395
+ switch (d) {
396
+ case 0:
397
+ break;
398
+ case 1:
399
+ break;
400
+ case 2:
401
+ return this.popState(), 34;
402
+ case 3:
403
+ return this.popState(), 34;
404
+ case 4:
405
+ return 34;
406
+ case 5:
407
+ break;
408
+ case 6:
409
+ return 10;
410
+ case 7:
411
+ return this.pushState("acc_title"), 19;
412
+ case 8:
413
+ return this.popState(), "acc_title_value";
414
+ case 9:
415
+ return this.pushState("acc_descr"), 21;
416
+ case 10:
417
+ return this.popState(), "acc_descr_value";
418
+ case 11:
419
+ this.pushState("acc_descr_multiline");
420
+ break;
421
+ case 12:
422
+ this.popState();
423
+ break;
424
+ case 13:
425
+ return "acc_descr_multiline_value";
426
+ case 14:
427
+ return 5;
428
+ case 15:
429
+ return 5;
430
+ case 16:
431
+ return 8;
432
+ case 17:
433
+ return this.pushState("axis_data"), "X_AXIS";
434
+ case 18:
435
+ return this.pushState("axis_data"), "Y_AXIS";
436
+ case 19:
437
+ return this.pushState("axis_band_data"), 24;
438
+ case 20:
439
+ return 31;
440
+ case 21:
441
+ return this.pushState("data"), 16;
442
+ case 22:
443
+ return this.pushState("data"), 18;
444
+ case 23:
445
+ return this.pushState("data_inner"), 24;
446
+ case 24:
447
+ return 27;
448
+ case 25:
449
+ return this.popState(), 26;
450
+ case 26:
451
+ this.popState();
452
+ break;
453
+ case 27:
454
+ this.pushState("string");
455
+ break;
456
+ case 28:
457
+ this.popState();
458
+ break;
459
+ case 29:
460
+ return "STR";
461
+ case 30:
462
+ return 24;
463
+ case 31:
464
+ return 26;
465
+ case 32:
466
+ return 43;
467
+ case 33:
468
+ return "COLON";
469
+ case 34:
470
+ return 44;
471
+ case 35:
472
+ return 28;
473
+ case 36:
474
+ return 45;
475
+ case 37:
476
+ return 46;
477
+ case 38:
478
+ return 48;
479
+ case 39:
480
+ return 50;
481
+ case 40:
482
+ return 47;
483
+ case 41:
484
+ return 41;
485
+ case 42:
486
+ return 49;
487
+ case 43:
488
+ return 42;
489
+ case 44:
490
+ break;
491
+ case 45:
492
+ return 35;
493
+ case 46:
494
+ return 36;
495
+ }
496
+ }, "anonymous"),
497
+ rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\{)/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:xychart\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i],
498
+ conditions: { data_inner: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, data: { rules: [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 23, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, axis_band_data: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, axis_data: { rules: [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 }, acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [], inclusive: !1 }, md_string: { rules: [], inclusive: !1 }, string: { rules: [28, 29], inclusive: !1 }, INITIAL: { rules: [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 21, 22, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], inclusive: !0 } }
499
+ };
500
+ return F;
501
+ }();
502
+ $.lexer = Et;
503
+ function N() {
504
+ this.yy = {};
505
+ }
506
+ return a(N, "Parser"), N.prototype = $, $.Parser = N, new N();
507
+ }();
508
+ bt.parser = bt;
509
+ var Ti = bt;
510
+ function At(e) {
511
+ return e.type === "bar";
512
+ }
513
+ a(At, "isBarPlot");
514
+ function _t(e) {
515
+ return e.type === "band";
516
+ }
517
+ a(_t, "isBandAxisData");
518
+ function G(e) {
519
+ return e.type === "linear";
520
+ }
521
+ a(G, "isLinearAxisData");
522
+ var j, Ht = (j = class {
523
+ constructor(t) {
524
+ this.parentGroup = t;
525
+ }
526
+ getMaxDimension(t, i) {
527
+ if (!this.parentGroup)
528
+ return {
529
+ width: t.reduce((o, g) => Math.max(g.length, o), 0) * i,
530
+ height: i
531
+ };
532
+ const s = {
533
+ width: 0,
534
+ height: 0
535
+ }, n = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", i);
536
+ for (const o of t) {
537
+ const g = Si(n, 1, o), m = g ? g.width : o.length * i, p = g ? g.height : i;
538
+ s.width = Math.max(s.width, m), s.height = Math.max(s.height, p);
539
+ }
540
+ return n.remove(), s;
541
+ }
542
+ }, a(j, "TextDimensionCalculatorWithFont"), j), Ft = 0.7, Ot = 0.2, Q, Ut = (Q = class {
543
+ constructor(t, i, s, n) {
544
+ this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = n, this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left";
545
+ }
546
+ setRange(t) {
547
+ this.range = t, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = t[1] - t[0] : this.boundingRect.width = t[1] - t[0], this.recalculateScale();
548
+ }
549
+ getRange() {
550
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
551
+ }
552
+ setAxisPosition(t) {
553
+ this.axisPosition = t, this.setRange(this.range);
554
+ }
555
+ getTickDistance() {
556
+ const t = this.getRange();
557
+ return Math.abs(t[0] - t[1]) / this.getTickValues().length;
558
+ }
559
+ getAxisOuterPadding() {
560
+ return this.outerPadding;
561
+ }
562
+ getLabelDimension() {
563
+ return this.textDimensionCalculator.getMaxDimension(
564
+ this.getTickValues().map((t) => t.toString()),
565
+ this.axisConfig.labelFontSize
566
+ );
567
+ }
568
+ recalculateOuterPaddingToDrawBar() {
569
+ Ft * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(Ft * this.getTickDistance() / 2)), this.recalculateScale();
570
+ }
571
+ calculateSpaceIfDrawnHorizontally(t) {
572
+ let i = t.height;
573
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
574
+ const s = this.getLabelDimension(), n = Ot * t.width;
575
+ this.outerPadding = Math.min(s.width / 2, n);
576
+ const o = s.height + this.axisConfig.labelPadding * 2;
577
+ this.labelTextHeight = s.height, o <= i && (i -= o, this.showLabel = !0);
578
+ }
579
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
580
+ const s = this.textDimensionCalculator.getMaxDimension(
581
+ [this.title],
582
+ this.axisConfig.titleFontSize
583
+ ), n = s.height + this.axisConfig.titlePadding * 2;
584
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
585
+ }
586
+ this.boundingRect.width = t.width, this.boundingRect.height = t.height - i;
587
+ }
588
+ calculateSpaceIfDrawnVertical(t) {
589
+ let i = t.width;
590
+ if (this.axisConfig.showAxisLine && i > this.axisConfig.axisLineWidth && (i -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
591
+ const s = this.getLabelDimension(), n = Ot * t.height;
592
+ this.outerPadding = Math.min(s.height / 2, n);
593
+ const o = s.width + this.axisConfig.labelPadding * 2;
594
+ o <= i && (i -= o, this.showLabel = !0);
595
+ }
596
+ if (this.axisConfig.showTick && i >= this.axisConfig.tickLength && (this.showTick = !0, i -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
597
+ const s = this.textDimensionCalculator.getMaxDimension(
598
+ [this.title],
599
+ this.axisConfig.titleFontSize
600
+ ), n = s.height + this.axisConfig.titlePadding * 2;
601
+ this.titleTextHeight = s.height, n <= i && (i -= n, this.showTitle = !0);
602
+ }
603
+ this.boundingRect.width = t.width - i, this.boundingRect.height = t.height;
604
+ }
605
+ calculateSpace(t) {
606
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(t) : this.calculateSpaceIfDrawnHorizontally(t), this.recalculateScale(), {
607
+ width: this.boundingRect.width,
608
+ height: this.boundingRect.height
609
+ };
610
+ }
611
+ setBoundingBoxXY(t) {
612
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
613
+ }
614
+ getDrawableElementsForLeftAxis() {
615
+ const t = [];
616
+ if (this.showAxisLine) {
617
+ const i = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
618
+ t.push({
619
+ type: "path",
620
+ groupTexts: ["left-axis", "axisl-line"],
621
+ data: [
622
+ {
623
+ path: `M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y + this.boundingRect.height} `,
624
+ strokeFill: this.axisThemeConfig.axisLineColor,
625
+ strokeWidth: this.axisConfig.axisLineWidth
626
+ }
627
+ ]
628
+ });
629
+ }
630
+ if (this.showLabel && t.push({
631
+ type: "text",
632
+ groupTexts: ["left-axis", "label"],
633
+ data: this.getTickValues().map((i) => ({
634
+ text: i.toString(),
635
+ x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
636
+ y: this.getScaleValue(i),
637
+ fill: this.axisThemeConfig.labelColor,
638
+ fontSize: this.axisConfig.labelFontSize,
639
+ rotation: 0,
640
+ verticalPos: "middle",
641
+ horizontalPos: "right"
642
+ }))
643
+ }), this.showTick) {
644
+ const i = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
645
+ t.push({
646
+ type: "path",
647
+ groupTexts: ["left-axis", "ticks"],
648
+ data: this.getTickValues().map((s) => ({
649
+ path: `M ${i},${this.getScaleValue(s)} L ${i - this.axisConfig.tickLength},${this.getScaleValue(s)}`,
650
+ strokeFill: this.axisThemeConfig.tickColor,
651
+ strokeWidth: this.axisConfig.tickWidth
652
+ }))
653
+ });
654
+ }
655
+ return this.showTitle && t.push({
656
+ type: "text",
657
+ groupTexts: ["left-axis", "title"],
658
+ data: [
659
+ {
660
+ text: this.title,
661
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
662
+ y: this.boundingRect.y + this.boundingRect.height / 2,
663
+ fill: this.axisThemeConfig.titleColor,
664
+ fontSize: this.axisConfig.titleFontSize,
665
+ rotation: 270,
666
+ verticalPos: "top",
667
+ horizontalPos: "center"
668
+ }
669
+ ]
670
+ }), t;
671
+ }
672
+ getDrawableElementsForBottomAxis() {
673
+ const t = [];
674
+ if (this.showAxisLine) {
675
+ const i = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
676
+ t.push({
677
+ type: "path",
678
+ groupTexts: ["bottom-axis", "axis-line"],
679
+ data: [
680
+ {
681
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
682
+ strokeFill: this.axisThemeConfig.axisLineColor,
683
+ strokeWidth: this.axisConfig.axisLineWidth
684
+ }
685
+ ]
686
+ });
687
+ }
688
+ if (this.showLabel && t.push({
689
+ type: "text",
690
+ groupTexts: ["bottom-axis", "label"],
691
+ data: this.getTickValues().map((i) => ({
692
+ text: i.toString(),
693
+ x: this.getScaleValue(i),
694
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
695
+ fill: this.axisThemeConfig.labelColor,
696
+ fontSize: this.axisConfig.labelFontSize,
697
+ rotation: 0,
698
+ verticalPos: "top",
699
+ horizontalPos: "center"
700
+ }))
701
+ }), this.showTick) {
702
+ const i = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
703
+ t.push({
704
+ type: "path",
705
+ groupTexts: ["bottom-axis", "ticks"],
706
+ data: this.getTickValues().map((s) => ({
707
+ path: `M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i + this.axisConfig.tickLength}`,
708
+ strokeFill: this.axisThemeConfig.tickColor,
709
+ strokeWidth: this.axisConfig.tickWidth
710
+ }))
711
+ });
712
+ }
713
+ return this.showTitle && t.push({
714
+ type: "text",
715
+ groupTexts: ["bottom-axis", "title"],
716
+ data: [
717
+ {
718
+ text: this.title,
719
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
720
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
721
+ fill: this.axisThemeConfig.titleColor,
722
+ fontSize: this.axisConfig.titleFontSize,
723
+ rotation: 0,
724
+ verticalPos: "top",
725
+ horizontalPos: "center"
726
+ }
727
+ ]
728
+ }), t;
729
+ }
730
+ getDrawableElementsForTopAxis() {
731
+ const t = [];
732
+ if (this.showAxisLine) {
733
+ const i = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
734
+ t.push({
735
+ type: "path",
736
+ groupTexts: ["top-axis", "axis-line"],
737
+ data: [
738
+ {
739
+ path: `M ${this.boundingRect.x},${i} L ${this.boundingRect.x + this.boundingRect.width},${i}`,
740
+ strokeFill: this.axisThemeConfig.axisLineColor,
741
+ strokeWidth: this.axisConfig.axisLineWidth
742
+ }
743
+ ]
744
+ });
745
+ }
746
+ if (this.showLabel && t.push({
747
+ type: "text",
748
+ groupTexts: ["top-axis", "label"],
749
+ data: this.getTickValues().map((i) => ({
750
+ text: i.toString(),
751
+ x: this.getScaleValue(i),
752
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
753
+ fill: this.axisThemeConfig.labelColor,
754
+ fontSize: this.axisConfig.labelFontSize,
755
+ rotation: 0,
756
+ verticalPos: "top",
757
+ horizontalPos: "center"
758
+ }))
759
+ }), this.showTick) {
760
+ const i = this.boundingRect.y;
761
+ t.push({
762
+ type: "path",
763
+ groupTexts: ["top-axis", "ticks"],
764
+ data: this.getTickValues().map((s) => ({
765
+ path: `M ${this.getScaleValue(s)},${i + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(s)},${i + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
766
+ strokeFill: this.axisThemeConfig.tickColor,
767
+ strokeWidth: this.axisConfig.tickWidth
768
+ }))
769
+ });
770
+ }
771
+ return this.showTitle && t.push({
772
+ type: "text",
773
+ groupTexts: ["top-axis", "title"],
774
+ data: [
775
+ {
776
+ text: this.title,
777
+ x: this.boundingRect.x + this.boundingRect.width / 2,
778
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
779
+ fill: this.axisThemeConfig.titleColor,
780
+ fontSize: this.axisConfig.titleFontSize,
781
+ rotation: 0,
782
+ verticalPos: "top",
783
+ horizontalPos: "center"
784
+ }
785
+ ]
786
+ }), t;
787
+ }
788
+ getDrawableElements() {
789
+ if (this.axisPosition === "left")
790
+ return this.getDrawableElementsForLeftAxis();
791
+ if (this.axisPosition === "right")
792
+ throw Error("Drawing of right axis is not implemented");
793
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
794
+ }
795
+ }, a(Q, "BaseAxis"), Q), K, Di = (K = class extends Ut {
796
+ constructor(t, i, s, n, o) {
797
+ super(t, n, o, i), this.categories = s, this.scale = yt().domain(this.categories).range(this.getRange());
798
+ }
799
+ setRange(t) {
800
+ super.setRange(t);
801
+ }
802
+ recalculateScale() {
803
+ this.scale = yt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5), Nt.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
804
+ }
805
+ getTickValues() {
806
+ return this.categories;
807
+ }
808
+ getScaleValue(t) {
809
+ return this.scale(t) ?? this.getRange()[0];
810
+ }
811
+ }, a(K, "BandAxis"), K), Z, vi = (Z = class extends Ut {
812
+ constructor(t, i, s, n, o) {
813
+ super(t, n, o, i), this.domain = s, this.scale = zt().domain(this.domain).range(this.getRange());
814
+ }
815
+ getTickValues() {
816
+ return this.scale.ticks();
817
+ }
818
+ recalculateScale() {
819
+ const t = [...this.domain];
820
+ this.axisPosition === "left" && t.reverse(), this.scale = zt().domain(t).range(this.getRange());
821
+ }
822
+ getScaleValue(t) {
823
+ return this.scale(t);
824
+ }
825
+ }, a(Z, "LinearAxis"), Z);
826
+ function wt(e, t, i, s) {
827
+ const n = new Ht(s);
828
+ return _t(e) ? new Di(
829
+ t,
830
+ i,
831
+ e.categories,
832
+ e.title,
833
+ n
834
+ ) : new vi(
835
+ t,
836
+ i,
837
+ [e.min, e.max],
838
+ e.title,
839
+ n
840
+ );
841
+ }
842
+ a(wt, "getAxis");
843
+ var J, Pi = (J = class {
844
+ constructor(t, i, s, n) {
845
+ this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
846
+ x: 0,
847
+ y: 0,
848
+ width: 0,
849
+ height: 0
850
+ }, this.showChartTitle = !1;
851
+ }
852
+ setBoundingBoxXY(t) {
853
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
854
+ }
855
+ calculateSpace(t) {
856
+ const i = this.textDimensionCalculator.getMaxDimension(
857
+ [this.chartData.title],
858
+ this.chartConfig.titleFontSize
859
+ ), s = Math.max(i.width, t.width), n = i.height + 2 * this.chartConfig.titlePadding;
860
+ return i.width <= s && i.height <= n && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = s, this.boundingRect.height = n, this.showChartTitle = !0), {
861
+ width: this.boundingRect.width,
862
+ height: this.boundingRect.height
863
+ };
864
+ }
865
+ getDrawableElements() {
866
+ const t = [];
867
+ return this.showChartTitle && t.push({
868
+ groupTexts: ["chart-title"],
869
+ type: "text",
870
+ data: [
871
+ {
872
+ fontSize: this.chartConfig.titleFontSize,
873
+ text: this.chartData.title,
874
+ verticalPos: "middle",
875
+ horizontalPos: "center",
876
+ x: this.boundingRect.x + this.boundingRect.width / 2,
877
+ y: this.boundingRect.y + this.boundingRect.height / 2,
878
+ fill: this.chartThemeConfig.titleColor,
879
+ rotation: 0
880
+ }
881
+ ]
882
+ }), t;
883
+ }
884
+ }, a(J, "ChartTitle"), J);
885
+ function $t(e, t, i, s) {
886
+ const n = new Ht(s);
887
+ return new Pi(n, e, t, i);
888
+ }
889
+ a($t, "getChartTitleComponent");
890
+ var tt, Li = (tt = class {
891
+ constructor(t, i, s, n, o) {
892
+ this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = n, this.plotIndex = o;
893
+ }
894
+ getDrawableElement() {
895
+ const t = this.plotData.data.map((s) => [
896
+ this.xAxis.getScaleValue(s[0]),
897
+ this.yAxis.getScaleValue(s[1])
898
+ ]);
899
+ let i;
900
+ return this.orientation === "horizontal" ? i = Wt().y((s) => s[0]).x((s) => s[1])(t) : i = Wt().x((s) => s[0]).y((s) => s[1])(t), i ? [
901
+ {
902
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
903
+ type: "path",
904
+ data: [
905
+ {
906
+ path: i,
907
+ strokeFill: this.plotData.strokeFill,
908
+ strokeWidth: this.plotData.strokeWidth
909
+ }
910
+ ]
911
+ }
912
+ ] : [];
913
+ }
914
+ }, a(tt, "LinePlot"), tt), it, Ei = (it = class {
915
+ constructor(t, i, s, n, o, g) {
916
+ this.barData = t, this.boundingRect = i, this.xAxis = s, this.yAxis = n, this.orientation = o, this.plotIndex = g;
917
+ }
918
+ getDrawableElement() {
919
+ const t = this.barData.data.map((o) => [
920
+ this.xAxis.getScaleValue(o[0]),
921
+ this.yAxis.getScaleValue(o[1])
922
+ ]), s = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - 0.05), n = s / 2;
923
+ return this.orientation === "horizontal" ? [
924
+ {
925
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
926
+ type: "rect",
927
+ data: t.map((o) => ({
928
+ x: this.boundingRect.x,
929
+ y: o[0] - n,
930
+ height: s,
931
+ width: o[1] - this.boundingRect.x,
932
+ fill: this.barData.fill,
933
+ strokeWidth: 0,
934
+ strokeFill: this.barData.fill
935
+ }))
936
+ }
937
+ ] : [
938
+ {
939
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
940
+ type: "rect",
941
+ data: t.map((o) => ({
942
+ x: o[0] - n,
943
+ y: o[1],
944
+ width: s,
945
+ height: this.boundingRect.y + this.boundingRect.height - o[1],
946
+ fill: this.barData.fill,
947
+ strokeWidth: 0,
948
+ strokeFill: this.barData.fill
949
+ }))
950
+ }
951
+ ];
952
+ }
953
+ }, a(it, "BarPlot"), it), et, Ii = (et = class {
954
+ constructor(t, i, s) {
955
+ this.chartConfig = t, this.chartData = i, this.chartThemeConfig = s, this.boundingRect = {
956
+ x: 0,
957
+ y: 0,
958
+ width: 0,
959
+ height: 0
960
+ };
961
+ }
962
+ setAxes(t, i) {
963
+ this.xAxis = t, this.yAxis = i;
964
+ }
965
+ setBoundingBoxXY(t) {
966
+ this.boundingRect.x = t.x, this.boundingRect.y = t.y;
967
+ }
968
+ calculateSpace(t) {
969
+ return this.boundingRect.width = t.width, this.boundingRect.height = t.height, {
970
+ width: this.boundingRect.width,
971
+ height: this.boundingRect.height
972
+ };
973
+ }
974
+ getDrawableElements() {
975
+ if (!(this.xAxis && this.yAxis))
976
+ throw Error("Axes must be passed to render Plots");
977
+ const t = [];
978
+ for (const [i, s] of this.chartData.plots.entries())
979
+ switch (s.type) {
980
+ case "line":
981
+ {
982
+ const n = new Li(
983
+ s,
984
+ this.xAxis,
985
+ this.yAxis,
986
+ this.chartConfig.chartOrientation,
987
+ i
988
+ );
989
+ t.push(...n.getDrawableElement());
990
+ }
991
+ break;
992
+ case "bar":
993
+ {
994
+ const n = new Ei(
995
+ s,
996
+ this.boundingRect,
997
+ this.xAxis,
998
+ this.yAxis,
999
+ this.chartConfig.chartOrientation,
1000
+ i
1001
+ );
1002
+ t.push(...n.getDrawableElement());
1003
+ }
1004
+ break;
1005
+ }
1006
+ return t;
1007
+ }
1008
+ }, a(et, "BasePlot"), et);
1009
+ function qt(e, t, i) {
1010
+ return new Ii(e, t, i);
1011
+ }
1012
+ a(qt, "getPlotComponent");
1013
+ var st, Mi = (st = class {
1014
+ constructor(t, i, s, n) {
1015
+ this.chartConfig = t, this.chartData = i, this.componentStore = {
1016
+ title: $t(t, i, s, n),
1017
+ plot: qt(t, i, s),
1018
+ xAxis: wt(
1019
+ i.xAxis,
1020
+ t.xAxis,
1021
+ {
1022
+ titleColor: s.xAxisTitleColor,
1023
+ labelColor: s.xAxisLabelColor,
1024
+ tickColor: s.xAxisTickColor,
1025
+ axisLineColor: s.xAxisLineColor
1026
+ },
1027
+ n
1028
+ ),
1029
+ yAxis: wt(
1030
+ i.yAxis,
1031
+ t.yAxis,
1032
+ {
1033
+ titleColor: s.yAxisTitleColor,
1034
+ labelColor: s.yAxisLabelColor,
1035
+ tickColor: s.yAxisTickColor,
1036
+ axisLineColor: s.yAxisLineColor
1037
+ },
1038
+ n
1039
+ )
1040
+ };
1041
+ }
1042
+ calculateVerticalSpace() {
1043
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), g = Math.floor(
1044
+ i * this.chartConfig.plotReservedSpacePercent / 100
1045
+ ), m = this.componentStore.plot.calculateSpace({
1046
+ width: o,
1047
+ height: g
1048
+ });
1049
+ t -= m.width, i -= m.height, m = this.componentStore.title.calculateSpace({
1050
+ width: this.chartConfig.width,
1051
+ height: i
1052
+ }), n = m.height, i -= m.height, this.componentStore.xAxis.setAxisPosition("bottom"), m = this.componentStore.xAxis.calculateSpace({
1053
+ width: t,
1054
+ height: i
1055
+ }), i -= m.height, this.componentStore.yAxis.setAxisPosition("left"), m = this.componentStore.yAxis.calculateSpace({
1056
+ width: t,
1057
+ height: i
1058
+ }), s = m.width, t -= m.width, t > 0 && (o += t, t = 0), i > 0 && (g += i, i = 0), this.componentStore.plot.calculateSpace({
1059
+ width: o,
1060
+ height: g
1061
+ }), this.componentStore.plot.setBoundingBoxXY({ x: s, y: n }), this.componentStore.xAxis.setRange([s, s + o]), this.componentStore.xAxis.setBoundingBoxXY({ x: s, y: n + g }), this.componentStore.yAxis.setRange([n, n + g]), this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: n }), this.chartData.plots.some((p) => At(p)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1062
+ }
1063
+ calculateHorizontalSpace() {
1064
+ let t = this.chartConfig.width, i = this.chartConfig.height, s = 0, n = 0, o = 0, g = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), m = Math.floor(
1065
+ i * this.chartConfig.plotReservedSpacePercent / 100
1066
+ ), p = this.componentStore.plot.calculateSpace({
1067
+ width: g,
1068
+ height: m
1069
+ });
1070
+ t -= p.width, i -= p.height, p = this.componentStore.title.calculateSpace({
1071
+ width: this.chartConfig.width,
1072
+ height: i
1073
+ }), s = p.height, i -= p.height, this.componentStore.xAxis.setAxisPosition("left"), p = this.componentStore.xAxis.calculateSpace({
1074
+ width: t,
1075
+ height: i
1076
+ }), t -= p.width, n = p.width, this.componentStore.yAxis.setAxisPosition("top"), p = this.componentStore.yAxis.calculateSpace({
1077
+ width: t,
1078
+ height: i
1079
+ }), i -= p.height, o = s + p.height, t > 0 && (g += t, t = 0), i > 0 && (m += i, i = 0), this.componentStore.plot.calculateSpace({
1080
+ width: g,
1081
+ height: m
1082
+ }), this.componentStore.plot.setBoundingBoxXY({ x: n, y: o }), this.componentStore.yAxis.setRange([n, n + g]), this.componentStore.yAxis.setBoundingBoxXY({ x: n, y: s }), this.componentStore.xAxis.setRange([o, o + m]), this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: o }), this.chartData.plots.some((k) => At(k)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1083
+ }
1084
+ calculateSpace() {
1085
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1086
+ }
1087
+ getDrawableElement() {
1088
+ this.calculateSpace();
1089
+ const t = [];
1090
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1091
+ for (const i of Object.values(this.componentStore))
1092
+ t.push(...i.getDrawableElements());
1093
+ return t;
1094
+ }
1095
+ }, a(st, "Orchestrator"), st), nt, Vi = (nt = class {
1096
+ static build(t, i, s, n) {
1097
+ return new Mi(t, i, s, n).getDrawableElement();
1098
+ }
1099
+ }, a(nt, "XYChartBuilder"), nt), rt = 0, Gt, ot = Tt(), ht = Rt(), A = Dt(), Ct = ht.plotColorPalette.split(",").map((e) => e.trim()), gt = !1, kt = !1;
1100
+ function Rt() {
1101
+ const e = wi(), t = St();
1102
+ return Yt(e.xyChart, t.themeVariables.xyChart);
1103
+ }
1104
+ a(Rt, "getChartDefaultThemeConfig");
1105
+ function Tt() {
1106
+ const e = St();
1107
+ return Yt(
1108
+ Ai.xyChart,
1109
+ e.xyChart
1110
+ );
1111
+ }
1112
+ a(Tt, "getChartDefaultConfig");
1113
+ function Dt() {
1114
+ return {
1115
+ yAxis: {
1116
+ type: "linear",
1117
+ title: "",
1118
+ min: 1 / 0,
1119
+ max: -1 / 0
1120
+ },
1121
+ xAxis: {
1122
+ type: "band",
1123
+ title: "",
1124
+ categories: []
1125
+ },
1126
+ title: "",
1127
+ plots: []
1128
+ };
1129
+ }
1130
+ a(Dt, "getChartDefaultData");
1131
+ function xt(e) {
1132
+ const t = St();
1133
+ return Ci(e.trim(), t);
1134
+ }
1135
+ a(xt, "textSanitizer");
1136
+ function jt(e) {
1137
+ Gt = e;
1138
+ }
1139
+ a(jt, "setTmpSVGG");
1140
+ function Qt(e) {
1141
+ e === "horizontal" ? ot.chartOrientation = "horizontal" : ot.chartOrientation = "vertical";
1142
+ }
1143
+ a(Qt, "setOrientation");
1144
+ function Kt(e) {
1145
+ A.xAxis.title = xt(e.text);
1146
+ }
1147
+ a(Kt, "setXAxisTitle");
1148
+ function vt(e, t) {
1149
+ A.xAxis = { type: "linear", title: A.xAxis.title, min: e, max: t }, gt = !0;
1150
+ }
1151
+ a(vt, "setXAxisRangeData");
1152
+ function Zt(e) {
1153
+ A.xAxis = {
1154
+ type: "band",
1155
+ title: A.xAxis.title,
1156
+ categories: e.map((t) => xt(t.text))
1157
+ }, gt = !0;
1158
+ }
1159
+ a(Zt, "setXAxisBand");
1160
+ function Jt(e) {
1161
+ A.yAxis.title = xt(e.text);
1162
+ }
1163
+ a(Jt, "setYAxisTitle");
1164
+ function ti(e, t) {
1165
+ A.yAxis = { type: "linear", title: A.yAxis.title, min: e, max: t }, kt = !0;
1166
+ }
1167
+ a(ti, "setYAxisRangeData");
1168
+ function ii(e) {
1169
+ const t = Math.min(...e), i = Math.max(...e), s = G(A.yAxis) ? A.yAxis.min : 1 / 0, n = G(A.yAxis) ? A.yAxis.max : -1 / 0;
1170
+ A.yAxis = {
1171
+ type: "linear",
1172
+ title: A.yAxis.title,
1173
+ min: Math.min(s, t),
1174
+ max: Math.max(n, i)
1175
+ };
1176
+ }
1177
+ a(ii, "setYAxisRangeFromPlotData");
1178
+ function Pt(e) {
1179
+ let t = [];
1180
+ if (e.length === 0)
1181
+ return t;
1182
+ if (!gt) {
1183
+ const i = G(A.xAxis) ? A.xAxis.min : 1 / 0, s = G(A.xAxis) ? A.xAxis.max : -1 / 0;
1184
+ vt(Math.min(i, 1), Math.max(s, e.length));
1185
+ }
1186
+ if (kt || ii(e), _t(A.xAxis) && (t = A.xAxis.categories.map((i, s) => [i, e[s]])), G(A.xAxis)) {
1187
+ const i = A.xAxis.min, s = A.xAxis.max, n = (s - i) / (e.length - 1), o = [];
1188
+ for (let g = i; g <= s; g += n)
1189
+ o.push(`${g}`);
1190
+ t = o.map((g, m) => [g, e[m]]);
1191
+ }
1192
+ return t;
1193
+ }
1194
+ a(Pt, "transformDataWithoutCategory");
1195
+ function Lt(e) {
1196
+ return Ct[e === 0 ? 0 : e % Ct.length];
1197
+ }
1198
+ a(Lt, "getPlotColorFromPalette");
1199
+ function ei(e, t) {
1200
+ const i = Pt(t);
1201
+ A.plots.push({
1202
+ type: "line",
1203
+ strokeFill: Lt(rt),
1204
+ strokeWidth: 2,
1205
+ data: i
1206
+ }), rt++;
1207
+ }
1208
+ a(ei, "setLineData");
1209
+ function si(e, t) {
1210
+ const i = Pt(t);
1211
+ A.plots.push({
1212
+ type: "bar",
1213
+ fill: Lt(rt),
1214
+ data: i
1215
+ }), rt++;
1216
+ }
1217
+ a(si, "setBarData");
1218
+ function ni() {
1219
+ if (A.plots.length === 0)
1220
+ throw Error("No Plot to render, please provide a plot with some data");
1221
+ return A.title = Xt(), Vi.build(ot, A, ht, Gt);
1222
+ }
1223
+ a(ni, "getDrawableElem");
1224
+ function ai() {
1225
+ return ht;
1226
+ }
1227
+ a(ai, "getChartThemeConfig");
1228
+ function ri() {
1229
+ return ot;
1230
+ }
1231
+ a(ri, "getChartConfig");
1232
+ function oi() {
1233
+ return A;
1234
+ }
1235
+ a(oi, "getXYChartData");
1236
+ var Bi = /* @__PURE__ */ a(function() {
1237
+ bi(), rt = 0, ot = Tt(), A = Dt(), ht = Rt(), Ct = ht.plotColorPalette.split(",").map((e) => e.trim()), gt = !1, kt = !1;
1238
+ }, "clear"), Wi = {
1239
+ getDrawableElem: ni,
1240
+ clear: Bi,
1241
+ setAccTitle: pi,
1242
+ getAccTitle: fi,
1243
+ setDiagramTitle: di,
1244
+ getDiagramTitle: Xt,
1245
+ getAccDescription: xi,
1246
+ setAccDescription: gi,
1247
+ setOrientation: Qt,
1248
+ setXAxisTitle: Kt,
1249
+ setXAxisRangeData: vt,
1250
+ setXAxisBand: Zt,
1251
+ setYAxisTitle: Jt,
1252
+ setYAxisRangeData: ti,
1253
+ setLineData: ei,
1254
+ setBarData: si,
1255
+ setTmpSVGG: jt,
1256
+ getChartThemeConfig: ai,
1257
+ getChartConfig: ri,
1258
+ getXYChartData: oi
1259
+ }, zi = /* @__PURE__ */ a((e, t, i, s) => {
1260
+ const n = s.db, o = n.getChartThemeConfig(), g = n.getChartConfig(), m = n.getXYChartData().plots[0].data.map((y) => y[1]);
1261
+ function p(y) {
1262
+ return y === "top" ? "text-before-edge" : "middle";
1263
+ }
1264
+ a(p, "getDominantBaseLine");
1265
+ function k(y) {
1266
+ return y === "left" ? "start" : y === "right" ? "end" : "middle";
1267
+ }
1268
+ a(k, "getTextAnchor");
1269
+ function v(y) {
1270
+ return `translate(${y.x}, ${y.y}) rotate(${y.rotation || 0})`;
1271
+ }
1272
+ a(v, "getTextTransformation"), Nt.debug(`Rendering xychart chart
1273
+ ` + e);
1274
+ const C = mi(t), b = C.append("g").attr("class", "main"), E = b.append("rect").attr("width", g.width).attr("height", g.height).attr("class", "background");
1275
+ yi(C, g.height, g.width, !0), C.attr("viewBox", `0 0 ${g.width} ${g.height}`), E.attr("fill", o.backgroundColor), n.setTmpSVGG(C.append("g").attr("class", "mermaid-tmp-group"));
1276
+ const D = n.getDrawableElem(), P = {};
1277
+ function I(y) {
1278
+ let _ = b, c = "";
1279
+ for (const [W] of y.entries()) {
1280
+ let z = b;
1281
+ W > 0 && P[c] && (z = P[c]), c += y[W], _ = P[c], _ || (_ = P[c] = z.append("g").attr("class", y[W]));
1282
+ }
1283
+ return _;
1284
+ }
1285
+ a(I, "getGroup");
1286
+ for (const y of D) {
1287
+ if (y.data.length === 0)
1288
+ continue;
1289
+ const _ = I(y.groupTexts);
1290
+ switch (y.type) {
1291
+ case "rect":
1292
+ if (_.selectAll("rect").data(y.data).enter().append("rect").attr("x", (c) => c.x).attr("y", (c) => c.y).attr("width", (c) => c.width).attr("height", (c) => c.height).attr("fill", (c) => c.fill).attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth), g.showDataLabel)
1293
+ if (g.chartOrientation === "horizontal") {
1294
+ let c = function(l, L) {
1295
+ const { data: S, label: R } = l;
1296
+ return L * R.length * W <= S.width - 10;
1297
+ };
1298
+ a(c, "fitsHorizontally");
1299
+ const W = 0.7, z = y.data.map((l, L) => ({ data: l, label: m[L].toString() })).filter((l) => l.data.width > 0 && l.data.height > 0), U = z.map((l) => {
1300
+ const { data: L } = l;
1301
+ let S = L.height * 0.7;
1302
+ for (; !c(l, S) && S > 0; )
1303
+ S -= 1;
1304
+ return S;
1305
+ }), X = Math.floor(Math.min(...U));
1306
+ _.selectAll("text").data(z).enter().append("text").attr("x", (l) => l.data.x + l.data.width - 10).attr("y", (l) => l.data.y + l.data.height / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").attr("fill", "black").attr("font-size", `${X}px`).text((l) => l.label);
1307
+ } else {
1308
+ let c = function(l, L, S) {
1309
+ const { data: R, label: $ } = l, N = L * $.length * 0.7, F = R.x + R.width / 2, h = F - N / 2, u = F + N / 2, x = h >= R.x && u <= R.x + R.width, d = R.y + S + L <= R.y + R.height;
1310
+ return x && d;
1311
+ };
1312
+ a(c, "fitsInBar");
1313
+ const W = 10, z = y.data.map((l, L) => ({ data: l, label: m[L].toString() })).filter((l) => l.data.width > 0 && l.data.height > 0), U = z.map((l) => {
1314
+ const { data: L, label: S } = l;
1315
+ let R = L.width / (S.length * 0.7);
1316
+ for (; !c(l, R, W) && R > 0; )
1317
+ R -= 1;
1318
+ return R;
1319
+ }), X = Math.floor(Math.min(...U));
1320
+ _.selectAll("text").data(z).enter().append("text").attr("x", (l) => l.data.x + l.data.width / 2).attr("y", (l) => l.data.y + W).attr("text-anchor", "middle").attr("dominant-baseline", "hanging").attr("fill", "black").attr("font-size", `${X}px`).text((l) => l.label);
1321
+ }
1322
+ break;
1323
+ case "text":
1324
+ _.selectAll("text").data(y.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (c) => c.fill).attr("font-size", (c) => c.fontSize).attr("dominant-baseline", (c) => p(c.verticalPos)).attr("text-anchor", (c) => k(c.horizontalPos)).attr("transform", (c) => v(c)).text((c) => c.text);
1325
+ break;
1326
+ case "path":
1327
+ _.selectAll("path").data(y.data).enter().append("path").attr("d", (c) => c.path).attr("fill", (c) => c.fill ? c.fill : "none").attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth);
1328
+ break;
1329
+ }
1330
+ }
1331
+ }, "draw"), Fi = {
1332
+ draw: zi
1333
+ }, Hi = {
1334
+ parser: Ti,
1335
+ db: Wi,
1336
+ renderer: Fi
1337
+ };
1338
+ export {
1339
+ Hi as diagram
1340
+ };