@juki-team/base-ui 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -7
- package/dist/esm/{BarChart-DGvfKEbJ.js → BarChart-ilBguU5i.js} +1 -1
- package/dist/esm/{CartesianChart-BLpd_e8l.js → CartesianChart-B4Big96I.js} +1 -1
- package/dist/esm/{ChangePasswordModal-8aYa6mTN.js → ChangePasswordModal-B1Ahfv-S.js} +1 -1
- package/dist/esm/{CodeEditor-BKMFVmPO.js → CodeEditor-Co_-jMMN.js} +1 -1
- package/dist/esm/{CodeViewer-DqO18gks.js → CodeViewer-j4tlytYb.js} +1 -1
- package/dist/esm/{Collapse-DMLYcciz.js → Collapse-B_Oe1-5C.js} +1 -1
- package/dist/esm/{DataGrid-C-Gco96b.js → DataGrid-B0Av-VN8.js} +1 -1
- package/dist/esm/{DataViewer-DIROui4g.js → DataViewer-jViuraZ_.js} +1 -1
- package/dist/esm/{DrawerView-Be_ckf6D.js → DrawerView-BoMapmAb.js} +1 -1
- package/dist/esm/{ExcalidrawButton-DWRJMohJ.js → ExcalidrawButton-DRR-2JvH.js} +1 -1
- package/dist/esm/{GraphvizViewer-DUIJSiDq.js → GraphvizViewer-DEJDUNWF.js} +1 -1
- package/dist/esm/{ImageLoaderCropper-O3UDeKd5.js → ImageLoaderCropper-CeYhv904.js} +1 -1
- package/dist/esm/{InputCellPhoneNumber-ByG_R6dr.js → InputCellPhoneNumber-C7hpcqFZ.js} +1 -1
- package/dist/esm/{InputColor-C_JNgwYl.js → InputColor-BhVac99k.js} +1 -1
- package/dist/esm/{LineChart-BkCo4cnj.js → LineChart-_gtzHQbx.js} +1 -1
- package/dist/esm/{MdMath-C38RmN3O.js → MdMath-BtS290JE.js} +1 -1
- package/dist/esm/{MdMathEditor-C7surRiM.js → MdMathEditor-B41-_-_8.js} +2 -2
- package/dist/esm/{Popover-BaP7hJ0J.js → Popover-BGWBnVdT.js} +1 -1
- package/dist/esm/{SlideDeck-CpWGHFVE.js → SlideDeck-NtKwXHq5.js} +1 -1
- package/dist/esm/{TableOfContents-888D-B0V.js → TableOfContents-DBBkdhlJ.js} +1 -1
- package/dist/esm/{Tooltip-CNWDFJKv.js → Tooltip-DaBTZZ8j.js} +1 -1
- package/dist/esm/{UserCodeEditor-C0MyUL5-.js → UserCodeEditor-DdyfLlQs.js} +2 -2
- package/dist/esm/{VirtualizedRowsFixed-CYPaWB5L.js → VirtualizedRowsFixed-BAjhFO3R.js} +1 -1
- package/dist/esm/{WorksheetAsSlides-BNOZBoQY.js → WorksheetAsSlides-B5FB6vVz.js} +1 -1
- package/dist/esm/{WorksheetBodies-CHTN-wn9.js → WorksheetBodies-2hrTre13.js} +1 -1
- package/dist/esm/{WorksheetContents-IN63vuWT.js → WorksheetContents-CdM17xrm.js} +1 -1
- package/dist/esm/{WorksheetEditor-Hs_sWk7j.js → WorksheetEditor-HdlEcmnN.js} +1 -1
- package/dist/esm/{WorksheetNode-DGuKOPTt.js → WorksheetNode-C-TrJMCB.js} +1 -1
- package/dist/esm/{WorksheetViewer-Bt_jqHdh.js → WorksheetViewer-D0Co4NMK.js} +1 -1
- package/dist/esm/{architecture-YZFGNWBL-BExtdnEH.js → architecture-YZFGNWBL-Pv0ede3r.js} +1 -1
- package/dist/esm/{architectureDiagram-Q4EWVU46-CUhUPzlC.js → architectureDiagram-Q4EWVU46-Qs_XxOCt.js} +1 -1
- package/dist/esm/{blockDiagram-DXYQGD6D-DwW8YrKx.js → blockDiagram-DXYQGD6D-CG7oWqi7.js} +1 -1
- package/dist/esm/{c4Diagram-AHTNJAMY-DUUpakLg.js → c4Diagram-AHTNJAMY-DyGWi7Su.js} +1 -1
- package/dist/esm/channel-DjjqTXV9.js +1 -0
- package/dist/esm/{chunk-4BX2VUAB-BwFNstmG.js → chunk-4BX2VUAB-7TA7AVyu.js} +1 -1
- package/dist/esm/{chunk-4TB4RGXK-DV5sTBnv.js → chunk-4TB4RGXK-ChheKyYi.js} +1 -1
- package/dist/esm/{chunk-55IACEB6-BPJEY6mM.js → chunk-55IACEB6-BpHVIT0b.js} +1 -1
- package/dist/esm/{chunk-EDXVE4YY-9L7nz82K.js → chunk-EDXVE4YY-DQ25JIov.js} +1 -1
- package/dist/esm/{chunk-FMBD7UC4-BZMcHvFk.js → chunk-FMBD7UC4-DVZBlcm4.js} +1 -1
- package/dist/esm/{chunk-OYMX7WX6-COWCWylB.js → chunk-OYMX7WX6-BgiA8Wjh.js} +1 -1
- package/dist/esm/{chunk-QZHKN3VN-D2pIW1ss.js → chunk-QZHKN3VN-Cq1a-aN-.js} +1 -1
- package/dist/esm/{chunk-YZCP3GAM-D9GadUwL.js → chunk-YZCP3GAM-BDqtM1Ka.js} +1 -1
- package/dist/esm/{classDiagram-6PBFFD2Q-Cr8ipQ5w.js → classDiagram-6PBFFD2Q-D-xRfeAV.js} +1 -1
- package/dist/esm/{classDiagram-v2-HSJHXN6E-Cr8ipQ5w.js → classDiagram-v2-HSJHXN6E-D-xRfeAV.js} +1 -1
- package/dist/esm/clone-DCVnqO4M.js +1 -0
- package/dist/esm/{cose-bilkent-S5V4N54A-Dg1f2q8q.js → cose-bilkent-S5V4N54A-uYVAtvEb.js} +1 -1
- package/dist/esm/{dagre-KV5264BT-Drwedjf_.js → dagre-KV5264BT-CmDBeo-P.js} +1 -1
- package/dist/esm/{diagram-5BDNPKRD-BUvinU3I.js → diagram-5BDNPKRD-DVvj2_2u.js} +1 -1
- package/dist/esm/{diagram-G4DWMVQ6-D60Wox58.js → diagram-G4DWMVQ6-DYpFO01Z.js} +1 -1
- package/dist/esm/{diagram-MMDJMWI5-C60GB5LZ.js → diagram-MMDJMWI5-CDbT7cky.js} +1 -1
- package/dist/esm/{diagram-TYMM5635-CMF-zVic.js → diagram-TYMM5635-QWJ6iFCJ.js} +1 -1
- package/dist/esm/{erDiagram-SMLLAGMA-BmCfxmBR.js → erDiagram-SMLLAGMA-BaIhydf3.js} +1 -1
- package/dist/esm/{flowDiagram-DWJPFMVM-CVOjnh-h.js → flowDiagram-DWJPFMVM--s6o35x5.js} +1 -1
- package/dist/esm/{ganttDiagram-T4ZO3ILL-Cay-LcBr.js → ganttDiagram-T4ZO3ILL-CE7k2fwu.js} +1 -1
- package/dist/esm/{gitGraph-7Q5UKJZL-BIhofRTU.js → gitGraph-7Q5UKJZL-Dw9SBp3L.js} +1 -1
- package/dist/esm/{gitGraphDiagram-UUTBAWPF-BN1EkaA3.js → gitGraphDiagram-UUTBAWPF-VFFCKAr8.js} +1 -1
- package/dist/esm/{graph-XFLEVMvo.js → graph-C49NoLzy.js} +1 -1
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/index-CP5vpK1A.js +1 -0
- package/dist/esm/{index-D4D24Np7.js → index-DmCvSgoi.js} +1 -1
- package/dist/esm/{info-OMHHGYJF-DMKJgJ3s.js → info-OMHHGYJF-uLTg2g1k.js} +1 -1
- package/dist/esm/{infoDiagram-42DDH7IO-kAZbkK9S.js → infoDiagram-42DDH7IO-DfB27x0W.js} +1 -1
- package/dist/esm/{ishikawaDiagram-UXIWVN3A-MtQmxrIE.js → ishikawaDiagram-UXIWVN3A-hkiElo3Y.js} +1 -1
- package/dist/esm/{journeyDiagram-VCZTEJTY-BuKFXeHL.js → journeyDiagram-VCZTEJTY-svJ9aZB7.js} +1 -1
- package/dist/esm/{kanban-definition-6JOO6SKY-pGcXhhi7.js → kanban-definition-6JOO6SKY-aCGgjGQa.js} +1 -1
- package/dist/esm/{layout-D9uGd7GO.js → layout-Dn6BZDTj.js} +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/{mermaid-parser.core-Crc-QLCi.js → mermaid-parser.core-KtTYbDqg.js} +1 -1
- package/dist/esm/{mermaid.core-C2hrg85i.js → mermaid.core-Crnpnced.js} +1 -1
- package/dist/esm/{mindmap-definition-QFDTVHPH-CtfxHH9N.js → mindmap-definition-QFDTVHPH-D0c-OxXp.js} +1 -1
- package/dist/esm/{packet-4T2RLAQJ-BD2Ad6jE.js → packet-4T2RLAQJ-FrKYDPbn.js} +1 -1
- package/dist/esm/{pie-ZZUOXDRM-Bf017PqT.js → pie-ZZUOXDRM-obOGHjHy.js} +1 -1
- package/dist/esm/{pieDiagram-DEJITSTG-ChBbMYd8.js → pieDiagram-DEJITSTG-Ago1dmgK.js} +1 -1
- package/dist/esm/{quadrantDiagram-34T5L4WZ-BNmMB-pp.js → quadrantDiagram-34T5L4WZ-f7CWEYhG.js} +1 -1
- package/dist/esm/{radar-PYXPWWZC-DvvZel7z.js → radar-PYXPWWZC-BEcFMluC.js} +1 -1
- package/dist/esm/{requirementDiagram-MS252O5E-B1RjmS2l.js → requirementDiagram-MS252O5E-B_KOoVtP.js} +1 -1
- package/dist/esm/{sankeyDiagram-XADWPNL6-DSuRDDHI.js → sankeyDiagram-XADWPNL6-BpENeDG-.js} +1 -1
- package/dist/esm/{sequenceDiagram-FGHM5R23-ByfYuCTD.js → sequenceDiagram-FGHM5R23-DjCr8k36.js} +1 -1
- package/dist/esm/{stateDiagram-FHFEXIEX-CMjgjvak.js → stateDiagram-FHFEXIEX-B0Hp6EQN.js} +1 -1
- package/dist/esm/{stateDiagram-v2-QKLJ7IA2-htYMk5r5.js → stateDiagram-v2-QKLJ7IA2-DDbvXv_Y.js} +1 -1
- package/dist/esm/{timeline-definition-GMOUNBTQ-COFLk0ve.js → timeline-definition-GMOUNBTQ-nYM0ar6p.js} +1 -1
- package/dist/esm/{treeView-SZITEDCU-Ck6yPSxL.js → treeView-SZITEDCU-BNkk4mhj.js} +1 -1
- package/dist/esm/{treemap-W4RFUUIX-ErJXCLFJ.js → treemap-W4RFUUIX-DWvE4iLu.js} +1 -1
- package/dist/esm/{types-rkDjePoL.js → types-JRcv-6PR.js} +1 -1
- package/dist/esm/{vennDiagram-DHZGUBPP-xxvi147V.js → vennDiagram-DHZGUBPP-CQ4yw6a2.js} +1 -1
- package/dist/esm/{wardley-RL74JXVD-B3jC7s0b.js → wardley-RL74JXVD-BYbSDrTb.js} +1 -1
- package/dist/esm/{wardleyDiagram-NUSXRM2D-CIYzWE9T.js → wardleyDiagram-NUSXRM2D-ChuA4cDu.js} +1 -1
- package/dist/esm/{websocket-CxbYBjHT.js → websocket-C4PinjUD.js} +1 -1
- package/dist/esm/{xychartDiagram-5P7HB3ND-CHfEshBW.js → xychartDiagram-5P7HB3ND-C_GW0EwI.js} +1 -1
- package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButton.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButtonLoader.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInline/utils.d.ts +3 -0
- package/package.json +2 -2
- package/src/styles/components/atoms/_tabs-inline.scss +7 -0
- package/dist/esm/channel-a8NrvAcc.js +0 -1
- package/dist/esm/clone-1ULLnhdV.js +0 -1
- package/dist/esm/index-EPJhFLhN.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as e}from"./index-EPJhFLhN.js";import{l as n,v as t,m as l,j as o,k as r,S as a}from"./types-rkDjePoL.js";function i(e){const n=[],t=String(e||"");let l=t.indexOf(","),o=0,r=!1;for(;!r;){-1===l&&(l=t.length,r=!0);const e=t.slice(o,l).trim();!e&&r||n.push(e),o=l+1,l=t.indexOf(",",o)}return n}function u(e,n){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}const s=/[$_\p{ID_Start}]/u,c=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,p=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,f=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e){return!!e&&s.test(String.fromCodePoint(e))}function m(e,n){const t=(n||h).jsx?p:c;return!!e&&t.test(String.fromCodePoint(e))}function y(e,n){return((n||h).jsx?d:f).test(e)}const v=/[ \t\n\f\r]/g;function b(e){return"object"==typeof e?"text"===e.type&&w(e.value):w(e)}function w(e){return""===e.replace(v,"")}class x{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}}function k(e,n){const t={},l={};for(const n of e)Object.assign(t,n.property),Object.assign(l,n.normal);return new x(t,l,n)}function C(e){return e.toLowerCase()}x.prototype.normal={},x.prototype.property={},x.prototype.space=void 0;class S{constructor(e,n){this.attribute=n,this.property=e}}S.prototype.attribute="",S.prototype.booleanish=!1,S.prototype.boolean=!1,S.prototype.commaOrSpaceSeparated=!1,S.prototype.commaSeparated=!1,S.prototype.defined=!1,S.prototype.mustUseProperty=!1,S.prototype.number=!1,S.prototype.overloadedBoolean=!1,S.prototype.property="",S.prototype.spaceSeparated=!1,S.prototype.space=void 0;let D=0;const A=T(),N=T(),L=T(),O=T(),P=T(),M=T(),R=T();function T(){return 2**++D}var E=Object.freeze({__proto__:null,boolean:A,booleanish:N,commaOrSpaceSeparated:R,commaSeparated:M,number:O,overloadedBoolean:L,spaceSeparated:P});const I=Object.keys(E);class B extends S{constructor(e,n,t,l){let o=-1;if(super(e,n),U(this,"space",l),"number"==typeof t)for(;++o<I.length;){const e=I[o];U(this,I[o],(t&E[e])===E[e])}}}function U(e,n,t){t&&(e[n]=t)}function j(e){const n={},t={};for(const[l,o]of Object.entries(e.properties)){const r=new B(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),n[l]=r,t[C(l)]=l,t[C(r.attribute)]=l}return new x(n,t,e.space)}B.prototype.defined=!0;const z=j({properties:{ariaActiveDescendant:null,ariaAtomic:N,ariaAutoComplete:null,ariaBusy:N,ariaChecked:N,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:P,ariaCurrent:null,ariaDescribedBy:P,ariaDetails:null,ariaDisabled:N,ariaDropEffect:P,ariaErrorMessage:null,ariaExpanded:N,ariaFlowTo:P,ariaGrabbed:N,ariaHasPopup:null,ariaHidden:N,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P,ariaLevel:O,ariaLive:null,ariaModal:N,ariaMultiLine:N,ariaMultiSelectable:N,ariaOrientation:null,ariaOwns:P,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:N,ariaReadOnly:N,ariaRelevant:null,ariaRequired:N,ariaRoleDescription:P,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:N,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform:(e,n)=>"role"===n?n:"aria-"+n.slice(4).toLowerCase()});function F(e,n){return n in e?e[n]:n}function _(e,n){return F(e,n.toLowerCase())}const H=j({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:M,acceptCharset:P,accessKey:P,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:P,autoFocus:A,autoPlay:A,blocking:P,capture:null,charSet:null,checked:A,cite:null,className:P,cols:O,colSpan:null,content:null,contentEditable:N,controls:A,controlsList:P,coords:O|M,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:L,draggable:N,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:P,height:O,hidden:L,high:O,href:null,hrefLang:null,htmlFor:P,httpEquiv:P,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:P,itemRef:P,itemScope:A,itemType:P,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:A,optimum:O,pattern:null,ping:P,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:P,required:A,reversed:A,rows:O,rowSpan:O,sandbox:P,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:N,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:N,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:N,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:A,disableRemotePlayback:A,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:_}),V=j({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:R,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:P,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:M,g2:M,glyphName:M,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:R,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:R,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:R,rev:R,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:R,requiredFeatures:R,requiredFonts:R,requiredFormats:R,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:R,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:R,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:R,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F}),q=j({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,n)=>"xlink:"+n.slice(5).toLowerCase()}),K=j({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_}),W=j({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,n)=>"xml:"+n.slice(3).toLowerCase()}),X={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$=/[A-Z]/g,Y=/-[a-z]/g,G=/^data[-\w.:]+$/i;function Z(e,n){const t=C(n);let l=n,o=S;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&"data"===t.slice(0,4)&&G.test(n)){if("-"===n.charAt(4)){const e=n.slice(5).replace(Y,Q);l="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=n.slice(4);if(!Y.test(e)){let t=e.replace($,J);"-"!==t.charAt(0)&&(t="-"+t),n="data"+t}}o=B}return new o(l,n)}function J(e){return"-"+e.toLowerCase()}function Q(e){return e.charAt(1).toUpperCase()}const ee=k([z,H,q,K,W],"html"),ne=k([z,V,q,K,W],"svg");function te(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function le(e){return e.join(" ").trim()}var oe,re,ae,ie={};function ue(){if(ae)return ie;ae=1;var e=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ie,"__esModule",{value:!0}),ie.default=function(e,t){let l=null;if(!e||"string"!=typeof e)return l;const o=(0,n.default)(e),r="function"==typeof t;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:o}=e;r?t(n,o,e):o&&(l=l||{},l[n]=o)}),l};const n=e(function(){if(re)return oe;re=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,u="";function s(e){return e?e.replace(i,u):u}return oe=function(i,c){if("string"!=typeof i)throw new TypeError("First argument must be a string");if(!i)return[];c=c||{};var p=1,f=1;function d(e){var t=e.match(n);t&&(p+=t.length);var l=e.lastIndexOf("\n");f=~l?e.length-l:f+e.length}function h(){var e={line:p,column:f};return function(n){return n.position=new g(e),v(),n}}function g(e){this.start=e,this.end={line:p,column:f},this.source=c.source}function m(e){var n=new Error(c.source+":"+p+":"+f+": "+e);if(n.reason=e,n.filename=c.source,n.line=p,n.column=f,n.source=i,!c.silent)throw n}function y(e){var n=e.exec(i);if(n){var t=n[0];return d(t),i=i.slice(t.length),n}}function v(){y(t)}function b(e){var n;for(e=e||[];n=w();)!1!==n&&e.push(n);return e}function w(){var e=h();if("/"==i.charAt(0)&&"*"==i.charAt(1)){for(var n=2;u!=i.charAt(n)&&("*"!=i.charAt(n)||"/"!=i.charAt(n+1));)++n;if(n+=2,u===i.charAt(n-1))return m("End of comment missing");var t=i.slice(2,n-2);return f+=2,d(t),i=i.slice(n),f+=2,e({type:"comment",comment:t})}}function x(){var n=h(),t=y(l);if(t){if(w(),!y(o))return m("property missing ':'");var i=y(r),c=n({type:"declaration",property:s(t[0].replace(e,u)),value:i?s(i[0].replace(e,u)):u});return y(a),c}}return g.prototype.content=i,v(),function(){var e,n=[];for(b(n);e=x();)!1!==e&&(n.push(e),b(n));return n}()},oe}());return ie}var se,ce,pe,fe={};function de(){if(se)return fe;se=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,r=function(e,n){return n.toUpperCase()},a=function(e,n){return"".concat(n,"-")};return fe.camelCase=function(i,u){return void 0===u&&(u={}),function(n){return!n||t.test(n)||e.test(n)}(i)?i:(i=i.toLowerCase(),(i=u.reactCompat?i.replace(o,a):i.replace(l,a)).replace(n,r))},fe}var he=function(){if(pe)return ce;pe=1;var e=(ce&&ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ue()),n=de();function t(t,l){var o={};return t&&"string"==typeof t?((0,e.default)(t,function(e,t){e&&t&&(o[(0,n.camelCase)(e,l)]=t)}),o):o}return t.default=t,ce=t}(),ge=e(he);const me=ve("end"),ye=ve("start");function ve(e){return function(n){const t=n&&n.position&&n.position[e]||{};if("number"==typeof t.line&&t.line>0&&"number"==typeof t.column&&t.column>0)return{line:t.line,column:t.column,offset:"number"==typeof t.offset&&t.offset>-1?t.offset:void 0}}}function be(e){const n=ye(e),t=me(e);if(n&&t)return{start:n,end:t}}function we(e){const t=[];let l=-1,o=0,r=0;for(;++l<e.length;){const a=e.charCodeAt(l);let i="";if(37===a&&n(e.charCodeAt(l+1))&&n(e.charCodeAt(l+2)))r=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const n=e.charCodeAt(l+1);a<56320&&n>56319&&n<57344?(i=String.fromCharCode(a,n),r=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,l),encodeURIComponent(i)),o=l+r+1,i=""),r&&(l+=r,r=0)}return t.join("")+e.slice(o)}function xe(e,n){const t=n.referenceType;let l="]";if("collapsed"===t?l+="[]":"full"===t&&(l+="["+(n.label||n.identifier)+"]"),"imageReference"===n.type)return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),r=o[0];r&&"text"===r.type?r.value="["+r.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=l:o.push({type:"text",value:l}),o}function ke(e){const n=e.spread;return null==n?e.children.length>1:n}function Ce(e){const n=String(e),t=/\r?\n|\r/g;let l=t.exec(n),o=0;const r=[];for(;l;)r.push(Se(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=t.exec(n);return r.push(Se(n.slice(o),o>0,!1)),r.join("")}function Se(e,n,t){let l=0,o=e.length;if(n){let n=e.codePointAt(l);for(;9===n||32===n;)l++,n=e.codePointAt(l)}if(t){let n=e.codePointAt(o-1);for(;9===n||32===n;)o--,n=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}const De={blockquote:function(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)},break:function(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:"\n"}]},code:function(e,n){const t=n.value?n.value+"\n":"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:t}]};return n.meta&&(r.data={meta:n.meta}),e.patch(n,r),r=e.applyData(n,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(n,r),r},delete:function(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},emphasis:function(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},footnoteReference:function(e,n){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=we(l.toLowerCase()),r=e.footnoteOrder.indexOf(l);let a,i=e.footnoteCounts.get(l);void 0===i?(i=0,e.footnoteOrder.push(l),a=e.footnoteOrder.length):a=r+1,i+=1,e.footnoteCounts.set(l,i);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+o,id:t+"fnref-"+o+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,s),e.applyData(n,s)},heading:function(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},html:function(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}},imageReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={src:we(l.url||""),alt:n.alt};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,r),e.applyData(n,r)},image:function(e,n){const t={src:we(n.url)};null!==n.alt&&void 0!==n.alt&&(t.alt=n.alt),null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,l),e.applyData(n,l)},inlineCode:function(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const l={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,l),e.applyData(n,l)},linkReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={href:we(l.url||"")};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)},link:function(e,n){const t={href:we(n.url)};null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)},listItem:function(e,n,t){const l=e.all(n),o=t?function(e){let n=!1;if("list"===e.type){n=e.spread||!1;const t=e.children;let l=-1;for(;!n&&++l<t.length;)n=ke(t[l])}return n}(t):ke(n),r={},a=[];if("boolean"==typeof n.checked){const e=l[0];let t;e&&"element"===e.type&&"p"===e.tagName?t=e:(t={type:"element",tagName:"p",properties:{},children:[]},l.unshift(t)),t.children.length>0&&t.children.unshift({type:"text",value:" "}),t.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let i=-1;for(;++i<l.length;){const e=l[i];(o||0!==i||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const u=l[l.length-1];u&&(o||"element"!==u.type||"p"!==u.tagName)&&a.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:r,children:a};return e.patch(n,s),e.applyData(n,s)},list:function(e,n){const t={},l=e.all(n);let o=-1;for("number"==typeof n.start&&1!==n.start&&(t.start=n.start);++o<l.length;){const e=l[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const r={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(l,!0)};return e.patch(n,r),e.applyData(n,r)},paragraph:function(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},root:function(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)},strong:function(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},table:function(e,n){const t=e.all(n),l=t.shift(),o=[];if(l){const t={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],t),o.push(t)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},r=ye(n.children[1]),a=me(n.children[n.children.length-1]);r&&a&&(l.position={start:r,end:a}),o.push(l)}const r={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,r),e.applyData(n,r)},tableCell:function(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},tableRow:function(e,n,t){const l=t?t.children:void 0,o=0===(l?l.indexOf(n):1)?"th":"td",r=t&&"table"===t.type?t.align:void 0,a=r?r.length:n.children.length;let i=-1;const u=[];for(;++i<a;){const t=n.children[i],l={},a=r?r[i]:void 0;a&&(l.align=a);let s={type:"element",tagName:o,properties:l,children:[]};t&&(s.children=e.all(t),e.patch(t,s),s=e.applyData(t,s)),u.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,s),e.applyData(n,s)},text:function(e,n){const t={type:"text",value:Ce(String(n.value))};return e.patch(n,t),e.applyData(n,t)},thematicBreak:function(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)},toml:Ae,yaml:Ae,definition:Ae,footnoteDefinition:Ae};function Ae(){}const Ne="object"==typeof self?self:globalThis,Le=e=>((e,n)=>{const t=(n,t)=>(e.set(t,n),n),l=o=>{if(e.has(o))return e.get(o);const[r,a]=n[o];switch(r){case 0:case-1:return t(a,o);case 1:{const e=t([],o);for(const n of a)e.push(l(n));return e}case 2:{const e=t({},o);for(const[n,t]of a)e[l(n)]=l(t);return e}case 3:return t(new Date(a),o);case 4:{const{source:e,flags:n}=a;return t(new RegExp(e,n),o)}case 5:{const e=t(new Map,o);for(const[n,t]of a)e.set(l(n),l(t));return e}case 6:{const e=t(new Set,o);for(const n of a)e.add(l(n));return e}case 7:{const{name:e,message:n}=a;return t(new Ne[e](n),o)}case 8:return t(BigInt(a),o);case"BigInt":return t(Object(BigInt(a)),o);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return t(new DataView(e),a)}}return t(new Ne[r](a),o)};return l})(new Map,e)(0),Oe="",{toString:Pe}={},{keys:Me}=Object,Re=e=>{const n=typeof e;if("object"!==n||!e)return[0,n];const t=Pe.call(e).slice(8,-1);switch(t){case"Array":return[1,Oe];case"Object":return[2,Oe];case"Date":return[3,Oe];case"RegExp":return[4,Oe];case"Map":return[5,Oe];case"Set":return[6,Oe];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Te=([e,n])=>0===e&&("function"===n||"symbol"===n),Ee=(e,{json:n,lossy:t}={})=>{const l=[];return((e,n,t,l)=>{const o=(e,n)=>{const o=l.push(e)-1;return t.set(n,o),o},r=l=>{if(t.has(l))return t.get(l);let[a,i]=Re(l);switch(a){case 0:{let n=l;switch(i){case"bigint":a=8,n=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);n=null;break;case"undefined":return o([-1],l)}return o([a,n],l)}case 1:{if(i){let e=l;return"DataView"===i?e=new Uint8Array(l.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(l)),o([i,[...e]],l)}const e=[],n=o([a,e],l);for(const n of l)e.push(r(n));return n}case 2:{if(i)switch(i){case"BigInt":return o([i,l.toString()],l);case"Boolean":case"Number":case"String":return o([i,l.valueOf()],l)}if(n&&"toJSON"in l)return r(l.toJSON());const t=[],u=o([a,t],l);for(const n of Me(l))!e&&Te(Re(l[n]))||t.push([r(n),r(l[n])]);return u}case 3:return o([a,l.toISOString()],l);case 4:{const{source:e,flags:n}=l;return o([a,{source:e,flags:n}],l)}case 5:{const n=[],t=o([a,n],l);for(const[t,o]of l)(e||!Te(Re(t))&&!Te(Re(o)))&&n.push([r(t),r(o)]);return t}case 6:{const n=[],t=o([a,n],l);for(const t of l)!e&&Te(Re(t))||n.push(r(t));return t}}const{message:u}=l;return o([a,{name:i,message:u}],l)};return r})(!(n||t),!!n,new Map,l)(e),l};var Ie="function"==typeof structuredClone?(e,n)=>n&&("json"in n||"lossy"in n)?Le(Ee(e,n)):structuredClone(e):(e,n)=>Le(Ee(e,n));function Be(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ue(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}const je={}.hasOwnProperty,ze={};function Fe(e,n){e.position&&(n.position=be(e))}function _e(e,n){let t=n;if(e&&e.data){const n=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if("string"==typeof n)if("element"===t.type)t.tagName=n;else{t={type:"element",tagName:n,properties:{},children:"children"in t?t.children:[t]}}"element"===t.type&&o&&Object.assign(t.properties,Ie(o)),"children"in t&&t.children&&null!=l&&(t.children=l)}return t}function He(e,n){const t=n.data||{},l=!("value"in n)||je.call(t,"hProperties")||je.call(t,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(n)}:{type:"text",value:n.value};return e.patch(n,l),e.applyData(n,l)}function Ve(e,n){const t=[];let l=-1;for(n&&t.push({type:"text",value:"\n"});++l<e.length;)l&&t.push({type:"text",value:"\n"}),t.push(e[l]);return n&&e.length>0&&t.push({type:"text",value:"\n"}),t}function qe(e){let n=0,t=e.charCodeAt(n);for(;9===t||32===t;)n++,t=e.charCodeAt(n);return e.slice(n)}function Ke(e,n){const l=function(e,n){const l=n||ze,o=new Map,r=new Map,a=new Map,i={...De,...l.handlers},u={all:function(e){const n=[];if("children"in e){const t=e.children;let l=-1;for(;++l<t.length;){const o=u.one(t[l],e);if(o){if(l&&"break"===t[l-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=qe(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=qe(e.value))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n},applyData:_e,definitionById:o,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,n){const t=e.type,l=u.handlers[t];if(je.call(u.handlers,t)&&l)return l(u,e,n);if(u.options.passThrough&&u.options.passThrough.includes(t)){if("children"in e){const{children:n,...t}=e,l=Ie(t);return l.children=u.all(e),l}return Ie(e)}return(u.options.unknownHandler||He)(u,e,n)},options:l,patch:Fe,wrap:Ve};return t(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const n="definition"===e.type?o:r,t=String(e.identifier).toUpperCase();n.has(t)||n.set(t,e)}}),u}(e,n),o=l.one(e,void 0),r=function(e){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Be,l=e.options.footnoteBackLabel||Ue,o=e.options.footnoteLabel||"Footnotes",r=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let u=-1;for(;++u<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[u]);if(!o)continue;const r=e.all(o),a=String(o.identifier).toUpperCase(),s=we(a.toLowerCase());let c=0;const p=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++c<=f;){p.length>0&&p.push({type:"text",value:" "});let e="string"==typeof t?t:t(u,c);"string"==typeof e&&(e={type:"text",value:e}),p.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof l?l:l(u,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const d=r[r.length-1];if(d&&"element"===d.type&&"p"===d.tagName){const e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...p)}else r.push(...p);const h={type:"element",tagName:"li",properties:{id:n+"fn-"+s},children:e.wrap(r,!0)};e.patch(o,h),i.push(h)}if(0!==i.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Ie(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:"\n"}]}}(l),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return r&&a.children.push({type:"text",value:"\n"},r),a}function We(e,n){return e&&"run"in e?async function(t,l){const o=Ke(t,{file:l,...n});await e.run(o,l)}:function(t,l){return Ke(t,{file:l,...e||n})}}const Xe=/[#.]/g;function $e(e,n,t){const l=t?function(e){const n=new Map;for(const t of e)n.set(t.toLowerCase(),t);return n}(t):void 0;return function(t,o,...r){let a;if(null==t){a={type:"root",children:[]};const e=o;r.unshift(e)}else{a=function(e,n){const t=e||"",l={};let o,r,a=0;for(;a<t.length;){Xe.lastIndex=a;const e=Xe.exec(t),n=t.slice(a,e?e.index:t.length);n&&(o?"#"===o?l.id=n:Array.isArray(l.className)?l.className.push(n):l.className=[n]:r=n,a+=n.length),e&&(o=e[0],a++)}return{type:"element",tagName:r||n||"div",properties:l,children:[]}}(t,n);const i=a.tagName.toLowerCase(),u=l?l.get(i):void 0;if(a.tagName=u||i,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const n=e,t=Object.keys(e);for(const e of t){const t=n[e];if(t&&"object"==typeof t){if(!Array.isArray(t))return!0;const e=t;for(const n of e)if("number"!=typeof n&&"string"!=typeof n)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(o))r.unshift(o);else for(const[n,t]of Object.entries(o))Ye(e,a.properties,n,t)}for(const e of r)Ge(a.children,e);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function Ye(e,n,t,l){const o=Z(e,t);let r;if(null!=l){if("number"==typeof l){if(Number.isNaN(l))return;r=l}else r="boolean"==typeof l?l:"string"==typeof l?o.spaceSeparated?te(l):o.commaSeparated?i(l):o.commaOrSpaceSeparated?te(i(l).join(" ")):Ze(o,o.property,l):Array.isArray(l)?[...l]:"style"===o.property?function(e){const n=[];for(const[t,l]of Object.entries(e))n.push([t,l].join(": "));return n.join("; ")}(l):String(l);if(Array.isArray(r)){const e=[];for(const n of r)e.push(Ze(o,o.property,n));r=e}"className"===o.property&&Array.isArray(n.className)&&(r=n.className.concat(r)),n[o.property]=r}}function Ge(e,n){if(null==n);else if("number"==typeof n||"string"==typeof n)e.push({type:"text",value:String(n)});else if(Array.isArray(n))for(const t of n)Ge(e,t);else{if("object"!=typeof n||!("type"in n))throw new Error("Expected node, nodes, or string, got `"+n+"`");"root"===n.type?Ge(e,n.children):e.push(n)}}function Ze(e,n,t){if("string"==typeof t){if(e.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((e.boolean||e.overloadedBoolean)&&(""===t||C(t)===C(n)))return!0}return t}const Je=$e(ee,"div"),Qe=$e(ne,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),en={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nn(e,n){const t=function(e,n){switch(e.nodeType){case 1:return function(e,n){const t=e.namespaceURI,l=t===en.svg?Qe:Je,o=t===en.html?e.tagName.toLowerCase():e.tagName,r=t===en.html&&"template"===o?e.content:e,a=e.getAttributeNames(),i={};let u=-1;for(;++u<a.length;)i[a[u]]=e.getAttribute(a[u])||"";return l(o,i,ln(r,n))}(e,n);case 3:return function(e){return{type:"text",value:e.nodeValue||""}}(e);case 8:return function(e){return{type:"comment",value:e.nodeValue||""}}(e);case 9:return tn(e,n);case 10:return{type:"doctype"};case 11:return tn(e,n);default:return}}(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function tn(e,n){return{type:"root",children:ln(e,n)}}function ln(e,n){const t=e.childNodes,l=[];let o=-1;for(;++o<t.length;){const e=nn(t[o],n);void 0!==e&&l.push(e)}return l}function on(e,n){const t=function(e){const n=document.createElement("template");return n.innerHTML=e,n.content}(e);return nn(t,{})||{type:"root",children:[]}}new DOMParser;const rn=function(e,n,t){const o=l(t);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if("number"==typeof n){if(n<0||n===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if((n=e.children.indexOf(n))<0)throw new Error("Expected child node or index");for(;++n<e.children.length;)if(o(e.children[n],n,e))return e.children[n]},an=function(e){if(null==e)return sn;if("string"==typeof e)return function(e){return un(n);function n(n){return n.tagName===e}}(e);if("object"==typeof e)return function(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=an(e[t]);return un(l);function l(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}(e);if("function"==typeof e)return un(e);throw new Error("Expected function, string, or array as `test`")};function un(e){return function(n,t,l){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e&&"tagName"in e}(n)&&e.call(this,n,"number"==typeof t?t:void 0,l||void 0))}}function sn(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}const cn=/\n/g,pn=/[\t ]+/g,fn=an("br"),dn=an(function(e){return"td"===e.tagName||"th"===e.tagName}),hn=an("p"),gn=an("tr"),mn=an(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return Boolean((e.properties||{}).hidden)},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),yn=an(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function vn(e,n,t){return"element"===e.type?function(e,n,t){const l=xn(e,t),o=e.children||[];let r,a,i=-1,u=[];if(mn(e))return u;fn(e)||gn(e)&&rn(n,e,gn)?a="\n":hn(e)?(r=2,a=2):yn(e)&&(r=1,a=1);for(;++i<o.length;)u=u.concat(vn(o[i],e,{whitespace:l,breakBefore:i?void 0:r,breakAfter:i<o.length-1?fn(o[i+1]):a}));dn(e)&&rn(n,e,dn)&&u.push("\t");r&&u.unshift(r);a&&u.push(a);return u}(e,n,t):"text"===e.type?"normal"===t.whitespace?bn(e,t):function(e){return[String(e.value)]}(e):[]}function bn(e,n){const t=String(e.value),l=[],o=[];let r=0;for(;r<=t.length;){cn.lastIndex=r;const e=cn.exec(t),o=e&&"index"in e?e.index:t.length;l.push(wn(t.slice(r,o).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==r||n.breakBefore,o!==t.length||n.breakAfter)),r=o+1}let a,i=-1;for(;++i<l.length;)8203===l[i].charCodeAt(l[i].length-1)||i<l.length-1&&8203===l[i+1].charCodeAt(0)?(o.push(l[i]),a=void 0):l[i]?("number"==typeof a&&o.push(a),o.push(l[i]),a=0):0!==i&&i!==l.length-1||o.push(0);return o}function wn(e,n,t){const l=[];let o,r=0;for(;r<e.length;){pn.lastIndex=r;const t=pn.exec(e);o=t?t.index:e.length,r||o||!t||n||l.push(""),r!==o&&l.push(e.slice(r,o)),r=t?o+t[0].length:o}return r===o||t||l.push(""),l.join(" ")}function xn(e,n){if("element"===e.type){const t=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}const kn={},Cn=[];function Sn(e){const n=e||kn;return function(e,t){o(e,"element",function(e,l){const o=Array.isArray(e.properties.className)?e.properties.className:Cn,i=o.includes("language-math"),u=o.includes("math-display"),s=o.includes("math-inline");let c=u;if(!i&&!u&&!s)return;let p=l[l.length-1],f=e;if("code"===e.tagName&&i&&p&&"element"===p.type&&"pre"===p.tagName&&(f=p,p=l[l.length-2],c=!0),!p)return;const d=function(e,n){const t=n||{},l="children"in e?e.children:[],o=yn(e),r=xn(e,{whitespace:t.whitespace||"normal"}),a=[];"text"!==e.type&&"comment"!==e.type||a.push(...bn(e,{breakBefore:!0,breakAfter:!0}));let i=-1;for(;++i<l.length;)a.push(...vn(l[i],e,{whitespace:r,breakBefore:i?void 0:o,breakAfter:i<l.length-1?fn(l[i+1]):o}));const u=[];let s;for(i=-1;++i<a.length;){const e=a[i];"number"==typeof e?void 0!==s&&e>s&&(s=e):e&&(void 0!==s&&s>-1&&u.push("\n".repeat(s)||" "),s=-1,u.push(e))}return u.join("")}(f,{whitespace:"pre"});let h;try{h=r.renderToString(d,{...n,displayMode:c,throwOnError:!0})}catch(o){const a=o,i=a.name.toLowerCase();t.message("Could not render math with KaTeX",{ancestors:[...l,e],cause:a,place:e.position,ruleId:i,source:"rehype-katex"});try{h=r.renderToString(d,{...n,displayMode:c,strict:"ignore",throwOnError:!1})}catch{h=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(n.errorColor||"#cc0000"),title:String(o)},children:[{type:"text",value:d}]}]}}if("string"==typeof h){h=on(h).children}const g=p.children.indexOf(f);return p.children.splice(g,1,...h),a})}}export{u as a,le as b,X as c,ge as d,en as e,Z as f,Qe as g,ee as h,Je as i,me as j,Ie as k,Sn as l,be as m,y as n,g as o,ye as p,m as q,We as r,ne as s,b as w};
|
|
1
|
+
import{y as e}from"./index-CP5vpK1A.js";import{l as n,v as t,m as l,j as o,k as r,S as a}from"./types-JRcv-6PR.js";function i(e){const n=[],t=String(e||"");let l=t.indexOf(","),o=0,r=!1;for(;!r;){-1===l&&(l=t.length,r=!0);const e=t.slice(o,l).trim();!e&&r||n.push(e),o=l+1,l=t.indexOf(",",o)}return n}function u(e,n){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}const s=/[$_\p{ID_Start}]/u,c=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,p=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,f=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e){return!!e&&s.test(String.fromCodePoint(e))}function m(e,n){const t=(n||h).jsx?p:c;return!!e&&t.test(String.fromCodePoint(e))}function y(e,n){return((n||h).jsx?d:f).test(e)}const v=/[ \t\n\f\r]/g;function b(e){return"object"==typeof e?"text"===e.type&&w(e.value):w(e)}function w(e){return""===e.replace(v,"")}class x{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}}function k(e,n){const t={},l={};for(const n of e)Object.assign(t,n.property),Object.assign(l,n.normal);return new x(t,l,n)}function C(e){return e.toLowerCase()}x.prototype.normal={},x.prototype.property={},x.prototype.space=void 0;class S{constructor(e,n){this.attribute=n,this.property=e}}S.prototype.attribute="",S.prototype.booleanish=!1,S.prototype.boolean=!1,S.prototype.commaOrSpaceSeparated=!1,S.prototype.commaSeparated=!1,S.prototype.defined=!1,S.prototype.mustUseProperty=!1,S.prototype.number=!1,S.prototype.overloadedBoolean=!1,S.prototype.property="",S.prototype.spaceSeparated=!1,S.prototype.space=void 0;let D=0;const A=T(),N=T(),L=T(),O=T(),P=T(),M=T(),R=T();function T(){return 2**++D}var E=Object.freeze({__proto__:null,boolean:A,booleanish:N,commaOrSpaceSeparated:R,commaSeparated:M,number:O,overloadedBoolean:L,spaceSeparated:P});const I=Object.keys(E);class B extends S{constructor(e,n,t,l){let o=-1;if(super(e,n),U(this,"space",l),"number"==typeof t)for(;++o<I.length;){const e=I[o];U(this,I[o],(t&E[e])===E[e])}}}function U(e,n,t){t&&(e[n]=t)}function j(e){const n={},t={};for(const[l,o]of Object.entries(e.properties)){const r=new B(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),n[l]=r,t[C(l)]=l,t[C(r.attribute)]=l}return new x(n,t,e.space)}B.prototype.defined=!0;const z=j({properties:{ariaActiveDescendant:null,ariaAtomic:N,ariaAutoComplete:null,ariaBusy:N,ariaChecked:N,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:P,ariaCurrent:null,ariaDescribedBy:P,ariaDetails:null,ariaDisabled:N,ariaDropEffect:P,ariaErrorMessage:null,ariaExpanded:N,ariaFlowTo:P,ariaGrabbed:N,ariaHasPopup:null,ariaHidden:N,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P,ariaLevel:O,ariaLive:null,ariaModal:N,ariaMultiLine:N,ariaMultiSelectable:N,ariaOrientation:null,ariaOwns:P,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:N,ariaReadOnly:N,ariaRelevant:null,ariaRequired:N,ariaRoleDescription:P,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:N,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform:(e,n)=>"role"===n?n:"aria-"+n.slice(4).toLowerCase()});function F(e,n){return n in e?e[n]:n}function _(e,n){return F(e,n.toLowerCase())}const H=j({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:M,acceptCharset:P,accessKey:P,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:P,autoFocus:A,autoPlay:A,blocking:P,capture:null,charSet:null,checked:A,cite:null,className:P,cols:O,colSpan:null,content:null,contentEditable:N,controls:A,controlsList:P,coords:O|M,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:L,draggable:N,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:P,height:O,hidden:L,high:O,href:null,hrefLang:null,htmlFor:P,httpEquiv:P,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:P,itemRef:P,itemScope:A,itemType:P,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:A,optimum:O,pattern:null,ping:P,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:P,required:A,reversed:A,rows:O,rowSpan:O,sandbox:P,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:N,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:N,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:N,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:A,disableRemotePlayback:A,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:_}),V=j({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:R,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:P,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:M,g2:M,glyphName:M,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:R,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:R,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:R,rev:R,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:R,requiredFeatures:R,requiredFonts:R,requiredFormats:R,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:R,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:R,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:R,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F}),q=j({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,n)=>"xlink:"+n.slice(5).toLowerCase()}),K=j({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_}),W=j({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,n)=>"xml:"+n.slice(3).toLowerCase()}),X={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$=/[A-Z]/g,Y=/-[a-z]/g,G=/^data[-\w.:]+$/i;function Z(e,n){const t=C(n);let l=n,o=S;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&"data"===t.slice(0,4)&&G.test(n)){if("-"===n.charAt(4)){const e=n.slice(5).replace(Y,Q);l="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=n.slice(4);if(!Y.test(e)){let t=e.replace($,J);"-"!==t.charAt(0)&&(t="-"+t),n="data"+t}}o=B}return new o(l,n)}function J(e){return"-"+e.toLowerCase()}function Q(e){return e.charAt(1).toUpperCase()}const ee=k([z,H,q,K,W],"html"),ne=k([z,V,q,K,W],"svg");function te(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function le(e){return e.join(" ").trim()}var oe,re,ae,ie={};function ue(){if(ae)return ie;ae=1;var e=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ie,"__esModule",{value:!0}),ie.default=function(e,t){let l=null;if(!e||"string"!=typeof e)return l;const o=(0,n.default)(e),r="function"==typeof t;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:o}=e;r?t(n,o,e):o&&(l=l||{},l[n]=o)}),l};const n=e(function(){if(re)return oe;re=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,i=/^\s+|\s+$/g,u="";function s(e){return e?e.replace(i,u):u}return oe=function(i,c){if("string"!=typeof i)throw new TypeError("First argument must be a string");if(!i)return[];c=c||{};var p=1,f=1;function d(e){var t=e.match(n);t&&(p+=t.length);var l=e.lastIndexOf("\n");f=~l?e.length-l:f+e.length}function h(){var e={line:p,column:f};return function(n){return n.position=new g(e),v(),n}}function g(e){this.start=e,this.end={line:p,column:f},this.source=c.source}function m(e){var n=new Error(c.source+":"+p+":"+f+": "+e);if(n.reason=e,n.filename=c.source,n.line=p,n.column=f,n.source=i,!c.silent)throw n}function y(e){var n=e.exec(i);if(n){var t=n[0];return d(t),i=i.slice(t.length),n}}function v(){y(t)}function b(e){var n;for(e=e||[];n=w();)!1!==n&&e.push(n);return e}function w(){var e=h();if("/"==i.charAt(0)&&"*"==i.charAt(1)){for(var n=2;u!=i.charAt(n)&&("*"!=i.charAt(n)||"/"!=i.charAt(n+1));)++n;if(n+=2,u===i.charAt(n-1))return m("End of comment missing");var t=i.slice(2,n-2);return f+=2,d(t),i=i.slice(n),f+=2,e({type:"comment",comment:t})}}function x(){var n=h(),t=y(l);if(t){if(w(),!y(o))return m("property missing ':'");var i=y(r),c=n({type:"declaration",property:s(t[0].replace(e,u)),value:i?s(i[0].replace(e,u)):u});return y(a),c}}return g.prototype.content=i,v(),function(){var e,n=[];for(b(n);e=x();)!1!==e&&(n.push(e),b(n));return n}()},oe}());return ie}var se,ce,pe,fe={};function de(){if(se)return fe;se=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,r=function(e,n){return n.toUpperCase()},a=function(e,n){return"".concat(n,"-")};return fe.camelCase=function(i,u){return void 0===u&&(u={}),function(n){return!n||t.test(n)||e.test(n)}(i)?i:(i=i.toLowerCase(),(i=u.reactCompat?i.replace(o,a):i.replace(l,a)).replace(n,r))},fe}var he=function(){if(pe)return ce;pe=1;var e=(ce&&ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ue()),n=de();function t(t,l){var o={};return t&&"string"==typeof t?((0,e.default)(t,function(e,t){e&&t&&(o[(0,n.camelCase)(e,l)]=t)}),o):o}return t.default=t,ce=t}(),ge=e(he);const me=ve("end"),ye=ve("start");function ve(e){return function(n){const t=n&&n.position&&n.position[e]||{};if("number"==typeof t.line&&t.line>0&&"number"==typeof t.column&&t.column>0)return{line:t.line,column:t.column,offset:"number"==typeof t.offset&&t.offset>-1?t.offset:void 0}}}function be(e){const n=ye(e),t=me(e);if(n&&t)return{start:n,end:t}}function we(e){const t=[];let l=-1,o=0,r=0;for(;++l<e.length;){const a=e.charCodeAt(l);let i="";if(37===a&&n(e.charCodeAt(l+1))&&n(e.charCodeAt(l+2)))r=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const n=e.charCodeAt(l+1);a<56320&&n>56319&&n<57344?(i=String.fromCharCode(a,n),r=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,l),encodeURIComponent(i)),o=l+r+1,i=""),r&&(l+=r,r=0)}return t.join("")+e.slice(o)}function xe(e,n){const t=n.referenceType;let l="]";if("collapsed"===t?l+="[]":"full"===t&&(l+="["+(n.label||n.identifier)+"]"),"imageReference"===n.type)return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),r=o[0];r&&"text"===r.type?r.value="["+r.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=l:o.push({type:"text",value:l}),o}function ke(e){const n=e.spread;return null==n?e.children.length>1:n}function Ce(e){const n=String(e),t=/\r?\n|\r/g;let l=t.exec(n),o=0;const r=[];for(;l;)r.push(Se(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=t.exec(n);return r.push(Se(n.slice(o),o>0,!1)),r.join("")}function Se(e,n,t){let l=0,o=e.length;if(n){let n=e.codePointAt(l);for(;9===n||32===n;)l++,n=e.codePointAt(l)}if(t){let n=e.codePointAt(o-1);for(;9===n||32===n;)o--,n=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}const De={blockquote:function(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)},break:function(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:"\n"}]},code:function(e,n){const t=n.value?n.value+"\n":"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:t}]};return n.meta&&(r.data={meta:n.meta}),e.patch(n,r),r=e.applyData(n,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(n,r),r},delete:function(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},emphasis:function(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},footnoteReference:function(e,n){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=we(l.toLowerCase()),r=e.footnoteOrder.indexOf(l);let a,i=e.footnoteCounts.get(l);void 0===i?(i=0,e.footnoteOrder.push(l),a=e.footnoteOrder.length):a=r+1,i+=1,e.footnoteCounts.set(l,i);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+o,id:t+"fnref-"+o+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,s),e.applyData(n,s)},heading:function(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},html:function(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}},imageReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={src:we(l.url||""),alt:n.alt};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,r),e.applyData(n,r)},image:function(e,n){const t={src:we(n.url)};null!==n.alt&&void 0!==n.alt&&(t.alt=n.alt),null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,l),e.applyData(n,l)},inlineCode:function(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const l={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,l),e.applyData(n,l)},linkReference:function(e,n){const t=String(n.identifier).toUpperCase(),l=e.definitionById.get(t);if(!l)return xe(e,n);const o={href:we(l.url||"")};null!==l.title&&void 0!==l.title&&(o.title=l.title);const r={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)},link:function(e,n){const t={href:we(n.url)};null!==n.title&&void 0!==n.title&&(t.title=n.title);const l={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)},listItem:function(e,n,t){const l=e.all(n),o=t?function(e){let n=!1;if("list"===e.type){n=e.spread||!1;const t=e.children;let l=-1;for(;!n&&++l<t.length;)n=ke(t[l])}return n}(t):ke(n),r={},a=[];if("boolean"==typeof n.checked){const e=l[0];let t;e&&"element"===e.type&&"p"===e.tagName?t=e:(t={type:"element",tagName:"p",properties:{},children:[]},l.unshift(t)),t.children.length>0&&t.children.unshift({type:"text",value:" "}),t.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let i=-1;for(;++i<l.length;){const e=l[i];(o||0!==i||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const u=l[l.length-1];u&&(o||"element"!==u.type||"p"!==u.tagName)&&a.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:r,children:a};return e.patch(n,s),e.applyData(n,s)},list:function(e,n){const t={},l=e.all(n);let o=-1;for("number"==typeof n.start&&1!==n.start&&(t.start=n.start);++o<l.length;){const e=l[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const r={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(l,!0)};return e.patch(n,r),e.applyData(n,r)},paragraph:function(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},root:function(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)},strong:function(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},table:function(e,n){const t=e.all(n),l=t.shift(),o=[];if(l){const t={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],t),o.push(t)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},r=ye(n.children[1]),a=me(n.children[n.children.length-1]);r&&a&&(l.position={start:r,end:a}),o.push(l)}const r={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,r),e.applyData(n,r)},tableCell:function(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},tableRow:function(e,n,t){const l=t?t.children:void 0,o=0===(l?l.indexOf(n):1)?"th":"td",r=t&&"table"===t.type?t.align:void 0,a=r?r.length:n.children.length;let i=-1;const u=[];for(;++i<a;){const t=n.children[i],l={},a=r?r[i]:void 0;a&&(l.align=a);let s={type:"element",tagName:o,properties:l,children:[]};t&&(s.children=e.all(t),e.patch(t,s),s=e.applyData(t,s)),u.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,s),e.applyData(n,s)},text:function(e,n){const t={type:"text",value:Ce(String(n.value))};return e.patch(n,t),e.applyData(n,t)},thematicBreak:function(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)},toml:Ae,yaml:Ae,definition:Ae,footnoteDefinition:Ae};function Ae(){}const Ne="object"==typeof self?self:globalThis,Le=e=>((e,n)=>{const t=(n,t)=>(e.set(t,n),n),l=o=>{if(e.has(o))return e.get(o);const[r,a]=n[o];switch(r){case 0:case-1:return t(a,o);case 1:{const e=t([],o);for(const n of a)e.push(l(n));return e}case 2:{const e=t({},o);for(const[n,t]of a)e[l(n)]=l(t);return e}case 3:return t(new Date(a),o);case 4:{const{source:e,flags:n}=a;return t(new RegExp(e,n),o)}case 5:{const e=t(new Map,o);for(const[n,t]of a)e.set(l(n),l(t));return e}case 6:{const e=t(new Set,o);for(const n of a)e.add(l(n));return e}case 7:{const{name:e,message:n}=a;return t(new Ne[e](n),o)}case 8:return t(BigInt(a),o);case"BigInt":return t(Object(BigInt(a)),o);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return t(new DataView(e),a)}}return t(new Ne[r](a),o)};return l})(new Map,e)(0),Oe="",{toString:Pe}={},{keys:Me}=Object,Re=e=>{const n=typeof e;if("object"!==n||!e)return[0,n];const t=Pe.call(e).slice(8,-1);switch(t){case"Array":return[1,Oe];case"Object":return[2,Oe];case"Date":return[3,Oe];case"RegExp":return[4,Oe];case"Map":return[5,Oe];case"Set":return[6,Oe];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Te=([e,n])=>0===e&&("function"===n||"symbol"===n),Ee=(e,{json:n,lossy:t}={})=>{const l=[];return((e,n,t,l)=>{const o=(e,n)=>{const o=l.push(e)-1;return t.set(n,o),o},r=l=>{if(t.has(l))return t.get(l);let[a,i]=Re(l);switch(a){case 0:{let n=l;switch(i){case"bigint":a=8,n=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);n=null;break;case"undefined":return o([-1],l)}return o([a,n],l)}case 1:{if(i){let e=l;return"DataView"===i?e=new Uint8Array(l.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(l)),o([i,[...e]],l)}const e=[],n=o([a,e],l);for(const n of l)e.push(r(n));return n}case 2:{if(i)switch(i){case"BigInt":return o([i,l.toString()],l);case"Boolean":case"Number":case"String":return o([i,l.valueOf()],l)}if(n&&"toJSON"in l)return r(l.toJSON());const t=[],u=o([a,t],l);for(const n of Me(l))!e&&Te(Re(l[n]))||t.push([r(n),r(l[n])]);return u}case 3:return o([a,l.toISOString()],l);case 4:{const{source:e,flags:n}=l;return o([a,{source:e,flags:n}],l)}case 5:{const n=[],t=o([a,n],l);for(const[t,o]of l)(e||!Te(Re(t))&&!Te(Re(o)))&&n.push([r(t),r(o)]);return t}case 6:{const n=[],t=o([a,n],l);for(const t of l)!e&&Te(Re(t))||n.push(r(t));return t}}const{message:u}=l;return o([a,{name:i,message:u}],l)};return r})(!(n||t),!!n,new Map,l)(e),l};var Ie="function"==typeof structuredClone?(e,n)=>n&&("json"in n||"lossy"in n)?Le(Ee(e,n)):structuredClone(e):(e,n)=>Le(Ee(e,n));function Be(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ue(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}const je={}.hasOwnProperty,ze={};function Fe(e,n){e.position&&(n.position=be(e))}function _e(e,n){let t=n;if(e&&e.data){const n=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if("string"==typeof n)if("element"===t.type)t.tagName=n;else{t={type:"element",tagName:n,properties:{},children:"children"in t?t.children:[t]}}"element"===t.type&&o&&Object.assign(t.properties,Ie(o)),"children"in t&&t.children&&null!=l&&(t.children=l)}return t}function He(e,n){const t=n.data||{},l=!("value"in n)||je.call(t,"hProperties")||je.call(t,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(n)}:{type:"text",value:n.value};return e.patch(n,l),e.applyData(n,l)}function Ve(e,n){const t=[];let l=-1;for(n&&t.push({type:"text",value:"\n"});++l<e.length;)l&&t.push({type:"text",value:"\n"}),t.push(e[l]);return n&&e.length>0&&t.push({type:"text",value:"\n"}),t}function qe(e){let n=0,t=e.charCodeAt(n);for(;9===t||32===t;)n++,t=e.charCodeAt(n);return e.slice(n)}function Ke(e,n){const l=function(e,n){const l=n||ze,o=new Map,r=new Map,a=new Map,i={...De,...l.handlers},u={all:function(e){const n=[];if("children"in e){const t=e.children;let l=-1;for(;++l<t.length;){const o=u.one(t[l],e);if(o){if(l&&"break"===t[l-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=qe(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=qe(e.value))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n},applyData:_e,definitionById:o,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,n){const t=e.type,l=u.handlers[t];if(je.call(u.handlers,t)&&l)return l(u,e,n);if(u.options.passThrough&&u.options.passThrough.includes(t)){if("children"in e){const{children:n,...t}=e,l=Ie(t);return l.children=u.all(e),l}return Ie(e)}return(u.options.unknownHandler||He)(u,e,n)},options:l,patch:Fe,wrap:Ve};return t(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const n="definition"===e.type?o:r,t=String(e.identifier).toUpperCase();n.has(t)||n.set(t,e)}}),u}(e,n),o=l.one(e,void 0),r=function(e){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Be,l=e.options.footnoteBackLabel||Ue,o=e.options.footnoteLabel||"Footnotes",r=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[];let u=-1;for(;++u<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[u]);if(!o)continue;const r=e.all(o),a=String(o.identifier).toUpperCase(),s=we(a.toLowerCase());let c=0;const p=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++c<=f;){p.length>0&&p.push({type:"text",value:" "});let e="string"==typeof t?t:t(u,c);"string"==typeof e&&(e={type:"text",value:e}),p.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof l?l:l(u,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const d=r[r.length-1];if(d&&"element"===d.type&&"p"===d.tagName){const e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...p)}else r.push(...p);const h={type:"element",tagName:"li",properties:{id:n+"fn-"+s},children:e.wrap(r,!0)};e.patch(o,h),i.push(h)}if(0!==i.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Ie(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:"\n"}]}}(l),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return r&&a.children.push({type:"text",value:"\n"},r),a}function We(e,n){return e&&"run"in e?async function(t,l){const o=Ke(t,{file:l,...n});await e.run(o,l)}:function(t,l){return Ke(t,{file:l,...e||n})}}const Xe=/[#.]/g;function $e(e,n,t){const l=t?function(e){const n=new Map;for(const t of e)n.set(t.toLowerCase(),t);return n}(t):void 0;return function(t,o,...r){let a;if(null==t){a={type:"root",children:[]};const e=o;r.unshift(e)}else{a=function(e,n){const t=e||"",l={};let o,r,a=0;for(;a<t.length;){Xe.lastIndex=a;const e=Xe.exec(t),n=t.slice(a,e?e.index:t.length);n&&(o?"#"===o?l.id=n:Array.isArray(l.className)?l.className.push(n):l.className=[n]:r=n,a+=n.length),e&&(o=e[0],a++)}return{type:"element",tagName:r||n||"div",properties:l,children:[]}}(t,n);const i=a.tagName.toLowerCase(),u=l?l.get(i):void 0;if(a.tagName=u||i,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const n=e,t=Object.keys(e);for(const e of t){const t=n[e];if(t&&"object"==typeof t){if(!Array.isArray(t))return!0;const e=t;for(const n of e)if("number"!=typeof n&&"string"!=typeof n)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(o))r.unshift(o);else for(const[n,t]of Object.entries(o))Ye(e,a.properties,n,t)}for(const e of r)Ge(a.children,e);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function Ye(e,n,t,l){const o=Z(e,t);let r;if(null!=l){if("number"==typeof l){if(Number.isNaN(l))return;r=l}else r="boolean"==typeof l?l:"string"==typeof l?o.spaceSeparated?te(l):o.commaSeparated?i(l):o.commaOrSpaceSeparated?te(i(l).join(" ")):Ze(o,o.property,l):Array.isArray(l)?[...l]:"style"===o.property?function(e){const n=[];for(const[t,l]of Object.entries(e))n.push([t,l].join(": "));return n.join("; ")}(l):String(l);if(Array.isArray(r)){const e=[];for(const n of r)e.push(Ze(o,o.property,n));r=e}"className"===o.property&&Array.isArray(n.className)&&(r=n.className.concat(r)),n[o.property]=r}}function Ge(e,n){if(null==n);else if("number"==typeof n||"string"==typeof n)e.push({type:"text",value:String(n)});else if(Array.isArray(n))for(const t of n)Ge(e,t);else{if("object"!=typeof n||!("type"in n))throw new Error("Expected node, nodes, or string, got `"+n+"`");"root"===n.type?Ge(e,n.children):e.push(n)}}function Ze(e,n,t){if("string"==typeof t){if(e.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((e.boolean||e.overloadedBoolean)&&(""===t||C(t)===C(n)))return!0}return t}const Je=$e(ee,"div"),Qe=$e(ne,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),en={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nn(e,n){const t=function(e,n){switch(e.nodeType){case 1:return function(e,n){const t=e.namespaceURI,l=t===en.svg?Qe:Je,o=t===en.html?e.tagName.toLowerCase():e.tagName,r=t===en.html&&"template"===o?e.content:e,a=e.getAttributeNames(),i={};let u=-1;for(;++u<a.length;)i[a[u]]=e.getAttribute(a[u])||"";return l(o,i,ln(r,n))}(e,n);case 3:return function(e){return{type:"text",value:e.nodeValue||""}}(e);case 8:return function(e){return{type:"comment",value:e.nodeValue||""}}(e);case 9:return tn(e,n);case 10:return{type:"doctype"};case 11:return tn(e,n);default:return}}(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function tn(e,n){return{type:"root",children:ln(e,n)}}function ln(e,n){const t=e.childNodes,l=[];let o=-1;for(;++o<t.length;){const e=nn(t[o],n);void 0!==e&&l.push(e)}return l}function on(e,n){const t=function(e){const n=document.createElement("template");return n.innerHTML=e,n.content}(e);return nn(t,{})||{type:"root",children:[]}}new DOMParser;const rn=function(e,n,t){const o=l(t);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if("number"==typeof n){if(n<0||n===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if((n=e.children.indexOf(n))<0)throw new Error("Expected child node or index");for(;++n<e.children.length;)if(o(e.children[n],n,e))return e.children[n]},an=function(e){if(null==e)return sn;if("string"==typeof e)return function(e){return un(n);function n(n){return n.tagName===e}}(e);if("object"==typeof e)return function(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=an(e[t]);return un(l);function l(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}(e);if("function"==typeof e)return un(e);throw new Error("Expected function, string, or array as `test`")};function un(e){return function(n,t,l){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e&&"tagName"in e}(n)&&e.call(this,n,"number"==typeof t?t:void 0,l||void 0))}}function sn(e){return Boolean(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}const cn=/\n/g,pn=/[\t ]+/g,fn=an("br"),dn=an(function(e){return"td"===e.tagName||"th"===e.tagName}),hn=an("p"),gn=an("tr"),mn=an(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return Boolean((e.properties||{}).hidden)},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),yn=an(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function vn(e,n,t){return"element"===e.type?function(e,n,t){const l=xn(e,t),o=e.children||[];let r,a,i=-1,u=[];if(mn(e))return u;fn(e)||gn(e)&&rn(n,e,gn)?a="\n":hn(e)?(r=2,a=2):yn(e)&&(r=1,a=1);for(;++i<o.length;)u=u.concat(vn(o[i],e,{whitespace:l,breakBefore:i?void 0:r,breakAfter:i<o.length-1?fn(o[i+1]):a}));dn(e)&&rn(n,e,dn)&&u.push("\t");r&&u.unshift(r);a&&u.push(a);return u}(e,n,t):"text"===e.type?"normal"===t.whitespace?bn(e,t):function(e){return[String(e.value)]}(e):[]}function bn(e,n){const t=String(e.value),l=[],o=[];let r=0;for(;r<=t.length;){cn.lastIndex=r;const e=cn.exec(t),o=e&&"index"in e?e.index:t.length;l.push(wn(t.slice(r,o).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==r||n.breakBefore,o!==t.length||n.breakAfter)),r=o+1}let a,i=-1;for(;++i<l.length;)8203===l[i].charCodeAt(l[i].length-1)||i<l.length-1&&8203===l[i+1].charCodeAt(0)?(o.push(l[i]),a=void 0):l[i]?("number"==typeof a&&o.push(a),o.push(l[i]),a=0):0!==i&&i!==l.length-1||o.push(0);return o}function wn(e,n,t){const l=[];let o,r=0;for(;r<e.length;){pn.lastIndex=r;const t=pn.exec(e);o=t?t.index:e.length,r||o||!t||n||l.push(""),r!==o&&l.push(e.slice(r,o)),r=t?o+t[0].length:o}return r===o||t||l.push(""),l.join(" ")}function xn(e,n){if("element"===e.type){const t=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}const kn={},Cn=[];function Sn(e){const n=e||kn;return function(e,t){o(e,"element",function(e,l){const o=Array.isArray(e.properties.className)?e.properties.className:Cn,i=o.includes("language-math"),u=o.includes("math-display"),s=o.includes("math-inline");let c=u;if(!i&&!u&&!s)return;let p=l[l.length-1],f=e;if("code"===e.tagName&&i&&p&&"element"===p.type&&"pre"===p.tagName&&(f=p,p=l[l.length-2],c=!0),!p)return;const d=function(e,n){const t=n||{},l="children"in e?e.children:[],o=yn(e),r=xn(e,{whitespace:t.whitespace||"normal"}),a=[];"text"!==e.type&&"comment"!==e.type||a.push(...bn(e,{breakBefore:!0,breakAfter:!0}));let i=-1;for(;++i<l.length;)a.push(...vn(l[i],e,{whitespace:r,breakBefore:i?void 0:o,breakAfter:i<l.length-1?fn(l[i+1]):o}));const u=[];let s;for(i=-1;++i<a.length;){const e=a[i];"number"==typeof e?void 0!==s&&e>s&&(s=e):e&&(void 0!==s&&s>-1&&u.push("\n".repeat(s)||" "),s=-1,u.push(e))}return u.join("")}(f,{whitespace:"pre"});let h;try{h=r.renderToString(d,{...n,displayMode:c,throwOnError:!0})}catch(o){const a=o,i=a.name.toLowerCase();t.message("Could not render math with KaTeX",{ancestors:[...l,e],cause:a,place:e.position,ruleId:i,source:"rehype-katex"});try{h=r.renderToString(d,{...n,displayMode:c,strict:"ignore",throwOnError:!1})}catch{h=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(n.errorColor||"#cc0000"),title:String(o)},children:[{type:"text",value:d}]}]}}if("string"==typeof h){h=on(h).children}const g=p.children.indexOf(f);return p.children.splice(g,1,...h),a})}}export{u as a,le as b,X as c,ge as d,en as e,Z as f,Qe as g,ee as h,Je as i,me as j,Ie as k,Sn as l,be as m,y as n,g as o,ye as p,m as q,We as r,ne as s,b as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r}from"./mermaid-parser.core-
|
|
1
|
+
import{c as r}from"./mermaid-parser.core-KtTYbDqg.js";export{I as InfoModule}from"./mermaid-parser.core-KtTYbDqg.js";import"./map-BvlAjF4J.js";import"./_baseIteratee-DJNkOVK7.js";import"./memoize-CPUrcYQl.js";import"./isSymbol-CATEdeai.js";import"./_baseUniq-BJKKUJ6e.js";import"./min-Dc9VrJ6M.js";import"./mermaid.core-Crnpnced.js";import"./index-CP5vpK1A.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-C4PinjUD.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";export{r as createInfoServices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as r,l as t,K as e,e as s}from"./mermaid.core-
|
|
1
|
+
import{_ as r,l as t,K as e,e as s}from"./mermaid.core-Crnpnced.js";import{p as i}from"./mermaid-parser.core-KtTYbDqg.js";import"./index-CP5vpK1A.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-C4PinjUD.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";import"./map-BvlAjF4J.js";import"./_baseIteratee-DJNkOVK7.js";import"./isSymbol-CATEdeai.js";import"./_baseUniq-BJKKUJ6e.js";import"./min-Dc9VrJ6M.js";var o="11.14.0",a={parser:{parse:r(async r=>{const e=await i("info",r);t.debug(e)},"parse")},db:{getVersion:r(()=>o,"getVersion")},renderer:{draw:r((r,i,o)=>{t.debug("rendering info diagram\n"+r);const a=e(i);s(a,100,400,!0);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw")}};export{a as diagram};
|
package/dist/esm/{ishikawaDiagram-UXIWVN3A-MtQmxrIE.js → ishikawaDiagram-UXIWVN3A-hkiElo3Y.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,c as i,P as e,K as n,ab as s,z as a,k as r,q as o,a as h,b as l,g as c,s as u,t as d,e as p}from"./mermaid.core-C2hrg85i.js";import"./index-EPJhFLhN.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-CxbYBjHT.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";var y=function(){var i=t(function(t,i,e,n){for(e=e||{},n=t.length;n--;e[t[n]]=i);return e},"o"),e=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],o=[1,20],h=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],y=[1,6,7,11,13,14],g={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},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,2],[12,1],[12,1],[12,1]],performAction:t(function(t,i,e,n,s,a,r){var o=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[o-1].length,a[o].trim());break;case 16:n.addNode(0,a[o].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:s,14:a},i(r,[2,3]),{1:[2,2]},i(r,[2,4]),i(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:o,7:h,10:17,11:l},i(c,[2,18],{14:[1,21]}),i(c,[2,16]),i(c,[2,17]),{6:o,7:h,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},i(u,[2,14],{7:d,11:p}),i(y,[2,8]),i(y,[2,9]),i(y,[2,10]),i(c,[2,15]),i(u,[2,13],{7:d,11:p}),i(y,[2,11]),i(y,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:t(function(i){var e=this,n=[0],s=[],a=[null],r=[],o=this.table,h="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(i,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),t(m,"lex");for(var k,w,x,b,_,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==k&&(k=m()),x=o[w]&&o[w][k]),void 0===x||!x.length||!x[0]){var E="";for(_ in $=[],o[w])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[k]||k,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+k);switch(x[0]){case 1:n.push(k),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),k=null,c=d.yyleng,h=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[h,c,l,p.yy,x[1],a,r].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:t(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:t(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:t(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===n.length?this.yylloc.first_column:0)+n[n.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:t(function(t,i){var e,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,i,e,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((e=this._input.match(this.rules[s[a]]))&&(!i||e[0].length>i[0].length)){if(i=e,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,i,e,n){switch(e){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function m(){this.yy={}}return g.lexer=f,t(m,"Parser"),m.prototype=g,g.Parser=m,new m}();y.parser=y;var g=y,f=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,a()}getRoot(){return this.root}addNode(t,e){const n=r.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??=t;let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return h()}setAccTitle(t){l(t)}getAccDescription(){return c()}setAccDescription(t){u(t)}getDiagramTitle(){return d()}setDiagramTitle(t){o(t)}},m=250,k=82*Math.PI/180,w=Math.cos(k),x=Math.sin(k),b=t((t,i,e)=>{const n=t.node().getBBox(),s=n.width+2*i,a=n.height+2*i;p(t,a,s,e),t.attr("viewBox",`${n.x-i} ${n.y-i} ${s} ${a}`)},"applyPaddedViewBox"),_=t((t,a,r,o)=>{const h=o.db.getRoot();if(!h)return;const l=i(),{look:c,handDrawnSeed:u,themeVariables:d}=l,p=e(l.fontSize)[0]??14,y="handDrawn"===c,g=h.children??[],f=l.ishikawa?.diagramPadding??20,k=l.ishikawa?.useMaxWidth??!1,w=n(a),x=w.append("g").attr("class","ishikawa"),_=y?s.svg(w.node()):void 0,$=_?{roughSvg:_,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,I=`ishikawa-arrow-${a}`;y||x.append("defs").append("marker").attr("id",I).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let E=0,C=m;const L=y?void 0:P(x,E,C,E,C,"ishikawa-spine");if(S(x,E,C,h.text,p,$),!g.length)return y&&P(x,E,C,E,C,"ishikawa-spine",$),void b(w,f,k);E-=20;const j=g.filter((t,i)=>i%2==0),M=g.filter((t,i)=>i%2==1),T=v(j),B=v(M),N=T.total+B.total;let O=m,D=m;if(N>0){const t=500,i=75;O=Math.max(i,t*(T.total/N)),D=Math.max(i,t*(B.total/N))}const z=2*p;O=Math.max(O,T.max*z),D=Math.max(D,B.max*z),C=Math.max(O,m),L&&L.attr("y1",C).attr("y2",C),x.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const W=Math.ceil(g.length/2);for(let t=0;t<W;t++){const i=x.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[g[2*t],-1,O],[g[2*t+1],1,D]])e&&A(i,e,E,C,n,s,p,$);E=i.selectAll("text").nodes().reduce((t,i)=>Math.min(t,i.getBBox().x),1/0)}if(y)P(x,E,C,0,C,"ishikawa-spine",$);else{L.attr("x1",E);const t=`url(#${I})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}b(w,f,k)},"draw"),v=t(i=>{const e=t(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return i.reduce((t,i)=>{const n=e(i);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),S=t((t,i,e,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),o=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${i},${e})`),h=j(o,L(n,r),0,0,"ishikawa-head-label","start",s),l=h.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);h.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),$=t((i,e)=>{const n=[],s=[],a=t((t,i,r)=>{const o=-1===e?[...t].reverse():t;for(const t of o){const e=n.length,o=t.children??[];n.push({depth:r,text:L(t.text,15),parentIndex:i,childCount:o.length}),r%2==0?(s.push(e),o.length&&a(o,e,r+1)):(o.length&&a(o,e,r+1),s.push(e))}},"walk");return a(i,-1,2),{entries:n,yOrder:s}},"flattenTree"),I=t((t,i,e,n,s,a,r)=>{const o=t.append("g").attr("class","ishikawa-label-group"),h=j(o,i,e,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),E=t((t,i,e,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const o=n/r,h=s/r,l=6*-h,c=6*o,u=`M ${i} ${e} L ${i-6*o*2+l} ${e-6*h*2+c} L ${i-6*o*2-l} ${e-6*h*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),A=t((t,i,e,n,s,a,r,o)=>{const h=i.children??[],l=a*(h.length?1:.2),c=x*l*s,u=e+-w*l,d=n+c;if(P(t,e,n,u,d,"ishikawa-branch",o),o&&E(t,e,n,e-u,n-d,o),I(t,i.text,u,d,s,r,o),!h.length)return;const{entries:p,yOrder:y}=$(h,s),g=p.length,f=new Array(g);for(const[t,i]of y.entries())f[i]=n+c*((t+1)/(g+1));const m=new Map;m.set(-1,{x0:e,y0:n,x1:u,y1:d,childCount:h.length,childrenDrawn:0});const k=-w,b=x*s,_=s<0?"ishikawa-label up":"ishikawa-label down";for(const[i,e]of p.entries()){const n=f[i],s=m.get(e.parentIndex),a=t.append("g").attr("class","ishikawa-sub-group");let h=0,l=0,c=0;if(e.depth%2==0){const t=s.y1-s.y0;h=M(s.x0,s.x1,t?(n-s.y0)/t:.5),l=n,c=h-(e.childCount>0?60+5*e.childCount:30),P(a,h,n,c,n,"ishikawa-sub-branch",o),o&&E(a,h,n,1,0,o),j(a,e.text,c,n,"ishikawa-label align","end",r)}else{const t=s.childrenDrawn++;h=M(s.x0,s.x1,(s.childCount-t)/(s.childCount+1)),l=s.y0,c=h+k*((n-l)/b),P(a,h,l,c,n,"ishikawa-sub-branch",o),o&&E(a,h,l,h-c,l-n,o),j(a,e.text,c,n,_,"end",r)}e.childCount>0&&m.set(i,{x0:h,y0:l,x1:c,y1:n,childCount:e.childCount,childrenDrawn:0})}},"drawBranch"),C=t(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),L=t((t,i)=>{if(t.length<=i)return t;const e=[];for(const n of t.split(/\s+/)){const t=e.length-1;t>=0&&e[t].length+1+n.length<=i?e[t]+=" "+n:e.push(n)}return e.join("\n")},"wrapText"),j=t((t,i,e,n,s,a,r)=>{const o=C(i),h=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",e).attr("y",n-(o.length-1)*h/2);for(const[t,i]of o.entries())l.append("tspan").attr("x",e).attr("dy",0===t?0:h).text(i);return l},"drawMultilineText"),M=t((t,i,e)=>t+(i-t)*e,"lerp"),P=t((t,i,e,n,s,a,r)=>{if(r){const o=r.roughSvg.line(i,e,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>o).attr("class",a)}return t.append("line").attr("class",a).attr("x1",i).attr("y1",e).attr("x2",n).attr("y2",s)},"drawLine"),T={draw:_},B=t(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),N={parser:g,get db(){return new f},renderer:T,styles:B};export{N as diagram};
|
|
1
|
+
import{_ as t,c as i,P as e,K as n,ab as s,z as a,k as r,q as o,a as h,b as l,g as c,s as u,t as d,e as p}from"./mermaid.core-Crnpnced.js";import"./index-CP5vpK1A.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-C4PinjUD.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";var y=function(){var i=t(function(t,i,e,n){for(e=e||{},n=t.length;n--;e[t[n]]=i);return e},"o"),e=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],o=[1,20],h=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],y=[1,6,7,11,13,14],g={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},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,2],[12,1],[12,1],[12,1]],performAction:t(function(t,i,e,n,s,a,r){var o=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[o-1].length,a[o].trim());break;case 16:n.addNode(0,a[o].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:s,14:a},i(r,[2,3]),{1:[2,2]},i(r,[2,4]),i(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:o,7:h,10:17,11:l},i(c,[2,18],{14:[1,21]}),i(c,[2,16]),i(c,[2,17]),{6:o,7:h,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},i(u,[2,14],{7:d,11:p}),i(y,[2,8]),i(y,[2,9]),i(y,[2,10]),i(c,[2,15]),i(u,[2,13],{7:d,11:p}),i(y,[2,11]),i(y,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:t(function(i){var e=this,n=[0],s=[],a=[null],r=[],o=this.table,h="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(i,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),t(m,"lex");for(var k,w,x,b,_,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==k&&(k=m()),x=o[w]&&o[w][k]),void 0===x||!x.length||!x[0]){var E="";for(_ in $=[],o[w])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[k]||k,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+k);switch(x[0]){case 1:n.push(k),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),k=null,c=d.yyleng,h=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[h,c,l,p.yy,x[1],a,r].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:t(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:t(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:t(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===n.length?this.yylloc.first_column:0)+n[n.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:t(function(t,i){var e,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,i,e,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((e=this._input.match(this.rules[s[a]]))&&(!i||e[0].length>i[0].length)){if(i=e,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,i,e,n){switch(e){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function m(){this.yy={}}return g.lexer=f,t(m,"Parser"),m.prototype=g,g.Parser=m,new m}();y.parser=y;var g=y,f=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,a()}getRoot(){return this.root}addNode(t,e){const n=r.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??=t;let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return h()}setAccTitle(t){l(t)}getAccDescription(){return c()}setAccDescription(t){u(t)}getDiagramTitle(){return d()}setDiagramTitle(t){o(t)}},m=250,k=82*Math.PI/180,w=Math.cos(k),x=Math.sin(k),b=t((t,i,e)=>{const n=t.node().getBBox(),s=n.width+2*i,a=n.height+2*i;p(t,a,s,e),t.attr("viewBox",`${n.x-i} ${n.y-i} ${s} ${a}`)},"applyPaddedViewBox"),_=t((t,a,r,o)=>{const h=o.db.getRoot();if(!h)return;const l=i(),{look:c,handDrawnSeed:u,themeVariables:d}=l,p=e(l.fontSize)[0]??14,y="handDrawn"===c,g=h.children??[],f=l.ishikawa?.diagramPadding??20,k=l.ishikawa?.useMaxWidth??!1,w=n(a),x=w.append("g").attr("class","ishikawa"),_=y?s.svg(w.node()):void 0,$=_?{roughSvg:_,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,I=`ishikawa-arrow-${a}`;y||x.append("defs").append("marker").attr("id",I).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let E=0,C=m;const L=y?void 0:P(x,E,C,E,C,"ishikawa-spine");if(S(x,E,C,h.text,p,$),!g.length)return y&&P(x,E,C,E,C,"ishikawa-spine",$),void b(w,f,k);E-=20;const j=g.filter((t,i)=>i%2==0),M=g.filter((t,i)=>i%2==1),T=v(j),B=v(M),N=T.total+B.total;let O=m,D=m;if(N>0){const t=500,i=75;O=Math.max(i,t*(T.total/N)),D=Math.max(i,t*(B.total/N))}const z=2*p;O=Math.max(O,T.max*z),D=Math.max(D,B.max*z),C=Math.max(O,m),L&&L.attr("y1",C).attr("y2",C),x.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const W=Math.ceil(g.length/2);for(let t=0;t<W;t++){const i=x.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[g[2*t],-1,O],[g[2*t+1],1,D]])e&&A(i,e,E,C,n,s,p,$);E=i.selectAll("text").nodes().reduce((t,i)=>Math.min(t,i.getBBox().x),1/0)}if(y)P(x,E,C,0,C,"ishikawa-spine",$);else{L.attr("x1",E);const t=`url(#${I})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}b(w,f,k)},"draw"),v=t(i=>{const e=t(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return i.reduce((t,i)=>{const n=e(i);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),S=t((t,i,e,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),o=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${i},${e})`),h=j(o,L(n,r),0,0,"ishikawa-head-label","start",s),l=h.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);h.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),$=t((i,e)=>{const n=[],s=[],a=t((t,i,r)=>{const o=-1===e?[...t].reverse():t;for(const t of o){const e=n.length,o=t.children??[];n.push({depth:r,text:L(t.text,15),parentIndex:i,childCount:o.length}),r%2==0?(s.push(e),o.length&&a(o,e,r+1)):(o.length&&a(o,e,r+1),s.push(e))}},"walk");return a(i,-1,2),{entries:n,yOrder:s}},"flattenTree"),I=t((t,i,e,n,s,a,r)=>{const o=t.append("g").attr("class","ishikawa-label-group"),h=j(o,i,e,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),E=t((t,i,e,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const o=n/r,h=s/r,l=6*-h,c=6*o,u=`M ${i} ${e} L ${i-6*o*2+l} ${e-6*h*2+c} L ${i-6*o*2-l} ${e-6*h*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),A=t((t,i,e,n,s,a,r,o)=>{const h=i.children??[],l=a*(h.length?1:.2),c=x*l*s,u=e+-w*l,d=n+c;if(P(t,e,n,u,d,"ishikawa-branch",o),o&&E(t,e,n,e-u,n-d,o),I(t,i.text,u,d,s,r,o),!h.length)return;const{entries:p,yOrder:y}=$(h,s),g=p.length,f=new Array(g);for(const[t,i]of y.entries())f[i]=n+c*((t+1)/(g+1));const m=new Map;m.set(-1,{x0:e,y0:n,x1:u,y1:d,childCount:h.length,childrenDrawn:0});const k=-w,b=x*s,_=s<0?"ishikawa-label up":"ishikawa-label down";for(const[i,e]of p.entries()){const n=f[i],s=m.get(e.parentIndex),a=t.append("g").attr("class","ishikawa-sub-group");let h=0,l=0,c=0;if(e.depth%2==0){const t=s.y1-s.y0;h=M(s.x0,s.x1,t?(n-s.y0)/t:.5),l=n,c=h-(e.childCount>0?60+5*e.childCount:30),P(a,h,n,c,n,"ishikawa-sub-branch",o),o&&E(a,h,n,1,0,o),j(a,e.text,c,n,"ishikawa-label align","end",r)}else{const t=s.childrenDrawn++;h=M(s.x0,s.x1,(s.childCount-t)/(s.childCount+1)),l=s.y0,c=h+k*((n-l)/b),P(a,h,l,c,n,"ishikawa-sub-branch",o),o&&E(a,h,l,h-c,l-n,o),j(a,e.text,c,n,_,"end",r)}e.childCount>0&&m.set(i,{x0:h,y0:l,x1:c,y1:n,childCount:e.childCount,childrenDrawn:0})}},"drawBranch"),C=t(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),L=t((t,i)=>{if(t.length<=i)return t;const e=[];for(const n of t.split(/\s+/)){const t=e.length-1;t>=0&&e[t].length+1+n.length<=i?e[t]+=" "+n:e.push(n)}return e.join("\n")},"wrapText"),j=t((t,i,e,n,s,a,r)=>{const o=C(i),h=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",e).attr("y",n-(o.length-1)*h/2);for(const[t,i]of o.entries())l.append("tspan").attr("x",e).attr("dy",0===t?0:h).text(i);return l},"drawMultilineText"),M=t((t,i,e)=>t+(i-t)*e,"lerp"),P=t((t,i,e,n,s,a,r)=>{if(r){const o=r.roughSvg.line(i,e,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>o).attr("class",a)}return t.append("line").attr("class",a).attr("x1",i).attr("y1",e).attr("x2",n).attr("y2",s)},"drawLine"),T={draw:_},B=t(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),N={parser:g,get db(){return new f},renderer:T,styles:B};export{N as diagram};
|
package/dist/esm/{journeyDiagram-VCZTEJTY-BuKFXeHL.js → journeyDiagram-VCZTEJTY-svJ9aZB7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./chunk-FMBD7UC4-BZMcHvFk.js";import{a as e,g as n,h as i,d as s}from"./chunk-YZCP3GAM-D9GadUwL.js";import{g as r,s as a,a as o,b as l,t as c,q as h,_ as u,c as p,d as y,e as d,z as f}from"./mermaid.core-C2hrg85i.js";import{d as g}from"./arc-BqJSq9Se.js";import"./index-EPJhFLhN.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-CxbYBjHT.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";var m=function(){var t=u(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:u(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:u(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:u(function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),u(m,"lex");for(var x,k,b,_,w,v,$,M,T={};;){if(k=n[n.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==x&&(x=m()),b=a[k]&&a[k][x]),void 0===b||!b.length||!b[0]){var S="";for(w in M=[],a[k])this.terminals_[w]&&w>2&&M.push("'"+this.terminals_[w]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:M})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(b[0]){case 1:n.push(x),s.push(p.yytext),r.push(p.yylloc),n.push(b[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[b[1]][1],T.$=s[s.length-v],T._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},g&&(T._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(T,[o,c,l,y.yy,b[1],s,r].concat(h))))return _;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[b[1]][0]),s.push(T.$),r.push(T._$),$=a[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},c=function(){return{EOF:1,parseError:u(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:u(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:u(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:u(function(t){this.unput(this.match.slice(t))},"less"),pastInput:u(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:u(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var t=this.next();return t||this.lex()},"lex"),begin:u(function(t){this.conditionStack.push(t)},"begin"),popState:u(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:u(function(t){this.begin(t)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function h(){this.yy={}}return l.lexer=c,u(h,"Parser"),h.prototype=l,l.Parser=h,new h}();m.parser=m;var x=m,k="",b=[],_=[],w=[],v=u(function(){b.length=0,_.length=0,k="",w.length=0,f()},"clear"),$=u(function(t){k=t,b.push(t)},"addSection"),M=u(function(){return b},"getSections"),T=u(function(){let t=E();let e=0;for(;!t&&e<100;)t=E(),e++;return _.push(...w),_},"getTasks"),S=u(function(){const t=[];_.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),j=u(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),C=u(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};_.push(e)},"addTaskOrg"),E=u(function(){const t=u(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),A=u(function(){return S()},"getActors"),P={getConfig:u(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:h,getDiagramTitle:c,setAccTitle:l,getAccTitle:o,setAccDescription:a,getAccDescription:r,addSection:$,getSections:M,getTasks:T,addTask:j,addTaskOrg:C,getActors:A},I=u(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),F=u(function(t,e){return s(t,e)},"drawRect"),B=u(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function r(t){const i=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){const i=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.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")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),u(r,"smile"),u(a,"sad"),u(o,"ambivalent"),e.score>3?r(s):e.score<3?a(s):o(s),i},"drawFace"),V=u(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),L=u(function(t,e){return i(t,e)},"drawText"),R=u(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}u(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)},"drawLabel"),O=u(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,F(s,r),Y(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),D=-1,N=u(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");D++;a.append("line").attr("id",s+"-task"+D).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,F(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};V(a,i),l+=10}),Y(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=u(function(t,n){e(t,n)},"drawBackgroundRect"),Y=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){const l=t*h-h*(p.length-1)/2,y=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);y.append("tspan").attr("x",n+r/2).attr("dy",l).text(p[t]),y.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return u(t,"byText"),u(e,"byTspan"),u(n,"byFo"),u(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),q={drawRect:F,drawCircle:V,drawSection:O,drawText:L,drawLabel:R,drawTask:N,drawBackgroundRect:z,initGraphics:u(function(t,e){D=-1,t.append("defs").append("marker").attr("id",e+"-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")},"initGraphics")},W=u(function(t){Object.keys(t).forEach(function(e){H[e]=t[e]})},"setConf"),G={},X=0;function U(t){const e=p().journey,n=e.maxLabelWidth;X=0;let i=60;Object.keys(G).forEach(s=>{const r=G[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:G[s].position};q.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=q.drawText(t,r).node().getBoundingClientRect().width;a>X&&a>e.leftMargin-a&&(X=a)}),i+=Math.max(20,20*c.length)})}u(U,"drawActorLegend");var H=p().journey,Z=0,J=u(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");K.init();const u=h.select("#"+e);q.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const t in G)delete G[t];let x=0;m.forEach(t=>{G[t]={color:H.actorColours[x%H.actorColours.length],position:x},x++}),U(u),Z=H.leftMargin+X,K.insert(0,0,Z,50*Object.keys(G).length),et(u,f,0,e);const k=K.getBounds();g&&u.append("text").text(g).attr("x",Z).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const b=k.stopy-k.starty+2*H.diagramMarginY,_=Z+k.stopx+2*H.diagramMarginX;d(u,b,_,H.useMaxWidth),u.append("line").attr("x1",Z).attr("y1",4*H.height).attr("x2",_-Z-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${_} ${b+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",b+w+25)},"draw"),K={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:u(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:u(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:u(function(t,e,n,i){const s=p().journey,r=this;let a=0;function o(o){return u(function(l){a++;const c=r.sequenceItems.length-a+1;r.updateVal(l,"starty",e-c*s.boxMargin,Math.min),r.updateVal(l,"stopy",i+c*s.boxMargin,Math.max),r.updateVal(K.data,"startx",t-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==o&&(r.updateVal(l,"startx",t-c*s.boxMargin,Math.min),r.updateVal(l,"stopx",n+c*s.boxMargin,Math.max),r.updateVal(K.data,"starty",e-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}u(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:u(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(K.data,"startx",s,Math.min),this.updateVal(K.data,"starty",a,Math.min),this.updateVal(K.data,"stopx",r,Math.max),this.updateVal(K.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:u(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:u(function(){return this.verticalPos},"getVerticalPos"),getBounds:u(function(){return this.data},"getBounds")},Q=H.sectionFills,tt=H.sectionColours,et=u(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[n,u]of e.entries()){if(r!==u.section){l=Q[o%Q.length],h=o%Q.length,c=tt[o%tt.length];let i=0;const a=u.section;for(let t=n;t<e.length&&e[t].section==a;t++)i+=1;const p={x:n*s.taskMargin+n*s.width+Z,y:50,text:u.section,fill:l,num:h,colour:c,taskCount:i};q.drawSection(t,p,s),r=u.section,o++}const p=u.people.reduce((t,e)=>(G[e]&&(t[e]=G[e]),t),{});u.x=n*s.taskMargin+n*s.width+Z,u.y=a,u.width=s.diagramMarginX,u.height=s.diagramMarginY,u.colour=c,u.fill=l,u.num=h,u.actors=p,q.drawTask(t,u,s,i),K.insert(u.x,u.y,u.x+u.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:W,draw:J},it={parser:x,db:P,renderer:nt,styles:I,init:u(t=>{nt.setConf(t.journey),P.clear()},"init")};export{it as diagram};
|
|
1
|
+
import{g as t}from"./chunk-FMBD7UC4-DVZBlcm4.js";import{a as e,g as n,h as i,d as s}from"./chunk-YZCP3GAM-BDqtM1Ka.js";import{g as r,s as a,a as o,b as l,t as c,q as h,_ as u,c as p,d as y,e as d,z as f}from"./mermaid.core-Crnpnced.js";import{d as g}from"./arc-BqJSq9Se.js";import"./index-CP5vpK1A.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-C4PinjUD.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";var m=function(){var t=u(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:u(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:u(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:u(function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),u(m,"lex");for(var x,k,b,_,w,v,$,M,T={};;){if(k=n[n.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==x&&(x=m()),b=a[k]&&a[k][x]),void 0===b||!b.length||!b[0]){var S="";for(w in M=[],a[k])this.terminals_[w]&&w>2&&M.push("'"+this.terminals_[w]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:M})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(b[0]){case 1:n.push(x),s.push(p.yytext),r.push(p.yylloc),n.push(b[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[b[1]][1],T.$=s[s.length-v],T._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},g&&(T._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(T,[o,c,l,y.yy,b[1],s,r].concat(h))))return _;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[b[1]][0]),s.push(T.$),r.push(T._$),$=a[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},c=function(){return{EOF:1,parseError:u(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:u(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:u(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:u(function(t){this.unput(this.match.slice(t))},"less"),pastInput:u(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:u(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var t=this.next();return t||this.lex()},"lex"),begin:u(function(t){this.conditionStack.push(t)},"begin"),popState:u(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:u(function(t){this.begin(t)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function h(){this.yy={}}return l.lexer=c,u(h,"Parser"),h.prototype=l,l.Parser=h,new h}();m.parser=m;var x=m,k="",b=[],_=[],w=[],v=u(function(){b.length=0,_.length=0,k="",w.length=0,f()},"clear"),$=u(function(t){k=t,b.push(t)},"addSection"),M=u(function(){return b},"getSections"),T=u(function(){let t=E();let e=0;for(;!t&&e<100;)t=E(),e++;return _.push(...w),_},"getTasks"),S=u(function(){const t=[];_.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),j=u(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),C=u(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};_.push(e)},"addTaskOrg"),E=u(function(){const t=u(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),A=u(function(){return S()},"getActors"),P={getConfig:u(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:h,getDiagramTitle:c,setAccTitle:l,getAccTitle:o,setAccDescription:a,getAccDescription:r,addSection:$,getSections:M,getTasks:T,addTask:j,addTaskOrg:C,getActors:A},I=u(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),F=u(function(t,e){return s(t,e)},"drawRect"),B=u(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function r(t){const i=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){const i=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.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")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),u(r,"smile"),u(a,"sad"),u(o,"ambivalent"),e.score>3?r(s):e.score<3?a(s):o(s),i},"drawFace"),V=u(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),L=u(function(t,e){return i(t,e)},"drawText"),R=u(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}u(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)},"drawLabel"),O=u(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,F(s,r),Y(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),D=-1,N=u(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");D++;a.append("line").attr("id",s+"-task"+D).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,F(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};V(a,i),l+=10}),Y(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=u(function(t,n){e(t,n)},"drawBackgroundRect"),Y=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){const l=t*h-h*(p.length-1)/2,y=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);y.append("tspan").attr("x",n+r/2).attr("dy",l).text(p[t]),y.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return u(t,"byText"),u(e,"byTspan"),u(n,"byFo"),u(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),q={drawRect:F,drawCircle:V,drawSection:O,drawText:L,drawLabel:R,drawTask:N,drawBackgroundRect:z,initGraphics:u(function(t,e){D=-1,t.append("defs").append("marker").attr("id",e+"-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")},"initGraphics")},W=u(function(t){Object.keys(t).forEach(function(e){H[e]=t[e]})},"setConf"),G={},X=0;function U(t){const e=p().journey,n=e.maxLabelWidth;X=0;let i=60;Object.keys(G).forEach(s=>{const r=G[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:G[s].position};q.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=q.drawText(t,r).node().getBoundingClientRect().width;a>X&&a>e.leftMargin-a&&(X=a)}),i+=Math.max(20,20*c.length)})}u(U,"drawActorLegend");var H=p().journey,Z=0,J=u(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");K.init();const u=h.select("#"+e);q.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const t in G)delete G[t];let x=0;m.forEach(t=>{G[t]={color:H.actorColours[x%H.actorColours.length],position:x},x++}),U(u),Z=H.leftMargin+X,K.insert(0,0,Z,50*Object.keys(G).length),et(u,f,0,e);const k=K.getBounds();g&&u.append("text").text(g).attr("x",Z).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const b=k.stopy-k.starty+2*H.diagramMarginY,_=Z+k.stopx+2*H.diagramMarginX;d(u,b,_,H.useMaxWidth),u.append("line").attr("x1",Z).attr("y1",4*H.height).attr("x2",_-Z-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${_} ${b+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",b+w+25)},"draw"),K={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:u(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:u(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:u(function(t,e,n,i){const s=p().journey,r=this;let a=0;function o(o){return u(function(l){a++;const c=r.sequenceItems.length-a+1;r.updateVal(l,"starty",e-c*s.boxMargin,Math.min),r.updateVal(l,"stopy",i+c*s.boxMargin,Math.max),r.updateVal(K.data,"startx",t-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==o&&(r.updateVal(l,"startx",t-c*s.boxMargin,Math.min),r.updateVal(l,"stopx",n+c*s.boxMargin,Math.max),r.updateVal(K.data,"starty",e-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}u(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:u(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(K.data,"startx",s,Math.min),this.updateVal(K.data,"starty",a,Math.min),this.updateVal(K.data,"stopx",r,Math.max),this.updateVal(K.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:u(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:u(function(){return this.verticalPos},"getVerticalPos"),getBounds:u(function(){return this.data},"getBounds")},Q=H.sectionFills,tt=H.sectionColours,et=u(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[n,u]of e.entries()){if(r!==u.section){l=Q[o%Q.length],h=o%Q.length,c=tt[o%tt.length];let i=0;const a=u.section;for(let t=n;t<e.length&&e[t].section==a;t++)i+=1;const p={x:n*s.taskMargin+n*s.width+Z,y:50,text:u.section,fill:l,num:h,colour:c,taskCount:i};q.drawSection(t,p,s),r=u.section,o++}const p=u.people.reduce((t,e)=>(G[e]&&(t[e]=G[e]),t),{});u.x=n*s.taskMargin+n*s.width+Z,u.y=a,u.width=s.diagramMarginX,u.height=s.diagramMarginY,u.colour=c,u.fill=l,u.num=h,u.actors=p,q.drawTask(t,u,s,i),K.insert(u.x,u.y,u.x+u.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:W,draw:J},it={parser:x,db:P,renderer:nt,styles:I,init:u(t=>{nt.setConf(t.journey),P.clear()},"init")};export{it as diagram};
|