fix 代码生成新增键值对字段,新增oss上传,修复api文档调试光标错位

This commit is contained in:
yxh 2023-08-25 11:07:05 +08:00
parent 93334da6f2
commit f4973d2170
113 changed files with 246 additions and 83 deletions

2
go.mod
View File

@ -24,6 +24,7 @@ require (
require ( require (
github.com/BurntSushi/toml v1.2.1 // indirect github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
github.com/aliyun/aliyun-oss-go-sdk v2.2.8+incompatible // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/clbanning/mxj v1.8.4 // indirect github.com/clbanning/mxj v1.8.4 // indirect
github.com/clbanning/mxj/v2 v2.5.7 // indirect github.com/clbanning/mxj/v2 v2.5.7 // indirect
@ -85,6 +86,7 @@ require (
golang.org/x/sys v0.11.0 // indirect golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.11.0 // indirect golang.org/x/term v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect golang.org/x/text v0.12.0 // indirect
golang.org/x/time v0.3.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
) )

4
go.sum
View File

@ -5,6 +5,8 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
github.com/aliyun/aliyun-oss-go-sdk v2.2.8+incompatible h1:6JF1bjhT0WN2srEmijfOFtVWwV91KZ6dJY1/JbdtGrI=
github.com/aliyun/aliyun-oss-go-sdk v2.2.8+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/apache/rocketmq-client-go/v2 v2.1.1 h1:WY/LkOYSQaVyV+HOqdiIgF4LE3beZ/jwdSLKZlzpabw= github.com/apache/rocketmq-client-go/v2 v2.1.1 h1:WY/LkOYSQaVyV+HOqdiIgF4LE3beZ/jwdSLKZlzpabw=
github.com/apache/rocketmq-client-go/v2 v2.1.1/go.mod h1:GZzExtXY9zpI6FfiVJYAhw2IXQtgnHUuWpULo7nr5lw= github.com/apache/rocketmq-client-go/v2 v2.1.1/go.mod h1:GZzExtXY9zpI6FfiVJYAhw2IXQtgnHUuWpULo7nr5lw=
github.com/casbin/casbin/v2 v2.42.0 h1:EA0aE5PZnFSYY6WulzTScOo4YO6xrGAAZkXRLs8p2ME= github.com/casbin/casbin/v2 v2.42.0 h1:EA0aE5PZnFSYY6WulzTScOo4YO6xrGAAZkXRLs8p2ME=
@ -352,6 +354,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=

View File

@ -47,8 +47,12 @@ func (s *sSysDictData) GetDictWithDataByType(ctx context.Context, dictType, defa
err = dao.SysDictType.Ctx(ctx).Where(dao.SysDictType.Columns().DictType, dictType). err = dao.SysDictType.Ctx(ctx).Where(dao.SysDictType.Columns().DictType, dictType).
Where(dao.SysDictType.Columns().Status, 1).Fields(model.DictTypeRes{}).Scan(&dict.Info) Where(dao.SysDictType.Columns().Status, 1).Fields(model.DictTypeRes{}).Scan(&dict.Info)
liberr.ErrIsNil(ctx, err, "获取字典类型失败") liberr.ErrIsNil(ctx, err, "获取字典类型失败")
if dict.Info==nil{
return
}
err = dao.SysDictData.Ctx(ctx).Fields(model.DictDataRes{}). err = dao.SysDictData.Ctx(ctx).Fields(model.DictDataRes{}).
Where(dao.SysDictData.Columns().DictType, dictType). Where(dao.SysDictData.Columns().DictType, dictType).
Where(dao.SysDictData.Columns().Status, 1).
Order(dao.SysDictData.Columns().DictSort + " asc," + Order(dao.SysDictData.Columns().DictSort + " asc," +
dao.SysDictData.Columns().DictCode + " asc"). dao.SysDictData.Columns().DictCode + " asc").
Scan(&dict.Values) Scan(&dict.Values)

View File

@ -13,8 +13,8 @@ const (
<link rel="icon" href="{SwaggerUIDocNamePlaceHolder}/doc/favicon.ico" /> <link rel="icon" href="{SwaggerUIDocNamePlaceHolder}/doc/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title> <title></title>
<script type="module" crossorigin src="{SwaggerUIDocNamePlaceHolder}/doc/webjars/js/doc-215985a7.js"></script> <script type="module" crossorigin src="{SwaggerUIDocNamePlaceHolder}/doc/webjars/js/doc-7814a93f.js"></script>
<link rel="stylesheet" href="{SwaggerUIDocNamePlaceHolder}/doc/webjars/css/doc-5b12aa22.css"> <link rel="stylesheet" href="{SwaggerUIDocNamePlaceHolder}/doc/webjars/css/doc-e469198e.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -8,5 +8,5 @@
package consts package consts
const ( const (
Version = "3.2.7" Version = "3.2.8"
) )

View File

@ -10,6 +10,7 @@ const (
SourceLocal UploaderType = iota // 上传到本地 SourceLocal UploaderType = iota // 上传到本地
SourceTencent // 上传至腾讯云 SourceTencent // 上传至腾讯云
SourceQiniu // 上传到七牛云 SourceQiniu // 上传到七牛云
SourceOss // 上传到oss
) )
type UploaderType int type UploaderType int
@ -40,8 +41,8 @@ func GetUploader(key UploaderType) IUpload {
} }
func Register() { func Register() {
RegisterUploader(SourceLocal, &Local{}) RegisterUploader(SourceLocal, &Local{})
RegisterUploader(SourceTencent, &Tencent{}) RegisterUploader(SourceTencent, &Tencent{})
RegisterUploader(SourceQiniu, &Qiniou{}) RegisterUploader(SourceQiniu, &Qiniou{})
RegisterUploader(SourceOss, &OSS{})
} }

View File

@ -21,11 +21,11 @@ func (s *Local) Upload(ctx context.Context, file *ghttp.UploadFile) (result syst
return return
} }
r := g.RequestFromCtx(ctx) r := g.RequestFromCtx(ctx)
urlPerfix := fmt.Sprintf("http://%s/", r.Host) urlPerfix := fmt.Sprintf("//%s/", r.Host)
p := strings.Trim(consts.UploadPath, "/") p := strings.Trim(consts.UploadPath, "/")
sp := s.getStaticPath(ctx) sp := s.getStaticPath(ctx)
if sp != "" { if sp != "" {
sp = strings.Trim(sp, "/") sp = strings.TrimRight(sp, "/")
} }
nowData := time.Now().Format("2006-01-02") nowData := time.Now().Format("2006-01-02")
// 包含静态文件夹的路径 // 包含静态文件夹的路径

93
library/upload/oss.go Normal file
View File

@ -0,0 +1,93 @@
/*
* @desc:oss上传
* @company:云南奇讯科技有限公司
* @Author: yixiaohu<yxh669@qq.com>
* @Date: 2023/8/23 11:11
*/
package upload
import (
"context"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/grand"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/library/liberr"
"mime/multipart"
"strconv"
"strings"
)
type OSS struct {
AccessKeyID string `json:"accessKeyId"`
AccessKeySecret string `json:"accessKeySecret"`
EndPoint string `json:"endPoint"`
BucketName string `json:"bucketName"`
IsHttps bool `json:"isHttps"`
}
func (s *OSS) Upload(ctx context.Context, file *ghttp.UploadFile) (result system.UploadResponse, err error) {
err = g.Try(ctx, func(ctx context.Context) {
var (
client *oss.Client
bucket *oss.Bucket
fp multipart.File
)
err = g.Cfg().MustGet(ctx,"upload.oss").Scan(&s)
liberr.ErrIsNil(ctx,err)
client,err = s.getClient()
liberr.ErrIsNil(ctx,err)
// 获取存储空间。
bucket, err = client.Bucket(s.BucketName)
liberr.ErrIsNil(ctx,err)
name := gfile.Basename(file.Filename)
name = strings.ToLower(strconv.FormatInt(gtime.TimestampNano(), 36) + grand.S(6))
name = name + gfile.Ext(file.Filename)
fp,err = file.Open()
liberr.ErrIsNil(ctx,err)
err = bucket.PutObject(name,fp)
liberr.ErrIsNil(ctx,err)
schema := "http"
if s.IsHttps {
schema = "https"
}
url :=schema+"://"+s.EndPoint+"/"+name
result = system.UploadResponse{
Size: file.Size,
Path: url,
FullPath: url,
Name: file.Filename,
Type: file.Header.Get("Content-type"),
}
})
return
}
func (s *OSS) getClient() (client *oss.Client, err error) {
// 设置连接数为10每个主机的最大闲置连接数为20每个主机的最大连接数为20。
conn := oss.MaxConns(10,20,20)
// 设置HTTP连接超时时间为20秒HTTP读取或写入超时时间为60秒。
time := oss.Timeout(20,60)
// 设置是否支持将自定义域名作为Endpoint默认不支持。
cname := oss.UseCname(true)
// 设置HTTP的User-Agent头默认为aliyun-sdk-go。
userAgent := oss.UserAgent("aliyun-sdk-go")
// 设置是否开启HTTP重定向默认开启。
redirect := oss.RedirectEnabled(true)
// 设置是否开启SSL证书校验默认关闭。
verifySsl := oss.InsecureSkipVerify(false)
// 开启CRC加密。
crc := oss.EnableCRC(true)
// 设置日志模式。
logLevel := oss.SetLogLevel(oss.LogOff)
client, err = oss.New(s.EndPoint,
s.AccessKeyID,
s.AccessKeySecret,
conn,time,cname,userAgent,verifySsl,redirect,crc,logLevel)
return
}

View File

@ -90,12 +90,23 @@ gfcli:
# 上传配置 # 上传配置
upload: upload:
default: 0 # 默认上传至本地 default: 0 # 默认上传至本地 0 - 本地 1 - 腾讯云 2 - 七牛云 3- 阿里oss
tencentCOS: tencentCOS: # 腾讯云
upPath : "/gfast/" upPath : "/gfast/"
rawUrl : "https://xxxxxx.ap-xxxxx.myqcloud.com" rawUrl : "https://xxx-xxxx.cos.ap-chongqing.myqcloud.com"
secretID : "xxxxxxxxxx" secretID : "xxxxxxxxxxxxxxxxxxxx"
secretKey : "xxxxxxxxxx" secretKey : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
qiniou: # 七牛云
accessKey : "xxxxxxxxxxxxxxxxxxxxxx"
sercetKey: "xxxxxxxxxxxxxxxxxxxxx"
bucket : "gfast-test"
qiniuServer : "http://xxxxxxxxxxx.hn-bkt.clouddn.com"
oss: #阿里云oss
accessKeyID: "xxxxxxxxxxxxxxxxxxx"
accessKeySecret: "xxxxxxxxxxxxxxxxxxxx"
endPoint: "xxx.xxxx.com" #自定域名
bucketName: "xxx" #使用的存储桶
isHttps: true #是否开启https访问
# 代码生成配置 # 代码生成配置
gen: gen:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,2 +0,0 @@
User-agent: *
Disallow:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1 +1 @@
import{l as i,B as l}from"./doc-215985a7.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const p=u;function o(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.forEach(function(c){f(n,c,e[c])})}return n}function f(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var a=function(t,e){var r=o({},t,e.attrs);return i(l,o({},r,{icon:p}),null)};a.displayName="CopyOutlined";a.inheritAttrs=!1;const d=a;export{d as C}; import{l as i,B as l}from"./doc-7814a93f.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const p=u;function o(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.forEach(function(c){f(n,c,e[c])})}return n}function f(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var a=function(t,e){var r=o({},t,e.attrs);return i(l,o({},r,{icon:p}),null)};a.displayName="CopyOutlined";a.inheritAttrs=!1;const d=a;export{d as C};

View File

@ -1 +1 @@
import{_ as d,o as r,j as n,t as s,l as u,w as _,k as v,F as h,v as p,p as f,a0 as y}from"./doc-215985a7.js";const g={name:"DataType",props:{text:{type:String,default:"string",required:!0},record:{type:Object,required:!0}},data(){return{validators:[]}},created(){this.intiValidator()},methods:{intiValidator(){var a=this;const e=this.record;if(e.validateInstance!=null){a.getJsonKeyLength(e.validateInstance);for(var t in e.validateInstance){var i=t+":"+e.validateInstance[t];a.validators.push({key:t,val:i})}}},getJsonKeyLength(a){var e=0;if(a!=null)for(var t in a)a.hasOwnProperty(t)&&e++;return e}}},m={key:0},x={key:1,class:"knife4j-request-validate-jsr"},k={slot:"title"};function V(a,e,t,i,l,I){const c=y;return r(),n("div",null,[t.record.validateStatus?(r(),n("span",x,[u(c,{placement:"right"},{default:_(()=>[v("template",k,[(r(!0),n(h,null,p(l.validators,o=>(r(),n("div",{key:o.key},s(o.val),1))),128))]),f(" "+s(t.text),1)]),_:1})])):(r(),n("span",m,s(t.text==null||t.text==""?"string":t.text),1))])}const w=d(g,[["render",V]]);export{w as default}; import{_ as d,o as r,j as n,t as s,l as u,w as _,k as v,F as h,v as p,p as f,a0 as y}from"./doc-7814a93f.js";const g={name:"DataType",props:{text:{type:String,default:"string",required:!0},record:{type:Object,required:!0}},data(){return{validators:[]}},created(){this.intiValidator()},methods:{intiValidator(){var a=this;const e=this.record;if(e.validateInstance!=null){a.getJsonKeyLength(e.validateInstance);for(var t in e.validateInstance){var i=t+":"+e.validateInstance[t];a.validators.push({key:t,val:i})}}},getJsonKeyLength(a){var e=0;if(a!=null)for(var t in a)a.hasOwnProperty(t)&&e++;return e}}},m={key:0},x={key:1,class:"knife4j-request-validate-jsr"},k={slot:"title"};function V(a,e,t,i,l,I){const c=y;return r(),n("div",null,[t.record.validateStatus?(r(),n("span",x,[u(c,{placement:"right"},{default:_(()=>[v("template",k,[(r(!0),n(h,null,p(l.validators,o=>(r(),n("div",{key:o.key},s(o.val),1))),128))]),f(" "+s(t.text),1)]),_:1})])):(r(),n("span",m,s(t.text==null||t.text==""?"string":t.text),1))])}const w=d(g,[["render",V]]);export{w as default};

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
import{_ as a,$ as o,V as l,r as d,o as c,j as h,l as m,I as g}from"./doc-215985a7.js";import{m as u,a as p,t as f,e as _}from"./ext-language_tools-602acc1a.js";o.config.setModuleUrl("ace/mode/json",u);o.config.setModuleUrl("ace/mode/xml",p);o.config.setModuleUrl("ace/theme/eclipse",f);o.config.setModuleUrl("ace/ext-language/tools",_);const x={name:"EditorShow",components:{editor:l},props:{value:{type:[String,Object],required:!0,default:""},xmlMode:{type:Boolean,default:!1,required:!1}},emits:["showDescription","change"],data(){return{lang:"json",editor:null,editorHeight:200}},methods:{change(e){this.$emit("change",e)},resetEditorHeight(){const e=this;setTimeout(()=>{let t=e.editor.session.getLength();t==1&&(t=10),e.editorHeight=t*16},300)},editorInit(e){const t=this;this.editor=e,this.xmlMode&&(this.lang="xml"),this.resetEditorHeight(),this.editor.renderer.on("afterRender",function(){t.$emit("showDescription","123")})}}};function E(e,t,s,I,i,n){const r=d("editor");return c(),h("div",null,[m(r,{value:s.value,onInit:n.editorInit,lang:i.lang,theme:"eclipse",width:"100%",style:g({height:i.editorHeight+"px"}),onInput:n.change},null,8,["value","onInit","lang","style","onInput"])])}const w=a(x,[["render",E]]);export{w as default}; import{_ as a,$ as o,V as l,r as d,o as c,j as h,l as m,I as g}from"./doc-7814a93f.js";import{m as u,a as p,t as f,e as _}from"./ext-language_tools-602acc1a.js";o.config.setModuleUrl("ace/mode/json",u);o.config.setModuleUrl("ace/mode/xml",p);o.config.setModuleUrl("ace/theme/eclipse",f);o.config.setModuleUrl("ace/ext-language/tools",_);const x={name:"EditorShow",components:{editor:l},props:{value:{type:[String,Object],required:!0,default:""},xmlMode:{type:Boolean,default:!1,required:!1}},emits:["showDescription","change"],data(){return{lang:"json",editor:null,editorHeight:200}},methods:{change(e){this.$emit("change",e)},resetEditorHeight(){const e=this;setTimeout(()=>{let t=e.editor.session.getLength();t==1&&(t=10),e.editorHeight=t*16},300)},editorInit(e){const t=this;this.editor=e,this.xmlMode&&(this.lang="xml"),this.resetEditorHeight(),this.editor.renderer.on("afterRender",function(){t.$emit("showDescription","123")})}}};function E(e,t,s,I,i,n){const r=d("editor");return c(),h("div",null,[m(r,{value:s.value,onInit:n.editorInit,lang:i.lang,theme:"eclipse",width:"100%",style:g({height:i.editorHeight+"px"}),onInput:n.change},null,8,["value","onInit","lang","style","onInput"])])}const w=a(x,[["render",E]]);export{w as default};

View File

@ -1 +1 @@
import{_ as t}from"./doc-215985a7.js";const e={name:"OAuth2"};function n(r,o,s,c,_,a){return null}const u=t(e,[["render",n]]);export{u as default}; import{_ as t}from"./doc-7814a93f.js";const e={name:"OAuth2"};function n(r,o,s,c,_,a){return null}const u=t(e,[["render",n]]);export{u as default};

View File

@ -1 +1 @@
import{l as s,B as v,_ as b,$ as r,V as A,d as j,a as C,b as D,c as I,f as R,u as x,m as u,r as i,o as U,j as E,w as c,k as l,t as m,p as M,L as P,y as S}from"./doc-215985a7.js";import{C as V}from"./clipboard-c058d7b0.js";import{m as L,a as B,t as k,e as N}from"./ext-language_tools-602acc1a.js";import{C as $}from"./CopyOutlined-4e9df16d.js";var T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const J=T;function g(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),o.forEach(function(a){q(n,a,t[a])})}return n}function q(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var p=function(e,t){var o=g({},e,t.attrs);return s(v,g({},o,{icon:J}),null)};p.displayName="DownloadOutlined";p.inheritAttrs=!1;const z=p,H=""+new URL("mode-json5-ed4a693f.js",import.meta.url).href;r.config.setModuleUrl("ace/mode/json",L);r.config.setModuleUrl("ace/mode/json",H);r.config.setModuleUrl("ace/mode/xml",B);r.config.setModuleUrl("ace/theme/eclipse",k);r.config.setModuleUrl("ace/ext-language/tools",N);const G={name:"Document",components:{editor:A,CopyOutlined:$,DownloadOutlined:z,EditorShow:j(()=>C(()=>import("./EditorShow-d5bc7eac.js"),["./EditorShow-d5bc7eac.js","./doc-215985a7.js","..\\css\\doc-5b12aa22.css","./ext-language_tools-602acc1a.js"],import.meta.url))},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},setup(){const n=D(),e=I(()=>n.language),{messages:t}=R();return{language:e,messages:t}},data(){return{openApiRaw:"",name:"OpenAPI.json"}},created(){this.openApiRaw=x.json5stringify(this.api.openApiRaw),this.name=this.api.summary+"_OpenAPI.json",setTimeout(()=>{this.copyOpenApi()},500)},methods:{getCurrentI18nInstance(){return this.messages[this.language]},triggerDownloadOpen(){var n=this.openApiRaw,e=document.createElement("a"),t={},o=this.name,a=window.URL.createObjectURL(new Blob([n],{type:(t.type||"text/plain")+";charset="+(t.encoding||"utf-8")}));e.href=a,e.download=o||"file",e.click(),window.URL.revokeObjectURL(a)},copyOpenApi(){const n="btnCopyOpenApi"+this.api.id,e=new V("#"+n,{text:()=>this.openApiRaw});e.on("success",()=>{const o=this.getCurrentI18nInstance().message.copy.open.success;u.info(o)}),e.on("error",t=>{console.log(t);const o=this.getCurrentI18nInstance();console.log(o);const a=o.message.copy.open.fail;u.info(a)})}}},X={class:"document"},F={style:{"margin-top":"10px"},id:"knife4jDocumentOpenApiShowEditor"};function Q(n,e,t,o,a,f){const w=i("CopyOutlined"),d=P,_=i("DownloadOutlined"),h=S,O=i("editor-show");return U(),E("div",X,[s(h,{style:{"margin-top":"10px"}},{default:c(()=>[s(d,{type:"primary",id:"btnCopyOpenApi"+t.api.id},{default:c(()=>[s(w),l("span",null,m(n.$t("open.copy")),1)]),_:1},8,["id"]),s(d,{style:{"margin-left":"10px"},onClick:f.triggerDownloadOpen},{default:c(()=>[s(_),M(),l("span",null,m(n.$t("open.download")),1)]),_:1},8,["onClick"])]),_:1}),l("div",F,[s(O,{value:a.openApiRaw,"onUpdate:value":e[0]||(e[0]=y=>a.openApiRaw=y),theme:"eclipse"},null,8,["value"])])])}const ee=b(G,[["render",Q]]);export{ee as default}; import{l as s,B as v,_ as b,$ as r,V as A,d as j,a as C,b as D,c as I,f as R,u as x,m as u,r as i,o as U,j as E,w as c,k as l,t as m,p as M,L as P,y as S}from"./doc-7814a93f.js";import{C as V}from"./clipboard-814f04b9.js";import{m as L,a as B,t as k,e as N}from"./ext-language_tools-602acc1a.js";import{C as $}from"./CopyOutlined-5b101606.js";var T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const J=T;function g(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),o.forEach(function(a){q(n,a,t[a])})}return n}function q(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var p=function(e,t){var o=g({},e,t.attrs);return s(v,g({},o,{icon:J}),null)};p.displayName="DownloadOutlined";p.inheritAttrs=!1;const z=p,H=""+new URL("mode-json5-ed4a693f.js",import.meta.url).href;r.config.setModuleUrl("ace/mode/json",L);r.config.setModuleUrl("ace/mode/json",H);r.config.setModuleUrl("ace/mode/xml",B);r.config.setModuleUrl("ace/theme/eclipse",k);r.config.setModuleUrl("ace/ext-language/tools",N);const G={name:"Document",components:{editor:A,CopyOutlined:$,DownloadOutlined:z,EditorShow:j(()=>C(()=>import("./EditorShow-39bb991a.js"),["./EditorShow-39bb991a.js","./doc-7814a93f.js","..\\css\\doc-e469198e.css","./ext-language_tools-602acc1a.js"],import.meta.url))},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},setup(){const n=D(),e=I(()=>n.language),{messages:t}=R();return{language:e,messages:t}},data(){return{openApiRaw:"",name:"OpenAPI.json"}},created(){this.openApiRaw=x.json5stringify(this.api.openApiRaw),this.name=this.api.summary+"_OpenAPI.json",setTimeout(()=>{this.copyOpenApi()},500)},methods:{getCurrentI18nInstance(){return this.messages[this.language]},triggerDownloadOpen(){var n=this.openApiRaw,e=document.createElement("a"),t={},o=this.name,a=window.URL.createObjectURL(new Blob([n],{type:(t.type||"text/plain")+";charset="+(t.encoding||"utf-8")}));e.href=a,e.download=o||"file",e.click(),window.URL.revokeObjectURL(a)},copyOpenApi(){const n="btnCopyOpenApi"+this.api.id,e=new V("#"+n,{text:()=>this.openApiRaw});e.on("success",()=>{const o=this.getCurrentI18nInstance().message.copy.open.success;u.info(o)}),e.on("error",t=>{console.log(t);const o=this.getCurrentI18nInstance();console.log(o);const a=o.message.copy.open.fail;u.info(a)})}}},X={class:"document"},F={style:{"margin-top":"10px"},id:"knife4jDocumentOpenApiShowEditor"};function Q(n,e,t,o,a,f){const w=i("CopyOutlined"),d=P,_=i("DownloadOutlined"),h=S,O=i("editor-show");return U(),E("div",X,[s(h,{style:{"margin-top":"10px"}},{default:c(()=>[s(d,{type:"primary",id:"btnCopyOpenApi"+t.api.id},{default:c(()=>[s(w),l("span",null,m(n.$t("open.copy")),1)]),_:1},8,["id"]),s(d,{style:{"margin-left":"10px"},onClick:f.triggerDownloadOpen},{default:c(()=>[s(_),M(),l("span",null,m(n.$t("open.download")),1)]),_:1},8,["onClick"])]),_:1}),l("div",F,[s(O,{value:a.openApiRaw,"onUpdate:value":e[0]||(e[0]=y=>a.openApiRaw=y),theme:"eclipse"},null,8,["value"])])])}const ee=b(G,[["render",Q]]);export{ee as default};

View File

@ -1 +1 @@
import{w as ln,c as J}from"./path-53f90ab3.js";import{bH as an,bI as N,bJ as w,bK as rn,bL as y,aP as on,bM as z,bN as _,bO as un,bP as t,bQ as sn,bR as tn,bS as fn}from"./doc-215985a7.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function dn(l,h,S,I,v,R,K,a){var q=S-l,i=I-h,n=K-v,m=a-R,r=m*q-n*i;if(!(r*r<y))return r=(n*(h-R)-m*(l-v))/r,[l+r*q,h+r*i]}function V(l,h,S,I,v,R,K){var a=l-S,q=h-I,i=(K?R:-R)/z(a*a+q*q),n=i*q,m=-i*a,r=l+n,s=h+m,f=S+n,c=I+m,L=(r+f)/2,o=(s+c)/2,p=f-r,g=c-s,A=p*p+g*g,b=v-R,T=r*c-f*s,D=(g<0?-1:1)*z(fn(0,b*b*A-T*T)),E=(T*g-p*D)/A,H=(-T*p-g*D)/A,P=(T*g+p*D)/A,d=(-T*p+g*D)/A,x=E-L,e=H-o,u=P-L,M=d-o;return x*x+e*e>u*u+M*M&&(E=P,H=d),{cx:E,cy:H,x01:-n,y01:-m,x11:E*(v/b-1),y11:H*(v/b-1)}}function vn(){var l=cn,h=yn,S=J(0),I=null,v=gn,R=mn,K=pn,a=null,q=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=R.apply(this,arguments)-rn,L=un(c-f),o=c>f;if(a||(a=n=q()),s<r&&(m=s,s=r,r=m),!(s>y))a.moveTo(0,0);else if(L>on-y)a.moveTo(s*N(f),s*w(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*N(c),r*w(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,A=f,b=c,T=L,D=L,E=K.apply(this,arguments)/2,H=E>y&&(I?+I.apply(this,arguments):z(r*r+s*s)),P=_(un(s-r)/2,+S.apply(this,arguments)),d=P,x=P,e,u;if(H>y){var M=sn(H/r*w(E)),B=sn(H/s*w(E));(T-=M*2)>y?(M*=o?1:-1,A+=M,b-=M):(T=0,A=b=(f+c)/2),(D-=B*2)>y?(B*=o?1:-1,p+=B,g-=B):(D=0,p=g=(f+c)/2)}var Q=s*N(p),j=s*w(p),C=r*N(b),F=r*w(b);if(P>y){var G=s*N(g),U=s*w(g),W=r*N(A),X=r*w(A),O;if(L<an)if(O=dn(Q,j,W,X,G,U,C,F)){var Y=Q-O[0],Z=j-O[1],$=G-O[0],k=U-O[1],nn=1/w(tn((Y*$+Z*k)/(z(Y*Y+Z*Z)*z($*$+k*k)))/2),en=z(O[0]*O[0]+O[1]*O[1]);d=_(P,(r-en)/(nn-1)),x=_(P,(s-en)/(nn+1))}else d=x=0}D>y?x>y?(e=V(W,X,Q,j,s,x,o),u=V(G,U,C,F,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<P?a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,s,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),!o),a.arc(u.cx,u.cy,x,t(u.y11,u.x11),t(u.y01,u.x01),!o))):(a.moveTo(Q,j),a.arc(0,0,s,p,g,!o)):a.moveTo(Q,j),!(r>y)||!(T>y)?a.lineTo(C,F):d>y?(e=V(C,F,G,U,r,-d,o),u=V(Q,j,W,X,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),d<P?a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,r,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),o),a.arc(u.cx,u.cy,d,t(u.y11,u.x11),t(u.y01,u.x01),!o))):a.arc(0,0,r,b,A,o)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-an/2;return[N(m)*n,w(m)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(S=typeof n=="function"?n:J(+n),i):S},i.padRadius=function(n){return arguments.length?(I=n==null?null:typeof n=="function"?n:J(+n),i):I},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{vn as a}; import{w as ln,c as J}from"./path-53f90ab3.js";import{bH as an,bI as N,bJ as w,bK as rn,bL as y,aP as on,bM as z,bN as _,bO as un,bP as t,bQ as sn,bR as tn,bS as fn}from"./doc-7814a93f.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function dn(l,h,S,I,v,R,K,a){var q=S-l,i=I-h,n=K-v,m=a-R,r=m*q-n*i;if(!(r*r<y))return r=(n*(h-R)-m*(l-v))/r,[l+r*q,h+r*i]}function V(l,h,S,I,v,R,K){var a=l-S,q=h-I,i=(K?R:-R)/z(a*a+q*q),n=i*q,m=-i*a,r=l+n,s=h+m,f=S+n,c=I+m,L=(r+f)/2,o=(s+c)/2,p=f-r,g=c-s,A=p*p+g*g,b=v-R,T=r*c-f*s,D=(g<0?-1:1)*z(fn(0,b*b*A-T*T)),E=(T*g-p*D)/A,H=(-T*p-g*D)/A,P=(T*g+p*D)/A,d=(-T*p+g*D)/A,x=E-L,e=H-o,u=P-L,M=d-o;return x*x+e*e>u*u+M*M&&(E=P,H=d),{cx:E,cy:H,x01:-n,y01:-m,x11:E*(v/b-1),y11:H*(v/b-1)}}function vn(){var l=cn,h=yn,S=J(0),I=null,v=gn,R=mn,K=pn,a=null,q=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=R.apply(this,arguments)-rn,L=un(c-f),o=c>f;if(a||(a=n=q()),s<r&&(m=s,s=r,r=m),!(s>y))a.moveTo(0,0);else if(L>on-y)a.moveTo(s*N(f),s*w(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*N(c),r*w(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,A=f,b=c,T=L,D=L,E=K.apply(this,arguments)/2,H=E>y&&(I?+I.apply(this,arguments):z(r*r+s*s)),P=_(un(s-r)/2,+S.apply(this,arguments)),d=P,x=P,e,u;if(H>y){var M=sn(H/r*w(E)),B=sn(H/s*w(E));(T-=M*2)>y?(M*=o?1:-1,A+=M,b-=M):(T=0,A=b=(f+c)/2),(D-=B*2)>y?(B*=o?1:-1,p+=B,g-=B):(D=0,p=g=(f+c)/2)}var Q=s*N(p),j=s*w(p),C=r*N(b),F=r*w(b);if(P>y){var G=s*N(g),U=s*w(g),W=r*N(A),X=r*w(A),O;if(L<an)if(O=dn(Q,j,W,X,G,U,C,F)){var Y=Q-O[0],Z=j-O[1],$=G-O[0],k=U-O[1],nn=1/w(tn((Y*$+Z*k)/(z(Y*Y+Z*Z)*z($*$+k*k)))/2),en=z(O[0]*O[0]+O[1]*O[1]);d=_(P,(r-en)/(nn-1)),x=_(P,(s-en)/(nn+1))}else d=x=0}D>y?x>y?(e=V(W,X,Q,j,s,x,o),u=V(G,U,C,F,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<P?a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,s,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),!o),a.arc(u.cx,u.cy,x,t(u.y11,u.x11),t(u.y01,u.x01),!o))):(a.moveTo(Q,j),a.arc(0,0,s,p,g,!o)):a.moveTo(Q,j),!(r>y)||!(T>y)?a.lineTo(C,F):d>y?(e=V(C,F,G,U,r,-d,o),u=V(Q,j,W,X,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),d<P?a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(u.y01,u.x01),!o):(a.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(e.y11,e.x11),!o),a.arc(0,0,r,t(e.cy+e.y11,e.cx+e.x11),t(u.cy+u.y11,u.cx+u.x11),o),a.arc(u.cx,u.cy,d,t(u.y11,u.x11),t(u.y01,u.x01),!o))):a.arc(0,0,r,b,A,o)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-an/2;return[N(m)*n,w(m)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(S=typeof n=="function"?n:J(+n),i):S},i.padRadius=function(n){return arguments.length?(I=n==null?null:typeof n=="function"?n:J(+n),i):I},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{vn as a};

View File

@ -1 +1 @@
import{p as N,d as M,s as W}from"./styles-d0b2ab71-9a1d019b.js";import{a5 as S,ab as d,aa as u,ac as H}from"./doc-215985a7.js";import{G as X,l as Y}from"./layout-5270bb1a.js";import{s as l}from"./svgDraw-b48a99d5-4bc0ae09.js";import"./line-4258efe0.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let h={};const g=20,p=function(e){const s=Object.entries(h).find(k=>k[1].label===e);if(s)return s[0]},Z=function(e){e.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},D=function(e,s,k,a){const c=S().class;h={},d.info("Rendering diagram "+e);const L=S().securityLevel;let y;L==="sandbox"&&(y=u("#i"+s));const x=L==="sandbox"?u(y.nodes()[0].contentDocument.body):u("body"),n=x.select(`[id='${s}']`);Z(n);const r=new X({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const m=a.db.getClasses(),$=Object.keys(m);for(const t of $){const o=m[t],i=l.drawClass(n,o,c,a);h[i.id]=i,r.setNode(i.id,i),d.info("Org height: "+i.height)}a.db.getRelations().forEach(function(t){d.info("tjoho"+p(t.id1)+p(t.id2)+JSON.stringify(t)),r.setEdge(p(t.id1),p(t.id2),{relation:t},t.title||"DEFAULT")}),a.db.getNotes().forEach(function(t){d.debug(`Adding note: ${JSON.stringify(t)}`);const o=l.drawNote(n,t,c,a);h[o.id]=o,r.setNode(o.id,o),t.class&&t.class in m&&r.setEdge(t.id,p(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Y(r),r.nodes().forEach(function(t){t!==void 0&&r.node(t)!==void 0&&(d.debug("Node "+t+": "+JSON.stringify(r.node(t))),x.select("#"+(a.db.lookUpDomId(t)||t)).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))}),r.edges().forEach(function(t){t!==void 0&&r.edge(t)!==void 0&&(d.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r.edge(t))),l.drawEdge(n,r.edge(t),r.edge(t).relation,c,a))});const f=n.node().getBBox(),E=f.width+g*2,b=f.height+g*2;H(n,b,E,c.useMaxWidth);const w=`${f.x-g} ${f.y-g} ${E} ${b}`;d.debug(`viewBox ${w}`),n.attr("viewBox",w)},B={draw:D},R={parser:N,db:M,renderer:B,styles:W,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,M.clear()}};export{R as diagram}; import{p as N,d as M,s as W}from"./styles-d0b2ab71-1b7cd6cb.js";import{a5 as S,ab as d,aa as u,ac as H}from"./doc-7814a93f.js";import{G as X,l as Y}from"./layout-49de7b0f.js";import{s as l}from"./svgDraw-b48a99d5-22935652.js";import"./line-de0e7350.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let h={};const g=20,p=function(e){const s=Object.entries(h).find(k=>k[1].label===e);if(s)return s[0]},Z=function(e){e.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},D=function(e,s,k,a){const c=S().class;h={},d.info("Rendering diagram "+e);const L=S().securityLevel;let y;L==="sandbox"&&(y=u("#i"+s));const x=L==="sandbox"?u(y.nodes()[0].contentDocument.body):u("body"),n=x.select(`[id='${s}']`);Z(n);const r=new X({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const m=a.db.getClasses(),$=Object.keys(m);for(const t of $){const o=m[t],i=l.drawClass(n,o,c,a);h[i.id]=i,r.setNode(i.id,i),d.info("Org height: "+i.height)}a.db.getRelations().forEach(function(t){d.info("tjoho"+p(t.id1)+p(t.id2)+JSON.stringify(t)),r.setEdge(p(t.id1),p(t.id2),{relation:t},t.title||"DEFAULT")}),a.db.getNotes().forEach(function(t){d.debug(`Adding note: ${JSON.stringify(t)}`);const o=l.drawNote(n,t,c,a);h[o.id]=o,r.setNode(o.id,o),t.class&&t.class in m&&r.setEdge(t.id,p(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Y(r),r.nodes().forEach(function(t){t!==void 0&&r.node(t)!==void 0&&(d.debug("Node "+t+": "+JSON.stringify(r.node(t))),x.select("#"+(a.db.lookUpDomId(t)||t)).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))}),r.edges().forEach(function(t){t!==void 0&&r.edge(t)!==void 0&&(d.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r.edge(t))),l.drawEdge(n,r.edge(t),r.edge(t).relation,c,a))});const f=n.node().getBBox(),E=f.width+g*2,b=f.height+g*2;H(n,b,E,c.useMaxWidth);const w=`${f.x-g} ${f.y-g} ${E} ${b}`;d.debug(`viewBox ${w}`),n.attr("viewBox",w)},B={draw:D},R={parser:N,db:M,renderer:B,styles:W,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,M.clear()}};export{R as diagram};

View File

@ -1,2 +1,2 @@
import{p as I,d as N,s as M}from"./styles-d0b2ab71-9a1d019b.js";import{ab as d,a5 as c,aa as w,av as R,am as B,al as E,ai as _,aj as G,ae as C}from"./doc-215985a7.js";import{G as z}from"./layout-5270bb1a.js";import{r as P}from"./index-892ad7fb-c12194bd.js";import"./edges-c959041a-20ff87ce.js";import"./createText-b670c180-3a59f9c2.js";import"./svgDraw-b48a99d5-4bc0ae09.js";import"./line-4258efe0.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>C.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,t,y,a){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,a,l.id),d.info("setNode",p)})},A=function(s,t,y,a,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const n=s[o],p=n.cssClasses.join(" "),f={labelStyle:"",style:""},h=n.label??n.id,b=0,m="class_box",u={labelStyle:f.labelStyle,shape:m,labelText:S(h),classData:n,rx:b,ry:b,class:p,style:f.style,id:n.id,domId:n.domId,tooltip:a.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(n.id,u),e&&t.setParent(n.id,e),d.info("setNode",u)})},F=function(s,t,y,a){d.info(s),s.forEach(function(e,i){var o,r;const l=e,n="",p={labelStyle:"",style:""},f=l.text,h=0,b="note",m={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:h,ry:h,class:n,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,m),d.info("setNode",m),!l.class||!(l.class in a))return;const u=y+i,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,g,u)})},H=function(s,t){const y=c().flowchart;let a=0;s.forEach(function(e){var i;a++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+a,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=G(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+e.text+"</span>"):(o.labelType="text",o.label=e.text.replace(C.lineBreakRegex,` import{p as I,d as N,s as M}from"./styles-d0b2ab71-1b7cd6cb.js";import{ab as d,a5 as c,aa as w,av as R,am as B,al as E,ai as _,aj as G,ae as C}from"./doc-7814a93f.js";import{G as z}from"./layout-49de7b0f.js";import{r as P}from"./index-892ad7fb-6b10aead.js";import"./edges-c959041a-672f75de.js";import"./createText-b670c180-ad86d00b.js";import"./svgDraw-b48a99d5-22935652.js";import"./line-de0e7350.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>C.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,t,y,a){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,a,l.id),d.info("setNode",p)})},A=function(s,t,y,a,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const n=s[o],p=n.cssClasses.join(" "),f={labelStyle:"",style:""},h=n.label??n.id,b=0,m="class_box",u={labelStyle:f.labelStyle,shape:m,labelText:S(h),classData:n,rx:b,ry:b,class:p,style:f.style,id:n.id,domId:n.domId,tooltip:a.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(n.id,u),e&&t.setParent(n.id,e),d.info("setNode",u)})},F=function(s,t,y,a){d.info(s),s.forEach(function(e,i){var o,r;const l=e,n="",p={labelStyle:"",style:""},f=l.text,h=0,b="note",m={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:h,ry:h,class:n,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,m),d.info("setNode",m),!l.class||!(l.class in a))return;const u=y+i,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,g,u)})},H=function(s,t){const y=c().flowchart;let a=0;s.forEach(function(e){var i;a++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+a,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=G(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+e.text+"</span>"):(o.labelType="text",o.label=e.text.replace(C.lineBreakRegex,`
`),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,a)})},V=function(s){k={...k,...s}},W=async function(s,t,y,a){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:a.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=a.db.getNamespaces(),p=a.db.getClasses(),f=a.db.getRelations(),h=a.db.getNotes();d.info(f),q(n,l,t,a),A(p,l,t,a),H(f,l),F(h,l,f.length+1,p);let b;i==="sandbox"&&(b=w("#i"+t));const m=i==="sandbox"?w(b.nodes()[0].contentDocument.body):w("body"),u=m.select(`[id="${t}"]`),g=m.select("#"+t+" g");if(await P(g,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),R.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,a.db.getDiagramTitle()),B(l,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?b.nodes()[0].contentDocument:document,$=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const x of $){const L=x.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),x.insertBefore(v,x.firstChild)}}};function D(s){let t;switch(s){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const J={setConf:V,draw:W},oe={parser:I,db:N,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,N.clear()}};export{oe as diagram}; `),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,a)})},V=function(s){k={...k,...s}},W=async function(s,t,y,a){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:a.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=a.db.getNamespaces(),p=a.db.getClasses(),f=a.db.getRelations(),h=a.db.getNotes();d.info(f),q(n,l,t,a),A(p,l,t,a),H(f,l),F(h,l,f.length+1,p);let b;i==="sandbox"&&(b=w("#i"+t));const m=i==="sandbox"?w(b.nodes()[0].contentDocument.body):w("body"),u=m.select(`[id="${t}"]`),g=m.select("#"+t+" g");if(await P(g,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),R.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,a.db.getDiagramTitle()),B(l,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?b.nodes()[0].contentDocument:document,$=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const x of $){const L=x.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),x.insertBefore(v,x.firstChild)}}};function D(s){let t;switch(s){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const J={setConf:V,draw:W},oe={parser:I,db:N,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,N.clear()}};export{oe as diagram};

View File

@ -1,4 +1,4 @@
import{aF as X,D as $}from"./doc-215985a7.js";var R={exports:{}};/*! import{aF as X,D as $}from"./doc-7814a93f.js";var R={exports:{}};/*!
* clipboard.js v2.0.11 * clipboard.js v2.0.11
* https://clipboardjs.com/ * https://clipboardjs.com/
* *

View File

@ -0,0 +1 @@
import{p as e,f as o}from"./flowDb-01624e90-8843bef4.js";import{f as t,g as a}from"./styles-4fcf332f-fb7ed7da.js";import{an as s}from"./doc-7814a93f.js";import"./layout-49de7b0f.js";import"./index-892ad7fb-6b10aead.js";import"./edges-c959041a-672f75de.js";import"./createText-b670c180-ad86d00b.js";import"./svgDraw-b48a99d5-22935652.js";import"./line-de0e7350.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const n={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{n as diagram};

View File

@ -1 +0,0 @@
import{p as e,f as o}from"./flowDb-01624e90-87aded3b.js";import{f as t,g as a}from"./styles-4fcf332f-cfdee1ec.js";import{an as s}from"./doc-215985a7.js";import"./layout-5270bb1a.js";import"./index-892ad7fb-c12194bd.js";import"./edges-c959041a-20ff87ce.js";import"./createText-b670c180-3a59f9c2.js";import"./svgDraw-b48a99d5-4bc0ae09.js";import"./line-4258efe0.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const n={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{n as diagram};

View File

@ -1,4 +1,4 @@
import{ab as Y,aO as D,ac as M}from"./doc-215985a7.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",b=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},v,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(v in d[g])this.terminals_[v]&&v>N&&S.push("'"+this.terminals_[v]+"'");o.showPosition?A="Parse error on line "+(b+1)+`: import{ab as Y,aO as D,ac as M}from"./doc-7814a93f.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",b=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},v,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(v in d[g])this.terminals_[v]&&v>N&&S.push("'"+this.terminals_[v]+"'");o.showPosition?A="Parse error on line "+(b+1)+`:
`+o.showPosition()+` `+o.showPosition()+`
Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(b+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,b=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,b,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(b+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,b=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,b,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`

View File

@ -1,4 +1,4 @@
import{a5 as V,ax as gt,ay as mt,a1 as xt,a2 as _t,a4 as kt,a3 as bt,a7 as vt,az as wt,aa as H,ac as Tt}from"./doc-215985a7.js";import{d as $t,f as St,a as Mt,g as ot}from"./svgDrawCommon-f26cad39-f5ea40b3.js";import{a as it}from"./arc-1879ff25.js";import"./path-53f90ab3.js";var Z=function(){var t=function(_,r,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=r);return a},e=[1,2],s=[1,5],n=[6,9,11,17,18,20,22,23,24,26],i=[1,15],l=[1,16],c=[1,17],y=[1,18],u=[1,19],x=[1,20],g=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(r,a,h,p,m,o,R){var k=o.length-1;switch(m){case 1:return o[k-1];case 3:this.$=[];break;case 4:o[k-1].push(o[k]),this.$=o[k-1];break;case 5:case 6:this.$=o[k];break;case 7:case 8:this.$=[];break;case 11:p.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 12:this.$=o[k].trim(),p.setAccTitle(this.$);break;case 13:case 14:this.$=o[k].trim(),p.setAccDescription(this.$);break;case 15:p.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 16:p.addTask(o[k-1],o[k]),this.$="task";break;case 18:p.parseDirective("%%{","open_directive");break;case 19:p.parseDirective(o[k],"type_directive");break;case 20:o[k]=o[k].trim().replace(/'/g,'"'),p.parseDirective(o[k],"arg_directive");break;case 21:p.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:s},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:s},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:l,20:c,22:y,23:u,24:x,26:s},{1:[2,2]},{14:22,15:[1,23],29:g},t([15,29],[2,19]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:21,10:25,12:4,17:i,18:l,20:c,22:y,23:u,24:x,26:s},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),{19:[1,26]},{21:[1,27]},t(n,[2,14]),t(n,[2,15]),{25:[1,28]},t(n,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(n,[2,5]),t(n,[2,12]),t(n,[2,13]),t(n,[2,16]),t(f,[2,9]),{14:32,29:g},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},parse:function(r){var a=this,h=[0],p=[],m=[null],o=[],R=this.table,k="",z=0,Q=0,yt=2,tt=1,dt=o.slice.call(arguments,1),v=Object.create(this.lexer),I={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(I.yy[D]=this.yy[D]);v.setInput(r,I.yy),I.yy.lexer=v,I.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var W=v.yylloc;o.push(W);var pt=v.options&&v.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(){var E;return E=p.pop()||v.lex()||tt,typeof E!="number"&&(E instanceof Array&&(p=E,E=p.pop()),E=a.symbols_[E]||E),E}for(var w,A,$,X,F={},Y,M,et,O;;){if(A=h[h.length-1],this.defaultActions[A]?$=this.defaultActions[A]:((w===null||typeof w>"u")&&(w=ft()),$=R[A]&&R[A][w]),typeof $>"u"||!$.length||!$[0]){var G="";O=[];for(Y in R[A])this.terminals_[Y]&&Y>yt&&O.push("'"+this.terminals_[Y]+"'");v.showPosition?G="Parse error on line "+(z+1)+`: import{a5 as V,ax as gt,ay as mt,a1 as xt,a2 as _t,a4 as kt,a3 as bt,a7 as vt,az as wt,aa as H,ac as Tt}from"./doc-7814a93f.js";import{d as $t,f as St,a as Mt,g as ot}from"./svgDrawCommon-f26cad39-fa14e79c.js";import{a as it}from"./arc-33edd03c.js";import"./path-53f90ab3.js";var Z=function(){var t=function(_,r,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=r);return a},e=[1,2],s=[1,5],n=[6,9,11,17,18,20,22,23,24,26],i=[1,15],l=[1,16],c=[1,17],y=[1,18],u=[1,19],x=[1,20],g=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(r,a,h,p,m,o,R){var k=o.length-1;switch(m){case 1:return o[k-1];case 3:this.$=[];break;case 4:o[k-1].push(o[k]),this.$=o[k-1];break;case 5:case 6:this.$=o[k];break;case 7:case 8:this.$=[];break;case 11:p.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 12:this.$=o[k].trim(),p.setAccTitle(this.$);break;case 13:case 14:this.$=o[k].trim(),p.setAccDescription(this.$);break;case 15:p.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 16:p.addTask(o[k-1],o[k]),this.$="task";break;case 18:p.parseDirective("%%{","open_directive");break;case 19:p.parseDirective(o[k],"type_directive");break;case 20:o[k]=o[k].trim().replace(/'/g,'"'),p.parseDirective(o[k],"arg_directive");break;case 21:p.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:s},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:s},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:l,20:c,22:y,23:u,24:x,26:s},{1:[2,2]},{14:22,15:[1,23],29:g},t([15,29],[2,19]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:21,10:25,12:4,17:i,18:l,20:c,22:y,23:u,24:x,26:s},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),{19:[1,26]},{21:[1,27]},t(n,[2,14]),t(n,[2,15]),{25:[1,28]},t(n,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(n,[2,5]),t(n,[2,12]),t(n,[2,13]),t(n,[2,16]),t(f,[2,9]),{14:32,29:g},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},parse:function(r){var a=this,h=[0],p=[],m=[null],o=[],R=this.table,k="",z=0,Q=0,yt=2,tt=1,dt=o.slice.call(arguments,1),v=Object.create(this.lexer),I={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(I.yy[D]=this.yy[D]);v.setInput(r,I.yy),I.yy.lexer=v,I.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var W=v.yylloc;o.push(W);var pt=v.options&&v.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(){var E;return E=p.pop()||v.lex()||tt,typeof E!="number"&&(E instanceof Array&&(p=E,E=p.pop()),E=a.symbols_[E]||E),E}for(var w,A,$,X,F={},Y,M,et,O;;){if(A=h[h.length-1],this.defaultActions[A]?$=this.defaultActions[A]:((w===null||typeof w>"u")&&(w=ft()),$=R[A]&&R[A][w]),typeof $>"u"||!$.length||!$[0]){var G="";O=[];for(Y in R[A])this.terminals_[Y]&&Y>yt&&O.push("'"+this.terminals_[Y]+"'");v.showPosition?G="Parse error on line "+(z+1)+`:
`+v.showPosition()+` `+v.showPosition()+`
Expecting `+O.join(", ")+", got '"+(this.terminals_[w]||w)+"'":G="Parse error on line "+(z+1)+": Unexpected "+(w==tt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(G,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:W,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+w);switch($[0]){case 1:h.push(w),m.push(v.yytext),o.push(v.yylloc),h.push($[1]),w=null,Q=v.yyleng,k=v.yytext,z=v.yylineno,W=v.yylloc;break;case 2:if(M=this.productions_[$[1]][1],F.$=m[m.length-M],F._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},pt&&(F._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),X=this.performAction.apply(F,[k,Q,z,I.yy,$[1],m,o].concat(dt)),typeof X<"u")return X;M&&(h=h.slice(0,-1*M*2),m=m.slice(0,-1*M),o=o.slice(0,-1*M)),h.push(this.productions_[$[1]][0]),m.push(F.$),o.push(F._$),et=R[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0}},T=function(){var _={EOF:1,parseError:function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},setInput:function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var a=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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),h.length-1&&(this.yylineno-=h.length-1);var m=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:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). Expecting `+O.join(", ")+", got '"+(this.terminals_[w]||w)+"'":G="Parse error on line "+(z+1)+": Unexpected "+(w==tt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(G,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:W,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+w);switch($[0]){case 1:h.push(w),m.push(v.yytext),o.push(v.yylloc),h.push($[1]),w=null,Q=v.yyleng,k=v.yytext,z=v.yylineno,W=v.yylloc;break;case 2:if(M=this.productions_[$[1]][1],F.$=m[m.length-M],F._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},pt&&(F._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),X=this.performAction.apply(F,[k,Q,z,I.yy,$[1],m,o].concat(dt)),typeof X<"u")return X;M&&(h=h.slice(0,-1*M*2),m=m.slice(0,-1*M),o=o.slice(0,-1*M)),h.push(this.productions_[$[1]][0]),m.push(F.$),o.push(F._$),et=R[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0}},T=function(){var _={EOF:1,parseError:function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},setInput:function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var a=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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),h.length-1&&(this.yylineno-=h.length-1);var m=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:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`

Binary file not shown.

View File

@ -1 +1 @@
import{a as h}from"./array-9f3ba611.js";import{w as d,c as o}from"./path-53f90ab3.js";import{ai as v}from"./doc-215985a7.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,a,c=!1,p;for(i==null&&(r=l(p=m())),f=0;f<=g;++f)!(f<g&&s(a=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(a,f,n),+u(a,f,n));if(p)return r=null,p+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l}; import{a as h}from"./array-9f3ba611.js";import{w as d,c as o}from"./path-53f90ab3.js";import{ai as v}from"./doc-7814a93f.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,a,c=!1,p;for(i==null&&(r=l(p=m())),f=0;f<=g;++f)!(f<g&&s(a=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(a,f,n),+u(a,f,n));if(p)return r=null,p+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};

View File

@ -1 +1 @@
import{p as J,d as B,s as Q,D as H,a as X,S as Z,b as F,c as I}from"./styles-1e36f090-645efc19.js";import{G as tt}from"./layout-5270bb1a.js";import{ab as E,a5 as g,aa as x,av as et,ac as ot,ae as w}from"./doc-215985a7.js";import{r as st}from"./index-892ad7fb-c12194bd.js";import"./edges-c959041a-20ff87ce.js";import"./createText-b670c180-3a59f9c2.js";import"./svgDraw-b48a99d5-4bc0ae09.js";import"./line-4258efe0.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const h="rect",C="rectWithTitle",nt="start",ct="end",it="divider",rt="roundedWithTitle",at="note",lt="noteGroup",_="statediagram",dt="state",Et=`${_}-${dt}`,U="transition",St="note",Tt="note-edge",pt=`${U} ${Tt}`,_t=`${_}-${St}`,ut="cluster",bt=`${_}-${ut}`,Dt="cluster-alt",ft=`${_}-${Dt}`,V="parent",Y="note",At="state",N="----",ht=`${N}${Y}`,M=`${N}${V}`,W="fill:none",z="fill: #333",m="c",q="text",K="normal";let y={},d=0;const yt=function(t){const n=Object.keys(t);for(const e of n)t[e]},gt=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function $t(t){return t==null?"":t.classes?t.classes.join(" "):""}function R(t="",n=0,e="",c=N){const i=e!==null&&e.length>0?`${c}${e}`:"";return`${At}-${t}${i}-${n}`}const A=(t,n,e,c,i,r)=>{const o=e.id,u=$t(c[o]);if(o!=="root"){let T=h;e.start===!0&&(T=nt),e.start===!1&&(T=ct),e.type!==H&&(T=e.type),y[o]||(y[o]={id:o,shape:T,description:w.sanitizeText(o,g()),classes:`${u} ${Et}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=w.sanitizeTextOrArray(s.description,g())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(E.info("Setting cluster for ",o,G(e)),s.type="group",s.dir=G(e),s.shape=e.type===X?it:rt,s.classes=s.classes+" "+bt+" "+(r?ft:""));const p={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:R(o,d),type:s.type,padding:15};if(p.centerLabel=!0,e.note){const a={labelStyle:"",shape:at,labelText:e.note.text,classes:_t,style:"",id:o+ht+"-"+d,domId:R(o,d,Y),type:s.type,padding:15},l={labelStyle:"",shape:lt,labelText:e.note.text,classes:s.classes,style:"",id:o+M,domId:R(o,d,V),type:"group",padding:0};d++;const b=o+M;t.setNode(b,l),t.setNode(a.id,a),t.setNode(o,p),t.setParent(o,b),t.setParent(a.id,b);let S=o,D=a.id;e.note.position==="left of"&&(S=a.id,D=o),t.setEdge(S,D,{arrowhead:"none",arrowType:"",style:W,labelStyle:"",classes:pt,arrowheadStyle:z,labelpos:m,labelType:q,thickness:K})}else t.setNode(o,p)}n&&n.id!=="root"&&(E.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(E.trace("Adding nodes children "),xt(t,e,e.doc,c,i,!r))},xt=(t,n,e,c,i,r)=>{E.trace("items",e),e.forEach(o=>{switch(o.stmt){case F:A(t,n,o,c,i,r);break;case H:A(t,n,o,c,i,r);break;case Z:{A(t,n,o.state1,c,i,r),A(t,n,o.state2,c,i,r);const u={id:"edge"+d,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:W,labelStyle:"",label:w.sanitizeText(o.description,g()),arrowheadStyle:z,labelpos:m,labelType:q,thickness:K,classes:U};t.setEdge(o.state1.id,o.state2.id,u,d),d++}break}})},G=(t,n=I)=>{let e=n;if(t.doc)for(let c=0;c<t.doc.length;c++){const i=t.doc[c];i.stmt==="dir"&&(e=i.value)}return e},Ct=async function(t,n,e,c){E.info("Drawing state diagram (v2)",n),y={},c.db.getDirection();const{securityLevel:i,state:r}=g(),o=r.nodeSpacing||50,u=r.rankSpacing||50;E.info(c.db.getRootDocV2()),c.db.extract(c.db.getRootDocV2()),E.info(c.db.getRootDocV2());const T=c.db.getStates(),s=new tt({multigraph:!0,compound:!0}).setGraph({rankdir:G(c.db.getRootDocV2()),nodesep:o,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});A(s,void 0,c.db.getRootDocV2(),T,c.db,!0);let p;i==="sandbox"&&(p=x("#i"+n));const a=i==="sandbox"?x(p.nodes()[0].contentDocument.body):x("body"),l=a.select(`[id="${n}"]`),b=a.select("#"+n+" g");await st(b,s,["barb"],_,n);const S=8;et.insertTitle(l,"statediagramTitleText",r.titleTopMargin,c.db.getDiagramTitle());const D=l.node().getBBox(),L=D.width+S*2,P=D.height+S*2;l.attr("class",_);const O=l.node().getBBox();ot(l,P,L,r.useMaxWidth);const v=`${O.x-S} ${O.y-S} ${L} ${P}`;E.debug(`viewBox ${v}`),l.attr("viewBox",v);const j=document.querySelectorAll('[id="'+n+'"] .edgeLabel .label');for(const $ of j){const k=$.getBBox(),f=document.createElementNS("http://www.w3.org/2000/svg",h);f.setAttribute("rx",0),f.setAttribute("ry",0),f.setAttribute("width",k.width),f.setAttribute("height",k.height),$.insertBefore(f,$.firstChild)}},Rt={setConf:yt,getClasses:gt,draw:Ct},Ht={parser:J,db:B,renderer:Rt,styles:Q,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,B.clear()}};export{Ht as diagram}; import{p as J,d as B,s as Q,D as H,a as X,S as Z,b as F,c as I}from"./styles-1e36f090-0294a369.js";import{G as tt}from"./layout-49de7b0f.js";import{ab as E,a5 as g,aa as x,av as et,ac as ot,ae as w}from"./doc-7814a93f.js";import{r as st}from"./index-892ad7fb-6b10aead.js";import"./edges-c959041a-672f75de.js";import"./createText-b670c180-ad86d00b.js";import"./svgDraw-b48a99d5-22935652.js";import"./line-de0e7350.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const h="rect",C="rectWithTitle",nt="start",ct="end",it="divider",rt="roundedWithTitle",at="note",lt="noteGroup",_="statediagram",dt="state",Et=`${_}-${dt}`,U="transition",St="note",Tt="note-edge",pt=`${U} ${Tt}`,_t=`${_}-${St}`,ut="cluster",bt=`${_}-${ut}`,Dt="cluster-alt",ft=`${_}-${Dt}`,V="parent",Y="note",At="state",N="----",ht=`${N}${Y}`,M=`${N}${V}`,W="fill:none",z="fill: #333",m="c",q="text",K="normal";let y={},d=0;const yt=function(t){const n=Object.keys(t);for(const e of n)t[e]},gt=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function $t(t){return t==null?"":t.classes?t.classes.join(" "):""}function R(t="",n=0,e="",c=N){const i=e!==null&&e.length>0?`${c}${e}`:"";return`${At}-${t}${i}-${n}`}const A=(t,n,e,c,i,r)=>{const o=e.id,u=$t(c[o]);if(o!=="root"){let T=h;e.start===!0&&(T=nt),e.start===!1&&(T=ct),e.type!==H&&(T=e.type),y[o]||(y[o]={id:o,shape:T,description:w.sanitizeText(o,g()),classes:`${u} ${Et}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=w.sanitizeTextOrArray(s.description,g())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(E.info("Setting cluster for ",o,G(e)),s.type="group",s.dir=G(e),s.shape=e.type===X?it:rt,s.classes=s.classes+" "+bt+" "+(r?ft:""));const p={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:R(o,d),type:s.type,padding:15};if(p.centerLabel=!0,e.note){const a={labelStyle:"",shape:at,labelText:e.note.text,classes:_t,style:"",id:o+ht+"-"+d,domId:R(o,d,Y),type:s.type,padding:15},l={labelStyle:"",shape:lt,labelText:e.note.text,classes:s.classes,style:"",id:o+M,domId:R(o,d,V),type:"group",padding:0};d++;const b=o+M;t.setNode(b,l),t.setNode(a.id,a),t.setNode(o,p),t.setParent(o,b),t.setParent(a.id,b);let S=o,D=a.id;e.note.position==="left of"&&(S=a.id,D=o),t.setEdge(S,D,{arrowhead:"none",arrowType:"",style:W,labelStyle:"",classes:pt,arrowheadStyle:z,labelpos:m,labelType:q,thickness:K})}else t.setNode(o,p)}n&&n.id!=="root"&&(E.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(E.trace("Adding nodes children "),xt(t,e,e.doc,c,i,!r))},xt=(t,n,e,c,i,r)=>{E.trace("items",e),e.forEach(o=>{switch(o.stmt){case F:A(t,n,o,c,i,r);break;case H:A(t,n,o,c,i,r);break;case Z:{A(t,n,o.state1,c,i,r),A(t,n,o.state2,c,i,r);const u={id:"edge"+d,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:W,labelStyle:"",label:w.sanitizeText(o.description,g()),arrowheadStyle:z,labelpos:m,labelType:q,thickness:K,classes:U};t.setEdge(o.state1.id,o.state2.id,u,d),d++}break}})},G=(t,n=I)=>{let e=n;if(t.doc)for(let c=0;c<t.doc.length;c++){const i=t.doc[c];i.stmt==="dir"&&(e=i.value)}return e},Ct=async function(t,n,e,c){E.info("Drawing state diagram (v2)",n),y={},c.db.getDirection();const{securityLevel:i,state:r}=g(),o=r.nodeSpacing||50,u=r.rankSpacing||50;E.info(c.db.getRootDocV2()),c.db.extract(c.db.getRootDocV2()),E.info(c.db.getRootDocV2());const T=c.db.getStates(),s=new tt({multigraph:!0,compound:!0}).setGraph({rankdir:G(c.db.getRootDocV2()),nodesep:o,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});A(s,void 0,c.db.getRootDocV2(),T,c.db,!0);let p;i==="sandbox"&&(p=x("#i"+n));const a=i==="sandbox"?x(p.nodes()[0].contentDocument.body):x("body"),l=a.select(`[id="${n}"]`),b=a.select("#"+n+" g");await st(b,s,["barb"],_,n);const S=8;et.insertTitle(l,"statediagramTitleText",r.titleTopMargin,c.db.getDiagramTitle());const D=l.node().getBBox(),L=D.width+S*2,P=D.height+S*2;l.attr("class",_);const O=l.node().getBBox();ot(l,P,L,r.useMaxWidth);const v=`${O.x-S} ${O.y-S} ${L} ${P}`;E.debug(`viewBox ${v}`),l.attr("viewBox",v);const j=document.querySelectorAll('[id="'+n+'"] .edgeLabel .label');for(const $ of j){const k=$.getBBox(),f=document.createElementNS("http://www.w3.org/2000/svg",h);f.setAttribute("rx",0),f.setAttribute("ry",0),f.setAttribute("width",k.width),f.setAttribute("height",k.height),$.insertBefore(f,$.firstChild)}},Rt={setConf:yt,getClasses:gt,draw:Ct},Ht={parser:J,db:B,renderer:Rt,styles:Q,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,B.clear()}};export{Ht as diagram};

Some files were not shown because too many files have changed in this diff Show More