@openapi-studio/core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/ssr-manifest.json +1073 -0
- package/dist/android-chrome-192x192.png +0 -0
- package/dist/android-chrome-512x512.png +0 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/Main-AU5IrlUT.css +1 -0
- package/dist/assets/Main-pQ_4D2LA.js +29 -0
- package/dist/assets/NotFound-CbAapptu.css +1 -0
- package/dist/assets/NotFound-eM2y_kOd.js +1 -0
- package/dist/assets/app-CQCir06q.js +9 -0
- package/dist/assets/app-Dzrp8B7R.css +1 -0
- package/dist/assets/chivo-mono-latin-ext-wght-normal-Cnx6d2Yf.woff2 +0 -0
- package/dist/assets/chivo-mono-latin-wght-normal-DXNvimoL.woff2 +0 -0
- package/dist/assets/chivo-mono-vietnamese-wght-normal-CR-pvMd4.woff2 +0 -0
- package/dist/assets/full-width-button-handler-oqK5S8oj.js +1 -0
- package/dist/assets/open-sans-cyrillic-ext-wght-normal-D8xHCTEw.woff2 +0 -0
- package/dist/assets/open-sans-cyrillic-wght-normal-bOs07Rf4.woff2 +0 -0
- package/dist/assets/open-sans-greek-ext-wght-normal-Bm9CHu9r.woff2 +0 -0
- package/dist/assets/open-sans-greek-wght-normal-8neIfJ3r.woff2 +0 -0
- package/dist/assets/open-sans-hebrew-wght-normal-BjjtG49P.woff2 +0 -0
- package/dist/assets/open-sans-latin-ext-wght-normal-DPNHYqvY.woff2 +0 -0
- package/dist/assets/open-sans-latin-wght-normal-CWNzRldh.woff2 +0 -0
- package/dist/assets/open-sans-math-wght-normal-C1FvUlkR.woff2 +0 -0
- package/dist/assets/open-sans-symbols-wght-normal-BAf6-sld.woff2 +0 -0
- package/dist/assets/open-sans-vietnamese-wght-normal-UygKeDyW.woff2 +0 -0
- package/dist/assets/string-styles-CIC5AFdR.js +117 -0
- package/dist/assets/styles-handler-EE_DCfH3.js +1 -0
- package/dist/assets/vanilla-jsoneditor-BHby_GXz.js +3960 -0
- package/dist/build.json +1 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/site.webmanifest +1 -0
- package/package.json +42 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.card{border-radius:var(--radius);border:1px solid hsl(var(--border));background-color:hsl(var(--card));color:hsl(var(--card-foreground));box-shadow:0 1px 3px #0000004d,0 1px 2px -1px #0000004d}.card-header{display:flex;flex-direction:column;padding:1.5rem;border-bottom:1px solid hsl(var(--border))}.card-title{font-size:1.5rem;font-weight:600;line-height:1.2}.card-description{font-size:.875rem;color:hsl(var(--muted-foreground));margin-top:.5rem}.card-content{padding:1.5rem}.btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:calc(var(--radius) - 2px);font-size:.875rem;font-weight:500;transition:all .2s;cursor:pointer;border:none;padding:.5rem 1rem}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.btn-primary{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground))}.btn.btn-primary:hover:not(:disabled){opacity:.9}.btn.btn-destructive{background-color:hsl(var(--destructive));color:hsl(var(--destructive-foreground))}.btn.btn-destructive:hover:not(:disabled){opacity:.9}.btn.btn-outline{border:1px solid hsl(var(--border));background-color:transparent;color:hsl(var(--foreground))}.btn.btn-outline:hover:not(:disabled){background-color:hsl(var(--accent));color:hsl(var(--accent-foreground))}.btn.btn-ghost{background-color:transparent;color:hsl(var(--foreground))}.btn.btn-ghost:hover:not(:disabled){background-color:hsl(var(--accent));color:hsl(var(--accent-foreground))}.btn.btn-sm{padding:.375rem .75rem;font-size:.8125rem}.text-muted{color:hsl(var(--muted-foreground))}.dialog-overlay{position:fixed;inset:0;background-color:#000c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:50;display:flex;align-items:center;justify-content:center}.dialog-content{background-color:hsl(var(--card));border-radius:var(--radius);border:1px solid hsl(var(--border));box-shadow:0 20px 25px -5px #00000080,0 8px 10px -6px #00000080;max-width:32rem;width:100%;max-height:90vh;overflow-y:auto;z-index:51;margin:1rem}.dialog-header{padding:1.5rem;border-bottom:1px solid hsl(var(--border))}.dialog-title{font-size:1.25rem;font-weight:600;margin:0}.dialog-body{padding:1.5rem}.dialog-footer{padding:1.5rem;border-top:1px solid hsl(var(--border));display:flex;justify-content:flex-end;gap:.5rem}.openapi-test{height:100vh;display:flex;flex-direction:column;background:hsl(var(--background));color:hsl(var(--foreground));overflow:hidden}.test-header{border-bottom:1px solid hsl(var(--border));background:hsl(var(--card));flex-shrink:0;z-index:100}.app-footer{margin-top:auto;text-align:center}.app-footer p{margin:0;font-size:.875rem;color:hsl(var(--muted-foreground))}.header-content{max-width:100%;margin:0 auto;padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center;gap:2rem;flex-wrap:wrap}.header-title-section{display:flex;flex-direction:column;gap:.25rem;flex:1;min-width:0}.title-row{display:flex;align-items:baseline;gap:.75rem}.logo{font-size:1.5rem;font-weight:700;margin:0;line-height:1.2}.api-version{font-size:.875rem;color:hsl(var(--muted-foreground));font-weight:500}.api-description{font-size:.75rem;color:hsl(var(--muted-foreground));margin:0;line-height:1.4;max-width:600px}.header-actions{display:flex;align-items:center;gap:1.5rem}.openapi-spec-link,.github-link{display:flex;align-items:center;justify-content:center;color:hsl(var(--foreground));text-decoration:none;transition:color .2s,opacity .2s;padding:.5rem;border-radius:calc(var(--radius) - 2px)}.openapi-spec-link:hover,.github-link:hover{color:hsl(var(--primary));opacity:.8}.openapi-spec-link:focus,.github-link:focus{outline:none;color:hsl(var(--primary))}.api-key-section{display:flex;align-items:center;gap:.5rem}.api-key-input{padding:.5rem .75rem;background:hsl(var(--input));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);font-size:.875rem;width:200px;transition:border-color .2s}.api-key-input:focus{outline:none;border-color:hsl(var(--ring))}.api-key-input::placeholder{color:hsl(var(--muted-foreground))}.clear-api-key-btn{padding:.25rem .5rem;background:hsl(var(--muted));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);cursor:pointer;font-size:1.25rem;line-height:1;width:1.75rem;height:1.75rem;display:flex;align-items:center;justify-content:center;transition:all .2s}.clear-api-key-btn:hover{background:hsl(var(--accent));opacity:.9}.auth-toggle{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.875rem}.auth-toggle input[type=checkbox]{cursor:pointer;width:1.25rem;height:1.25rem}.auth-toggle input[type=checkbox]:disabled{opacity:.5;cursor:not-allowed}.auth-section{display:flex;align-items:center}.sign-in-btn{padding:.5rem 1rem;background:hsl(var(--primary));color:hsl(var(--primary-foreground));border:none;border-radius:calc(var(--radius) - 2px);cursor:pointer;font-weight:500;transition:opacity .2s}.sign-in-btn:hover{opacity:.9}.user-section{display:flex;align-items:center}.auth-menu-toggle{padding:.5rem 1rem;background:hsl(var(--muted));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);cursor:pointer;font-weight:500;font-size:.875rem;transition:all .2s;display:flex;align-items:center;gap:.5rem}.auth-menu-toggle:hover{background:hsl(var(--accent));opacity:.9}.auth-menu-toggle.active{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.auth-menu-toggle.has-selection{background:hsl(var(--primary));color:hsl(var(--primary-foreground));border-color:hsl(var(--primary));box-shadow:0 0 0 2px hsla(var(--primary)/.2)}.auth-menu-toggle.has-selection svg{color:hsl(var(--primary-foreground))}.auth-side-menu{position:fixed;top:0;right:0;width:400px;height:100vh;background:hsl(var(--card));border-left:1px solid hsl(var(--border));z-index:1000;display:flex;flex-direction:column;box-shadow:-2px 0 8px #0000004d}.auth-menu-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid hsl(var(--border))}.auth-menu-header h2{margin:0;font-size:1.25rem;font-weight:600;color:hsl(var(--foreground))}.close-auth-menu{background:none;border:none;color:hsl(var(--muted-foreground));cursor:pointer;padding:.25rem;display:flex;align-items:center;justify-content:center;transition:color .2s}.close-auth-menu:hover{color:hsl(var(--foreground))}.auth-menu-content{flex:1;overflow-y:auto;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.auth-scheme{background:hsl(var(--card));border:1px solid hsl(var(--border));border-radius:var(--radius);padding:1.25rem;transition:all .2s;box-shadow:0 1px 2px #0000001a;cursor:pointer;position:relative}.auth-scheme:hover{box-shadow:0 2px 4px #00000026;border-color:hsl(var(--ring))}.auth-scheme.selected{border-color:hsl(var(--primary));background:hsla(var(--primary)/.1);box-shadow:0 0 0 2px hsla(var(--primary)/.2)}.auth-scheme.selected .auth-scheme-header{border-bottom-color:hsla(var(--primary)/.3)}.auth-scheme.selected .auth-scheme-header h3{color:hsl(var(--primary))}.auth-scheme.selected .auth-scheme-type{background:hsl(var(--primary));color:hsl(var(--primary-foreground));box-shadow:0 0 0 1px hsla(var(--primary-foreground)/.2)}.auth-scheme.selected .auth-scheme-description{color:hsl(var(--muted-foreground))}.auth-scheme.selected:before{content:"";position:absolute;top:.75rem;right:.75rem;width:8px;height:8px;background:hsl(var(--primary));border-radius:50%}.auth-scheme-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem;padding-bottom:.75rem;border-bottom:1px solid hsl(var(--border))}.auth-scheme-header h3{font-size:1rem;font-weight:600;margin:0;color:hsl(var(--foreground))}.auth-scheme-type{font-size:.75rem;padding:.375rem .625rem;background:hsl(var(--primary));color:hsl(var(--primary-foreground));border-radius:calc(var(--radius) - 4px);text-transform:uppercase;font-weight:600;letter-spacing:.025em}.auth-scheme-description{font-size:.875rem;color:hsl(var(--muted-foreground));margin-bottom:1rem;margin-top:.5rem;line-height:1.5}.auth-scheme-fields{display:flex;flex-direction:column;gap:1rem;margin-top:.5rem}.auth-scheme-fields label{display:flex;flex-direction:column;gap:.5rem}.auth-scheme-fields label span{font-size:.875rem;font-weight:500;color:hsl(var(--foreground))}.auth-scheme-fields label .field-location{font-size:.75rem;color:hsl(var(--muted-foreground));font-weight:400}.clerk-toggle-label{display:flex;align-items:center;gap:.75rem;cursor:pointer;font-size:.875rem;margin-bottom:.75rem;padding:.5rem 0;-webkit-user-select:none;user-select:none}.clerk-toggle-label input[type=checkbox]{cursor:pointer;width:1rem;height:1rem;appearance:none;background-color:hsl(var(--background));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .2s;position:relative}.clerk-toggle-label input[type=checkbox]:hover:not(:disabled){border-color:hsl(var(--ring))}.clerk-toggle-label input[type=checkbox]:focus-visible{outline:none;box-shadow:0 0 0 2px hsl(var(--background)),0 0 0 4px hsl(var(--ring))}.clerk-toggle-label input[type=checkbox]:checked{background-color:hsl(var(--primary));border-color:hsl(var(--primary))}.clerk-toggle-label input[type=checkbox]:checked:after{content:"";position:absolute;width:.25rem;height:.5rem;border:solid hsl(var(--primary-foreground));border-width:0 2px 2px 0;transform:rotate(45deg);top:.125rem}.clerk-toggle-label input[type=checkbox]:disabled{opacity:.5;cursor:not-allowed;background-color:hsl(var(--muted))}.clerk-toggle-label span:not(.sign-in-hint){color:hsl(var(--foreground));font-weight:500;line-height:1.5}.clerk-toggle-label .sign-in-hint{font-size:.75rem;color:hsl(var(--muted-foreground));font-style:italic}.auth-input{padding:.5rem .75rem;background:hsl(var(--input));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);font-size:.875rem;transition:border-color .2s}.auth-input:focus{outline:none;border-color:hsl(var(--ring))}.auth-input::placeholder{color:hsl(var(--muted-foreground))}.clear-credential-btn{padding:.5rem 1rem;background:hsl(var(--muted));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);cursor:pointer;font-size:.875rem;font-weight:500;transition:all .2s;align-self:flex-start;margin-top:.25rem}.clear-credential-btn:hover{background:hsl(var(--accent));opacity:.9}.save-button{padding:.75rem 1.5rem;background:hsl(var(--primary));color:hsl(var(--primary-foreground));border:none;border-radius:calc(var(--radius) - 2px);font-weight:500;cursor:pointer;transition:opacity .2s;align-self:flex-start;margin-top:.25rem}.save-button:hover{opacity:.9}.clerk-key-card{background:hsl(var(--muted));border:1px solid hsl(var(--border));border-radius:var(--radius);padding:1.25rem;margin-top:auto;border-top:2px solid hsl(var(--border));border-top-left-radius:0;border-top-right-radius:0;box-shadow:none}.clerk-key-card:hover{box-shadow:none;border-color:hsl(var(--border))}.clerk-key-header{margin-bottom:.5rem}.clerk-key-header h3{font-size:.875rem;font-weight:600;margin:0;color:hsl(var(--muted-foreground));text-transform:uppercase;letter-spacing:.05em}.clerk-key-description{font-size:.8125rem;color:hsl(var(--muted-foreground));margin-bottom:1rem;line-height:1.4}.clerk-key-fields{display:flex;flex-direction:column;gap:.75rem}.clerk-key-fields label{display:flex;flex-direction:column;gap:.375rem}.clerk-key-fields label span{font-size:.8125rem;color:hsl(var(--muted-foreground));font-weight:500}.clerk-key-input{width:100%;padding:.5rem .75rem;background:hsl(var(--background));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);color:hsl(var(--foreground));font-family:Chivo Mono Variable,monospace;font-size:.8125rem;transition:all .2s}.clerk-key-input:focus:not(:disabled){outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 2px hsla(var(--ring)/.2)}.clerk-key-input:disabled{background:hsl(var(--muted));color:hsl(var(--muted-foreground));cursor:not-allowed;opacity:.7}.clerk-key-input::placeholder{color:hsl(var(--muted-foreground))}.anonymous-option .auth-scheme-header h3{display:flex;align-items:center;gap:.5rem}.test-container{display:flex;flex:1;overflow:hidden;min-height:0}.endpoints-sidebar{width:500px;border-right:1px solid hsl(var(--border));background:hsl(var(--card));display:flex;flex-direction:column;flex-shrink:0;overflow:hidden;transition:width .3s ease}.endpoints-sidebar.collapsed{width:60px}.endpoints-sidebar .sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;flex-shrink:0}.endpoints-sidebar .sidebar-header h2{font-size:1rem;margin:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.endpoints-sidebar.collapsed .sidebar-header{flex-direction:column;gap:.5rem;padding:1rem .5rem}.endpoints-sidebar.collapsed .sidebar-header h2{writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg)}.sidebar-toggle{padding:.25rem .5rem;background:hsl(var(--muted));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);cursor:pointer;line-height:1;transition:all .2s;flex-shrink:0;display:flex;align-items:center;justify-content:center}.sidebar-toggle:hover{background:hsl(var(--accent));opacity:.9}.sidebar-toggle:active{transform:scale(.95)}.sidebar-content{flex:1;overflow-y:auto;overflow-x:hidden;min-height:0;padding-left:1rem;padding-bottom:1rem}.loading,.error{padding:.75rem;text-align:center;color:hsl(var(--muted-foreground));font-size:.875rem}.error{color:hsl(var(--destructive))}.endpoints-groups{display:flex;flex-direction:column;gap:.5rem;padding-right:1rem}.endpoint-group{border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);overflow:hidden}.group-header{padding:.5rem .75rem;background:hsl(var(--muted));cursor:pointer;display:flex;align-items:center;gap:.375rem;transition:background .2s;-webkit-user-select:none;user-select:none}.group-header:hover{background:hsl(var(--accent))}.group-name{font-weight:600;font-size:.8125rem;color:hsl(var(--foreground));flex:1}.group-count{font-size:.6875rem;color:hsl(var(--muted-foreground))}.group-toggle{color:hsl(var(--muted-foreground));width:.875rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.group-endpoints{display:flex;flex-direction:column;gap:.25rem;padding:.375rem;background:hsl(var(--card));min-width:0}.endpoint-item{padding:.375rem .5rem;border-radius:calc(var(--radius) - 2px);cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.endpoint-item:hover,.endpoint-item.active{background:hsl(var(--accent))}.security-indicator{color:hsl(var(--muted-foreground));flex-shrink:0;opacity:.7}.security-indicator-large{color:hsl(var(--muted-foreground));flex-shrink:0;opacity:.8}.method-badge{display:inline-flex;align-items:center;justify-content:center;padding:.125rem .375rem;border-radius:3px;color:#fff;font-weight:600;font-size:.625rem;text-transform:uppercase;flex-shrink:0;line-height:1.2;width:3.5rem;min-width:3.5rem;max-width:3.5rem;text-align:center;box-sizing:border-box}.method-badge.large{font-size:.875rem;padding:.375rem .75rem;width:auto;min-width:auto;max-width:none}.endpoint-path{font-family:Chivo Mono Variable,monospace;font-size:.75rem;color:hsl(var(--foreground));font-weight:500;flex:1 1 auto;min-width:0;line-height:1.3;word-break:break-all;overflow-wrap:break-word}.endpoint-meta{display:flex;align-items:center;gap:.5rem;flex-shrink:0;margin-left:auto;justify-content:flex-end;min-width:fit-content}.endpoint-summary{font-size:.6875rem;color:hsl(var(--muted-foreground));line-height:1.3;flex-shrink:0;text-align:right}.endpoint-content{display:flex;flex:1;overflow:hidden;min-height:0}.endpoint-tester{flex:1;padding:1.5rem;overflow-y:auto;overflow-x:hidden;min-height:0;background-color:hsl(var(--background));background-image:linear-gradient(hsl(var(--border)/.3) 1px,transparent 1px),linear-gradient(90deg,hsl(var(--border)/.3) 1px,transparent 1px);background-size:50px 50px;background-position:0 0,0 0;border-right:1px solid hsl(var(--border));display:flex;flex-direction:column}.endpoint-tester.empty{align-items:center;justify-content:center}.examples-sidebar{width:400px;border-right:1px solid hsl(var(--border));background:hsl(var(--card));padding:1.5rem;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto;overflow-x:hidden;min-height:0;transition:width .3s ease}.examples-sidebar.collapsed{width:60px;padding:1.5rem .5rem}.examples-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;flex-shrink:0}.examples-header h3{font-size:1rem;margin-bottom:0;margin-top:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.examples-sidebar.collapsed .examples-header{flex-direction:column;gap:.5rem;margin-bottom:0}.examples-sidebar.collapsed .examples-header h3{writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg)}.examples-toggle{padding:.25rem .5rem;background:hsl(var(--muted));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);cursor:pointer;line-height:1;transition:all .2s;flex-shrink:0;display:flex;align-items:center;justify-content:center}.examples-toggle:hover{background:hsl(var(--accent));opacity:.9}.examples-toggle:active{transform:scale(.95)}.examples-content{flex:1;overflow-y:auto;overflow-x:hidden;min-height:0}.view-toggle{display:flex;gap:.25rem;background:hsl(var(--muted));border-radius:calc(var(--radius) - 2px);padding:.125rem}.toggle-btn{padding:.375rem .75rem;background:transparent;border:none;border-radius:calc(var(--radius) - 2px);cursor:pointer;font-size:.75rem;font-weight:500;color:hsl(var(--muted-foreground));transition:all .2s;white-space:nowrap}.toggle-btn:hover{color:hsl(var(--foreground))}.toggle-btn.active{background:hsl(var(--background));color:hsl(var(--foreground));box-shadow:0 1px 2px #0000001a}.toggle-btn.small{padding:.25rem .5rem;font-size:.6875rem}.example-section{margin-bottom:1.5rem;flex-shrink:0}.example-section:last-child{margin-bottom:0}.example-section h4{font-size:.75rem;margin-bottom:.75rem;margin-top:0;font-weight:600;color:hsl(var(--foreground));text-transform:uppercase;letter-spacing:.05em}.example-section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.example-section-header h4{margin-bottom:0}.example-content{border:none;border-radius:var(--radius);overflow:hidden;background:hsl(var(--input));box-shadow:none}.example-content pre{margin:0;padding:1rem;font-family:Chivo Mono Variable,monospace;font-size:.875rem;white-space:pre-wrap;word-wrap:break-word;overflow-x:auto;max-height:400px;overflow-y:auto}.example-content .json-editor-wrapper{border-top-left-radius:0;border-top-right-radius:0;border:none;box-shadow:none}.example-content .schema-display{border:none;box-shadow:none;max-height:400px;min-height:150px;overflow-y:auto;overflow-x:auto;background:hsl(var(--input))}.example-content .schema-text{margin:0;padding:1rem;font-family:Chivo Mono Variable,monospace;font-size:.8125rem;line-height:1.8;color:hsl(var(--foreground));white-space:pre;overflow-x:auto;background:hsl(var(--input));border-radius:calc(var(--radius) - 2px)}.no-examples{padding:1.5rem;text-align:center;color:hsl(var(--muted-foreground));border:1px dashed hsl(var(--border));border-radius:var(--radius);font-size:.875rem}.response-codes-list{display:flex;flex-direction:column;gap:1rem}.response-code-item{border:1px solid hsl(var(--border));border-radius:var(--radius);overflow:hidden;background:hsl(var(--card))}.response-code-item .example-content{border:none;border-radius:0;box-shadow:none;margin-top:0}.response-code-item .example-content pre{max-height:300px}.response-code-item .example-content .json-editor-wrapper{border:none;box-shadow:none}.response-code-item .example-content .schema-display{border:none;box-shadow:none;max-height:300px;min-height:100px;overflow-y:auto;overflow-x:auto;background:hsl(var(--input))}.response-code-item .example-content .schema-text{margin:0;padding:.875rem;font-family:Chivo Mono Variable,monospace;font-size:.75rem;line-height:1.7;color:hsl(var(--foreground));white-space:pre;overflow-x:auto;background:hsl(var(--input))}.response-code-header{padding:.75rem 1rem;background:hsl(var(--muted));border-bottom:none;display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.response-code-header.success{background:#49cc901a}.response-code-header.error{background:#f93e3e1a}.response-code-number{font-weight:700;font-size:.875rem;font-family:Chivo Mono Variable,monospace;min-width:3rem;text-align:center;padding:.25rem .5rem;border-radius:calc(var(--radius) - 2px);background:hsl(var(--background));color:hsl(var(--foreground))}.response-code-header.success .response-code-number{background:#49cc9033;color:#49cc90}.response-code-header.error .response-code-number{background:#f93e3e33;color:#f93e3e}.response-code-description{font-size:.875rem;color:hsl(var(--foreground));flex:1;min-width:0}.response-code-header .view-toggle{margin-left:auto;flex-shrink:0}.no-example{padding:1rem;text-align:center;color:hsl(var(--muted-foreground));font-size:.8125rem;font-style:italic}.schema-references-list{display:flex;flex-direction:column;gap:1rem}.schema-reference-item{border:1px solid hsl(var(--border));border-radius:var(--radius);overflow:hidden;background:hsl(var(--card))}.schema-reference-item .example-content{border:none;border-radius:0;box-shadow:none;margin-top:0}.schema-reference-item .example-content .schema-display{border:none;box-shadow:none;max-height:300px;min-height:100px;overflow-y:auto;overflow-x:auto;background:hsl(var(--input))}.schema-reference-item .example-content .schema-text{margin:0;padding:.875rem;font-family:Chivo Mono Variable,monospace;font-size:.75rem;line-height:1.7;color:hsl(var(--foreground));white-space:pre;overflow-x:auto;background:hsl(var(--input))}.schema-reference-header{padding:.75rem 1rem;background:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:background .2s;-webkit-user-select:none;user-select:none}.schema-reference-header:hover{background:hsl(var(--accent))}.schema-reference-toggle{color:hsl(var(--muted-foreground));width:.875rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.schema-reference-name{font-weight:700;font-size:.875rem;font-family:Chivo Mono Variable,monospace;color:hsl(var(--foreground));flex:1}.empty-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem}.welcome-content{max-width:600px;text-align:center;animation:fadeIn .5s ease-in}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.welcome-icon{margin-bottom:1.5rem;display:flex;justify-content:center;color:hsl(var(--foreground));opacity:.9}.welcome-title{font-size:2rem;font-weight:600;color:hsl(var(--foreground));margin:0 0 1rem;letter-spacing:-.02em}.welcome-description{font-size:1.125rem;color:hsl(var(--muted-foreground));margin:0 0 2.5rem;line-height:1.6}.welcome-tips{display:flex;flex-direction:column;gap:1rem;margin-top:2rem;text-align:left}.tip-item{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;background:hsl(var(--card));border:1px solid hsl(var(--border));border-radius:6px;color:hsl(var(--foreground));font-size:.9375rem;cursor:default;-webkit-user-select:none;user-select:none}.tip-icon{flex-shrink:0;color:hsl(var(--muted-foreground))}.endpoint-header{margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid hsl(var(--border))}.endpoint-title{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem;flex-wrap:wrap}.security-schemes-wrapper{margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid hsl(var(--border))}.security-schemes-title{font-size:.875rem;font-weight:600;color:hsl(var(--foreground));margin:0 0 .75rem;text-transform:uppercase;letter-spacing:.05em}.security-schemes-section{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.security-scheme-card{display:flex;align-items:center;gap:.375rem;padding:.375rem .625rem;background-color:hsl(var(--muted)/.5);border:1px solid hsl(var(--muted-foreground)/.2);border-radius:calc(var(--radius) - 2px);font-size:.6875rem;transition:all .2s ease;cursor:pointer}.security-scheme-card:hover{background-color:hsl(var(--muted)/.7);border-color:hsl(var(--muted-foreground)/.3)}.security-scheme-card.selected{border-color:hsl(var(--primary));background-color:hsla(var(--primary)/.1);box-shadow:0 0 0 2px hsla(var(--primary)/.2)}.security-scheme-card.selected .security-card-icon{color:hsl(var(--primary));opacity:1}.security-scheme-card.selected .scheme-name{color:hsl(var(--primary))}.security-card-icon{color:hsl(var(--muted-foreground));flex-shrink:0;opacity:.8;transition:all .2s ease}.scheme-name{font-weight:500;color:hsl(var(--foreground));font-family:Chivo Mono Variable,monospace;font-size:.6875rem;transition:color .2s ease}.endpoint-info{margin-top:.75rem}.endpoint-summary-text{color:hsl(var(--foreground));margin-top:0;margin-bottom:.5rem;line-height:1.5;font-size:1rem;font-weight:500}.endpoint-description{color:hsl(var(--muted-foreground));margin-top:0;margin-bottom:0;line-height:1.6;font-size:.9375rem}.auth-selection-section{margin-bottom:1.25rem}.auth-label{display:flex;align-items:center;gap:.75rem;font-size:.875rem;font-weight:500;color:hsl(var(--foreground))}.auth-label span{min-width:fit-content}.auth-select{flex:1;padding:.5rem 2rem .5rem .75rem;background:hsl(var(--input));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);font-size:.875rem;cursor:pointer;transition:all .2s;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='hsl(0%2C 0%25%2C 98%25)' d='M6 9L1 4h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .5rem center}.auth-select:focus{outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 2px hsl(var(--ring)/.2)}.auth-select:hover{border-color:hsl(var(--ring))}.auth-select option{background:hsl(var(--input));color:hsl(var(--foreground))}.request-section{margin-bottom:1.5rem;border:1px solid hsl(var(--border));border-radius:var(--radius);padding:1.25rem;background:hsl(var(--card));box-shadow:0 1px 2px #0000001a}.request-section h3{font-size:1.125rem;margin-bottom:1.25rem;margin-top:0;font-weight:600;color:hsl(var(--foreground))}.request-section:last-child{margin-bottom:0}.response-section{margin-bottom:1.5rem}.response-section h3{font-size:1.125rem;margin-bottom:1.25rem;margin-top:0;font-weight:600;color:hsl(var(--foreground))}.response-section:last-child{margin-bottom:0}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.25rem}.section-header h3{margin-bottom:0}.clear-history-btn{padding:.375rem .75rem;background:hsl(var(--muted));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);cursor:pointer;font-size:.8125rem;font-weight:500;transition:all .2s}.clear-history-btn:hover{background:hsl(var(--accent));border-color:hsl(var(--accent))}.request-history-list{display:flex;flex-direction:column;gap:1rem}.history-item{border:1px solid hsl(var(--border));border-radius:var(--radius);background:hsl(var(--card));padding:1rem;margin-bottom:1rem;box-shadow:0 1px 2px #0000001a}.history-item:last-child{margin-bottom:0}.history-item-header{padding:0;display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem;border-bottom:1px solid hsl(var(--border));padding-bottom:.75rem}.history-item-title{display:flex;align-items:center;gap:.75rem;flex:1;min-width:0}.method-badge.small{font-size:.625rem;padding:.125rem .375rem;width:auto;min-width:3rem;max-width:3rem}.history-url{font-family:Chivo Mono Variable,monospace;font-size:.8125rem;color:hsl(var(--foreground));flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-auth-scheme{display:flex;align-items:center;gap:.375rem;font-size:.75rem;color:hsl(var(--muted-foreground));white-space:nowrap;padding:.25rem .5rem;background:hsl(var(--muted));border-radius:calc(var(--radius) - 2px)}.history-timestamp{font-size:.75rem;color:hsl(var(--muted-foreground));white-space:nowrap}.history-status{flex-shrink:0}.history-curl-section{margin-bottom:1rem;padding:.75rem;background:hsl(var(--input));border-radius:calc(var(--radius) - 2px)}.history-curl-section .curl-header{display:flex;justify-content:space-between;align-items:center;cursor:pointer;padding:.25rem;border-radius:calc(var(--radius) - 2px);transition:background-color .2s}.history-curl-section .curl-header:hover{background:hsl(var(--muted))}.history-curl-section .curl-header .curl-header-left{display:flex;align-items:center;gap:.5rem}.history-curl-section .curl-header .curl-toggle-icon{color:hsl(var(--muted-foreground));flex-shrink:0}.history-curl-section .curl-header h5{font-size:.875rem;font-weight:600;margin:0}.history-curl-section .copy-curl-btn{display:flex;align-items:center;gap:.5rem;padding:.375rem .75rem;background:hsl(var(--muted));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);cursor:pointer;font-size:.875rem;transition:all .2s}.history-curl-section .copy-curl-btn:hover{background:hsl(var(--accent));opacity:.9}.history-curl-section .curl-command{padding:.75rem 0;overflow-x:auto}.history-curl-section .curl-command pre{margin:0;font-family:Chivo Mono Variable,monospace;font-size:.8125rem;line-height:1.6;color:hsl(var(--foreground));white-space:pre-wrap;word-break:break-all}.history-request-body,.history-response,.history-error{padding:.75rem 0;margin-bottom:1rem}.history-request-body:last-child,.history-response:last-child,.history-error:last-child{margin-bottom:0}.history-request-body h5,.history-response h5,.history-error h5{font-size:.75rem;font-weight:600;margin-bottom:.625rem;margin-top:0;color:hsl(var(--muted-foreground));text-transform:uppercase;letter-spacing:.05em}.history-request-body .json-editor-wrapper,.history-response .json-editor-wrapper,.history-error .json-editor-wrapper{border:1px solid hsl(var(--border));max-height:300px;min-height:100px;background:hsl(var(--input));overflow:hidden}.history-error .error-message{color:hsl(var(--destructive));font-size:.875rem;padding:.5rem 0;margin:0}.params-section{margin-bottom:1.25rem}.params-section:last-child{margin-bottom:0}.params-section h4{font-size:.75rem;margin-bottom:.75rem;margin-top:0;font-weight:600;color:hsl(var(--foreground));text-transform:uppercase;letter-spacing:.05em}.params-list{display:flex;flex-direction:column;gap:.75rem}.param-item{display:flex;flex-direction:row;align-items:center;gap:.75rem}.param-item dt{font-size:.875rem;color:hsl(var(--foreground));margin:0;flex:1}.param-item dd{margin:0;flex:1}.param-item .param-name{font-weight:500;font-family:Chivo Mono Variable,monospace}.param-item .required{color:hsl(var(--destructive));margin-left:.25rem}.param-item .param-desc{color:hsl(var(--muted-foreground));font-weight:400}.param-item input{width:100%;padding:.5rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);background:hsl(var(--input));color:hsl(var(--foreground));font-family:Chivo Mono Variable,monospace;font-size:.875rem}.param-item input:focus{outline:none;border-color:hsl(var(--ring))}.body-section{margin-bottom:1.25rem}.body-section:last-child{margin-bottom:0}.body-section h4{font-size:.75rem;margin-bottom:.75rem;margin-top:0;font-weight:600;color:hsl(var(--foreground));text-transform:uppercase;letter-spacing:.05em}.request-body{width:100%;padding:.75rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);background:hsl(var(--input));color:hsl(var(--foreground));font-family:Chivo Mono Variable,monospace;font-size:.875rem;resize:vertical}.request-body:focus{outline:none;border-color:hsl(var(--ring))}.json-editor-wrapper{width:100%;border:1px solid hsl(var(--border));border-radius:var(--radius);overflow:hidden;background:hsl(var(--input))}.json-editor-wrapper :deep(.jsoneditor){border:none;background:hsl(var(--input))}.json-editor-wrapper :deep(.jsoneditor-menu){background:hsl(var(--muted));border-bottom:none}.json-editor-wrapper :deep(.jsoneditor-outer){background:hsl(var(--input))}.json-editor-wrapper :deep(.ace_editor){background:hsl(var(--input))!important;color:hsl(var(--foreground))!important}.json-editor-wrapper :deep(.ace_gutter){background:hsl(var(--muted))!important}.send-button{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.75rem 1.5rem;background:hsl(var(--primary)/.9);color:hsl(var(--primary-foreground));border:1px solid hsl(var(--primary)/.3);border-radius:var(--radius);cursor:pointer;font-weight:600;font-size:.8125rem;letter-spacing:.025em;margin:1.5rem auto 0;box-shadow:0 4px 6px -1px #0000004d,0 2px 4px -1px #0003}.send-button:hover:not(:disabled){background:hsl(var(--primary)/1);border-color:hsl(var(--primary)/.5);box-shadow:0 6px 12px -2px #0006,0 4px 6px -1px #0000004d}.send-button:active:not(:disabled){box-shadow:0 2px 4px -1px #0000004d,0 1px 2px -1px #0003}.send-button:disabled{opacity:.6;cursor:not-allowed}.send-button-icon{flex-shrink:0}.response-content{border:1px solid hsl(var(--border));border-radius:var(--radius);overflow:hidden;background:hsl(var(--input));box-shadow:0 1px 2px #0000001a}.response-status{padding:.75rem 1rem;background:hsl(var(--muted));border-bottom:1px solid hsl(var(--border))}.status-code{font-weight:600;font-size:.875rem}.status-code.success{color:#49cc90}.status-code.error{color:#f93e3e}.response-body{padding:1rem;background:hsl(var(--input));overflow-x:auto}.response-body pre{margin:0;font-family:Chivo Mono Variable,monospace;font-size:.875rem;white-space:pre-wrap;word-wrap:break-word}.example-response{border:1px solid hsl(var(--border));border-radius:var(--radius);overflow:hidden;background:hsl(var(--input));border-color:hsl(var(--accent));box-shadow:0 1px 2px #0000001a}.example-header{padding:.75rem 1rem;background:hsl(var(--muted));border-bottom:1px solid hsl(var(--border))}.example-label{font-weight:600;font-size:.875rem;color:hsl(var(--muted-foreground));text-transform:uppercase;letter-spacing:.05em}.no-response{padding:1.5rem;text-align:center;color:hsl(var(--muted-foreground));border:1px dashed hsl(var(--border));border-radius:var(--radius)}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vanilla-jsoneditor-BHby_GXz.js","assets/app-CQCir06q.js","assets/app-Dzrp8B7R.css","assets/styles-handler-EE_DCfH3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as dt,c as d,o as u,r as Ct,a as w,w as de,n as qe,b as K,i as $t,e as T,f as j,g as jt,h as Se,_ as ae,j as pt,k as Fe,l as Ot,m as He,p as xt,q as Bt,u as qt,s as At,t as Et,v as Tt,x as Lt,y as Rt,z as n,A as m,B as k,C as M,D as J,E as It,S as Pt,U as Vt,F as re,G as ie,H as ke,I as Ne,J as at,K as zt,L as ot}from"./app-CQCir06q.js";const Mt=["selection","mainMenuBar","navigationBar","statusBar","askToFormat","readOnly","indentation","tabSize","escapeControlCharacters","escapeUnicodeCharacters","flattenColumns","validator","onClassName","onRenderValue","onRenderMenu"],Nt=["selection","mode","mainMenuBar","navigationBar","statusBar","askToFormat","readOnly","indentation","tabSize","escapeControlCharacters","escapeUnicodeCharacters","flattenColumns","validator","parser","validationParser","pathParser","onClassName","onRenderValue","onRenderMenu"],Dt=(i={},A)=>{const _={};for(const g of Nt){const y=A[g]!==void 0?A[g]:i[g];y!==void 0&&(_[g]=y)}return _},Ut=`
|
|
3
|
+
<svg
|
|
4
|
+
class="fa-icon svelte-1dof0an"
|
|
5
|
+
viewBox="0 0 1024 1024"
|
|
6
|
+
version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
p-id="1927" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
+
width="24"
|
|
10
|
+
height="24"
|
|
11
|
+
>
|
|
12
|
+
<path d="M63.989383 105.442494l0 268.396843c0 18.935258 15.368012 34.304294 34.304294 34.304294 18.936281 0 34.304294-15.369036 34.304294-34.304294L132.597971 180.156126l218.107483 218.176045c12.82919 12.830213 33.618679 12.830213 46.515407 0 12.830213-12.897751 12.830213-33.686217 0-46.51643l-218.176045-218.107483 193.683211 0c18.935258 0 34.304294-15.369036 34.304294-34.304294 0-18.935258-15.369036-34.304294-34.304294-34.304294L104.331183 65.09967C79.288834 65.09967 63.989383 77.999468 63.989383 105.442494L63.989383 105.442494z" p-id="1928" fill="#e6e6e6"></path><path d="M917.688719 65.09967 649.290853 65.09967c-18.935258 0-34.304294 15.369036-34.304294 34.304294 0 18.936281 15.369036 34.304294 34.304294 34.304294l193.683211 0-218.176045 218.107483c-12.830213 12.82919-12.830213 33.618679 0 46.51643 12.897751 12.830213 33.686217 12.830213 46.515407 0L889.420909 180.156126l0 193.683211c0 18.935258 15.369036 34.304294 34.304294 34.304294 18.936281 0 34.304294-15.369036 34.304294-34.304294L958.029496 105.442494C958.029496 77.999468 942.79963 65.09967 917.688719 65.09967L917.688719 65.09967z" p-id="1929" fill="#e6e6e6"></path>
|
|
13
|
+
<path d="M104.331183 957.013353l268.397866 0c18.935258 0 34.304294-15.368012 34.304294-34.304294 0-18.936281-15.369036-34.304294-34.304294-34.304294L179.045839 888.404766l218.176045-218.107483c12.830213-12.82919 12.830213-33.618679 0-46.515407-12.897751-12.830213-33.686217-12.830213-46.515407 0l-218.107483 218.176045L132.598994 648.27471c0-18.935258-15.368012-34.304294-34.304294-34.304294-18.936281 0-34.304294 15.369036-34.304294 34.304294l0 268.397866C63.989383 944.115602 79.288834 957.013353 104.331183 957.013353L104.331183 957.013353z" p-id="1930" fill="#e6e6e6"></path>
|
|
14
|
+
<path d="M958.029496 916.671553 958.029496 648.27471c0-18.935258-15.368012-34.304294-34.304294-34.304294-18.935258 0-34.304294 15.369036-34.304294 34.304294l0 193.683211L671.313425 623.781876c-12.82919-12.830213-33.618679-12.830213-46.515407 0-12.830213 12.897751-12.830213 33.686217 0 46.515407l218.176045 218.107483L649.290853 888.404766c-18.935258 0-34.304294 15.368012-34.304294 34.304294 0 18.936281 15.369036 34.304294 34.304294 34.304294l268.397866 0C942.79963 957.013353 958.029496 944.115602 958.029496 916.671553L958.029496 916.671553z" p-id="1931" fill="#e6e6e6"></path>
|
|
15
|
+
</svg>
|
|
16
|
+
`,ye=(i,A,_=!1)=>{const g=i&&typeof i[A]<"u";return!g&&_&&console.warn("Typeguard warn!!! The object has no property: ",A),g},Ft=dt({name:"JsonEditor",props:{modelValue:[Object,Array,Number,String,Boolean,String,null],value:{type:[Object,Array,Number,String,Boolean,String,null],default:void 0},json:{type:[Object,Array,Number,String,Boolean,null],default:void 0},text:String,jsonString:String,selection:{type:Object,default:void 0},mode:{type:String,default:"tree"},mainMenuBar:{type:Boolean,default:void 0},navigationBar:{type:Boolean,default:void 0},statusBar:{type:Boolean,default:void 0},askToFormat:{type:Boolean,default:void 0},readOnly:{type:Boolean,default:void 0},indentation:[String,Number],tabSize:Number,escapeControlCharacters:{type:Boolean,default:void 0},escapeUnicodeCharacters:{type:Boolean,default:void 0},flattenColumns:{type:Boolean,default:void 0},validator:Function,parser:Object,validationParser:Object,pathParser:Object,queryLanguagesIds:Array,queryLanguageId:String,onClassName:Function,onRenderValue:Function,onRenderMenu:Function,height:[String,Number],fullWidthButton:{type:Boolean,default:void 0},darkTheme:{type:Boolean,default:void 0}},emits:["update:modelValue","update:json","update:text","update:jsonString","update:selection","change","error","change-mode","update:mode","change-query-language","focus","blur"],setup(i,{expose:A,emit:_}){const g=$t("jsonEditorOptions",{}),y=T(),E=T(null),N=T(!1),V=T(!1),Q=T("tree"),O=T(null),F=j(()=>{const r=i.height||g?.height;return r&&!N.value?{height:r+"px"}:{}}),D=j(()=>i.darkTheme||g?.darkTheme),U=j(()=>i.queryLanguagesIds||g?.queryLanguagesIds),W=j(()=>i.queryLanguageId||g?.queryLanguageId),x=jt({}),P=async()=>{if(typeof window>"u"||typeof U.value>"u"||!U.value?.length)return;for(const C of U.value)if(!x[C])switch(C){case"javascript":{const{javascriptQueryLanguage:$}=await ae(async()=>{const{javascriptQueryLanguage:q}=await import("./vanilla-jsoneditor-BHby_GXz.js");return{javascriptQueryLanguage:q}},__vite__mapDeps([0,1,2]));x[C]=$;break}case"lodash":{const{lodashQueryLanguage:$}=await ae(async()=>{const{lodashQueryLanguage:q}=await import("./vanilla-jsoneditor-BHby_GXz.js");return{lodashQueryLanguage:q}},__vite__mapDeps([0,1,2]));x[C]=$;break}case"jmespath":{const{jmespathQueryLanguage:$}=await ae(async()=>{const{jmespathQueryLanguage:q}=await import("./vanilla-jsoneditor-BHby_GXz.js");return{jmespathQueryLanguage:q}},__vite__mapDeps([0,1,2]));x[C]=$;break}case"jsonquery":{const{jsonQueryLanguage:$}=await ae(async()=>{const{jsonQueryLanguage:q}=await import("./vanilla-jsoneditor-BHby_GXz.js");return{jsonQueryLanguage:q}},__vite__mapDeps([0,1,2]));x[C]=$;break}case"jsonpath":{const{jsonpathQueryLanguage:$}=await ae(async()=>{const{jsonpathQueryLanguage:q}=await import("./vanilla-jsoneditor-BHby_GXz.js");return{jsonpathQueryLanguage:q}},__vite__mapDeps([0,1,2]));x[C]=$;break}}const r=Object.values(x);if(r.length!==0)return r},L=()=>{E.value&&(E.value.removeEventListener("click",H),E.value=null)},Y=async()=>{if(typeof window>"u")return;const{getElement:r,createElement:C}=await ae(async()=>{const{getElement:ee,createElement:ve}=await import("./full-width-button-handler-oqK5S8oj.js");return{getElement:ee,createElement:ve}},[]),{setFullWidthButtonStyle:$}=await ae(async()=>{const{setFullWidthButtonStyle:ee}=await import("./styles-handler-EE_DCfH3.js");return{setFullWidthButtonStyle:ee}},__vite__mapDeps([3,1,2]));await $();const q=r(y.value,".jse-full-width"),fe=g?.fullWidthButton!==void 0?g?.fullWidthButton:!0;if(!(i.fullWidthButton!==void 0?i.fullWidthButton:fe)||q)return;E.value&&L();const we=r(y.value,".jse-menu"),Ce=Array.from(we.classList).find(ee=>ee.startsWith("svelte-"));E.value=C("button"),E.value.classList.add("jse-full-width"),N.value&&E.value.classList.add("jse-full-width--active"),E.value.classList.add("jse-button"),E.value.classList.add(Ce),E.value.innerHTML+=Ut,we.appendChild(E.value),E.value.addEventListener("click",H)},H=()=>{N.value=!N.value,N.value?E.value?.classList.add("jse-full-width--active"):(E.value?.classList.remove("jse-full-width--active"),E.value?.blur())},pe=(r,C,$)=>{if(V.value){setTimeout(()=>{V.value=!1});return}V.value=!0,ye(r,"json")&&(_("update:json",r.json),_("update:modelValue",r.json)),ye(r,"text")&&(_("update:text",r.text),_("update:jsonString",r.text),_("update:modelValue",r.text)),_("change",r,C,$),setTimeout(()=>{V.value=!1})},ue=r=>{_("error",r)},oe=r=>{Q.value=r,_("change-mode",r),_("update:mode",r)},ne=r=>{_("change-query-language",r)},se=()=>{_("focus")},e=()=>{_("blur")},c=r=>{_("update:selection",r)},a=(r,C)=>(Fe(()=>{Y()}),typeof i.onRenderMenu=="function"?i.onRenderMenu(r,C):r),p=async()=>{const r={fullWidthButton:!0,...g||{}},C=await P();return{...Dt(r,i),queryLanguages:C,queryLanguageId:W.value,onChange:pe,onError:ue,onChangeMode:oe,onChangeQueryLanguage:ne,onFocus:se,onBlur:e,onRenderMenu:a,onSelect:c}},l=T(!0),f=()=>{const r=(q={})=>q===null||typeof q>"u"||typeof q=="number"||typeof q=="bigint"||typeof q=="string"||typeof q=="boolean"?{json:q}:Array.isArray(q)?{json:[...q]}:{json:{...q}},C=(q="")=>({text:q||""}),$=i.modelValue||i.value;return $?Q.value==="text"&&typeof $=="string"?C($):r($):typeof i.json<"u"?r(i.json):typeof i.text<"u"?C(i.text):typeof i.jsonString<"u"?C(i.jsonString):C()},h=async()=>{if(!(typeof window>"u")){if(!O.value){const r=await p(),{createJSONEditor:C}=await ae(async()=>{const{createJSONEditor:q}=await import("./vanilla-jsoneditor-BHby_GXz.js");return{createJSONEditor:q}},__vite__mapDeps([0,1,2]));l.value=!1,O.value=C({target:y.value,props:r});const $=f();O.value.set($),setTimeout(()=>{V.value=!1},0)}O.value.focus()}},b=async()=>{const r=await p();O.value?.updateProps(r)},Z=()=>{if(V.value)return;const r=f(),C=O.value?.get();let $=!1;if(ye(r,"text")&&ye(C,"text"))$=r.text===C.text;else if(ye(r,"json")&&ye(C,"json"))$=JSON.stringify(r.json)===JSON.stringify(C.json);else{const q=JSON.stringify(r),fe=JSON.stringify(C);$=q===fe}$||(V.value=!0,O.value?.update(r),setTimeout(()=>{V.value=!1}))},le=()=>{O.value&&(O.value.destroy(),O.value=null),L()};Se([...Mt.map(r=>()=>i[r])],b,{deep:!0});const S=()=>{V.value&&setTimeout(()=>{V.value=!1},10)};return Se([()=>i.modelValue,()=>i.value,()=>i.json,()=>i.text,()=>i.jsonString],()=>{Z(),S()},{deep:!0}),Se(()=>i.mode,r=>{r!==Q.value&&(Q.value=r,b())}),Se(()=>D.value,async r=>{if(r){const{setDarkThemeStyle:C}=await ae(async()=>{const{setDarkThemeStyle:$}=await import("./styles-handler-EE_DCfH3.js");return{setDarkThemeStyle:$}},__vite__mapDeps([3,1,2]));await C()}},{immediate:!0}),pt(()=>{Fe(()=>{h()})}),Ot(()=>{le()}),A({$collapseAll(){Q.value==="tree"&&O.value?.collapse([],!0)},$expandAll(){Q.value==="tree"&&O.value?.expand([])},$expand(r,C){typeof r=="function"?(O.value?.expand([],r),console.warn("In new API you must pass the path before the callback!!! Backwards compatibility is deprecated and will be discontinued in the future")):O.value?.expand(r,C)},$get(){return O.value?.get()},$set(r){O.value?.set(r)},$update(r){O.value?.update(r)},$updateProps(r){O.value?.updateProps(r)},async $refresh(){await O.value?.refresh()},$focus(){O.value?.focus()},async $destroy(){await O.value?.destroy()},$patch(r){return O.value?.patch(r)},$transform(r){O.value?.transform(r)},async $scrollTo(r){await O.value?.scrollTo(r)},$findElement(r){return O.value?.findElement(r)},$acceptAutoRepair(){return O.value?.acceptAutoRepair()},$validate(){return O.value?.validate()}}),{max:N,getHeight:F,container:y,darkThemeStyle:D,fallbackSlot:l}}}),Ht=(i,A)=>{const _=i.__vccOpts||i;for(const[g,y]of A)_[g]=y;return _};function Jt(i,A,_,g,y,E){return u(),d("div",{class:K(["vue-ts-json-editor",{"vue-ts-json-editor--max-box":i.max,"jse-theme-dark":i.darkThemeStyle}]),style:qe(i.getHeight),ref:"container",onKeydown:A[0]||(A[0]=de(()=>{},["stop"]))},[i.fallbackSlot?Ct(i.$slots,"default",{key:0}):w("",!0)],38)}const me=Ht(Ft,[["render",Jt]]);me.install=()=>{console.error(`Default import not working!!! Use "import {JsonEditorPlugin} from 'vue3-ts-jsoneditor';"`)};const ft=i=>new Proxy(()=>{},{apply:async(A,_,g)=>{if(typeof window>"u")throw new Error(`${i} is not available on server side. Please use it only in client-side code.`);return(await ae(()=>import("./vanilla-jsoneditor-BHby_GXz.js"),__vite__mapDeps([0,1,2])))[i](...g)}});ft("renderValue");ft("renderJSONSchemaEnum");const lt=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kt=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(A,_,g)=>g?g.toUpperCase():_.toLowerCase()),Qt=i=>{const A=Kt(i);return A.charAt(0).toUpperCase()+A.slice(1)},Gt=(...i)=>i.filter((A,_,g)=>!!A&&A.trim()!==""&&g.indexOf(A)===_).join(" ").trim(),rt=i=>i==="";var _e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Wt=({name:i,iconNode:A,absoluteStrokeWidth:_,"absolute-stroke-width":g,strokeWidth:y,"stroke-width":E,size:N=_e.width,color:V=_e.stroke,...Q},{slots:O})=>He("svg",{..._e,...Q,width:N,height:N,stroke:V,"stroke-width":rt(_)||rt(g)||_===!0||g===!0?Number(y||E||_e["stroke-width"])*24/Number(N):y||E||_e["stroke-width"],class:Gt("lucide",Q.class,...i?[`lucide-${lt(Qt(i))}-icon`,`lucide-${lt(i)}`]:["lucide-icon"])},[...A.map(F=>He(...F)),...O.default?[O.default()]:[]]);const te=(i,A)=>(_,{slots:g,attrs:y})=>He(Wt,{...y,..._,iconNode:A,name:i},g);const Zt=te("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]);const De=te("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const it=te("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const be=te("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Xt=te("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ut=te("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Yt=te("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);const Ue=te("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);const he=te("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const ct=te("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);const en=te("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const tn=te("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),nn=xt("openapi",()=>{const i=T(null),A=T(!0),_=T(null),g=j(()=>Bt()),y=j(()=>{if(!i.value)return[];const e=[];for(const[c,a]of Object.entries(i.value.paths))if(a)for(const p of["get","post","put","patch","delete"]){const l=a[p];l&&e.push({path:c,method:p.toUpperCase(),operation:l})}return e.sort((c,a)=>c.path!==a.path?c.path.localeCompare(a.path):c.method.localeCompare(a.method))}),E=j(()=>{if(!i.value?.components?.securitySchemes)return[];const e=[];for(const[c,a]of Object.entries(i.value.components.securitySchemes))a&&typeof a=="object"&&!("$ref"in a)&&e.push({name:c,scheme:a});return e}),N=j(()=>i.value?.info?.title||"OpenAPI Studio"),V=j(()=>i.value?.info?.description||null),Q=j(()=>i.value?.info?.version||null);async function O(e){A.value=!0,_.value=null;try{const c=e||g.value,a=await fetch(c);if(!a.ok)throw new Error(`Failed to fetch OpenAPI spec: ${a.statusText}`);i.value=await a.json()}catch(c){_.value=c instanceof Error?c.message:"Failed to load OpenAPI spec"}finally{A.value=!1}}function F(e,c){const a=(typeof e=="string"?e:e.$ref).replace("#/","").split("/");let p=c;for(const l of a)if(p&&typeof p=="object"&&l in p)p=p[l];else return null;return p}function D(e){if(!e||typeof e!="object")return null;if("$ref"in e&&e.$ref){if(!i.value)return null;const c=F(e.$ref,i.value);return c&&typeof c=="object"&&"name"in c&&"in"in c?c:null}return"name"in e&&"in"in e?e:null}function U(e,c){if(!e||typeof e!="object")return null;if("$ref"in e&&e.$ref){const l=F(e.$ref,c);return!l||typeof l!="object"?null:U(l,c)}if("example"in e&&e.example!==void 0)return e.example;if("enum"in e&&e.enum&&e.enum.length>0)return e.enum[0];const a=e,p=a.type||(a.anyOf?"anyOf":a.oneOf?"oneOf":a.allOf?"allOf":"object");switch(p){case"string":if("format"in a)switch(a.format){case"date":return"2024-01-01";case"date-time":return"2024-01-01T00:00:00Z";case"email":return"example@example.com";case"uri":return"https://example.com";case"uuid":return"123e4567-e89b-12d3-a456-426614174000"}return"default"in a&&a.default!==void 0?a.default:"string";case"number":case"integer":return"default"in a&&a.default!==void 0?a.default:0;case"boolean":return"default"in a&&a.default!==void 0?a.default:!1;case"array":if("items"in e&&e.items){const f=U(e.items,c);return e.minItems&&e.minItems>0?Array(e.minItems).fill(f):[f]}return[];case"object":const l={};if("properties"in e&&e.properties)for(const[f,h]of Object.entries(e.properties))"required"in e&&e.required&&e.required.includes(f)?l[f]=U(h,c):"required"in e||(l[f]=U(h,c));return l;case"anyOf":return"anyOf"in e&&e.anyOf&&e.anyOf.length>0?U(e.anyOf[0],c):{};case"oneOf":return"oneOf"in e&&e.oneOf&&e.oneOf.length>0?U(e.oneOf[0],c):{};case"allOf":if("allOf"in e&&e.allOf){const f={};for(const h of e.allOf){const b=U(h,c);typeof b=="object"&&b!==null&&!Array.isArray(b)&&Object.assign(f,b)}return f}return{};default:return null}}function W(e,c,a=new Set,p=0,l){if(!e||typeof e!="object")return"";const f=" ".repeat(p);let h="";if("$ref"in e&&e.$ref){if(a.has(e.$ref))return`${f}${l||""} → ${e.$ref.split("/").pop()} ⚠ circular
|
|
17
|
+
`;a.add(e.$ref);const S=F(e.$ref,c);if(!S||typeof S!="object")return a.delete(e.$ref),`${f}${l||""} → ${e.$ref.split("/").pop()} (invalid)
|
|
18
|
+
`;const r=e.$ref.split("/").pop()||"Unknown";return l!==void 0?(h+=`${f}${l} → ${r}
|
|
19
|
+
`,h+=W(S,c,a,p,void 0)):(h+=`${f}→ ${r}
|
|
20
|
+
`,h+=W(S,c,a,p,void 0)),a.delete(e.$ref),h}const b=S=>{if(S.type==="array"&&S.items)return`Array<${b(S.items)}>`;if(S.type){let r=S.type;return S.format&&(r=`${S.type}(${S.format})`),S.enum&&(r=`${r} | ${S.enum.map(C=>JSON.stringify(C)).join(" | ")}`),r}return S.allOf?"allOf":S.anyOf?"anyOf":S.oneOf?"oneOf":"object"},Z=b(e),le=l&&"required"in e&&e.required&&Array.isArray(e.required)&&e.required.includes(l);if(l!==void 0?(h+=`${f}${l}${le?"*":""}: ${Z}`,"description"in e&&e.description&&(h+=` // ${e.description}`),h+=`
|
|
21
|
+
`):p===0&&"properties"in e&&(h+=`${f}{
|
|
22
|
+
`),"properties"in e&&e.properties){for(const[S,r]of Object.entries(e.properties))h+=W(r,c,a,p+1,S);p===0&&"type"in e&&e.type==="object"&&(h+=`${f}}
|
|
23
|
+
`)}if("items"in e&&e.items&&"type"in e&&e.type==="array"&&("properties"in e.items||"$ref"in e.items)&&(h+=`${f} items:
|
|
24
|
+
`,h+=W(e.items,c,a,p+2)),"allOf"in e&&e.allOf&&e.allOf.forEach((S,r)=>{h+=`${f} allOf[${r}]:
|
|
25
|
+
`,h+=W(S,c,a,p+2)}),"anyOf"in e&&e.anyOf&&e.anyOf.forEach((S,r)=>{h+=`${f} anyOf[${r}]:
|
|
26
|
+
`,h+=W(S,c,a,p+2)}),"oneOf"in e&&e.oneOf&&e.oneOf.forEach((S,r)=>{h+=`${f} oneOf[${r}]:
|
|
27
|
+
`,h+=W(S,c,a,p+2)}),l){const S=[];"pattern"in e&&e.pattern&&S.push(`pattern: ${e.pattern}`),"default"in e&&e.default!==void 0&&S.push(`default: ${JSON.stringify(e.default)}`),"minLength"in e&&e.minLength!==void 0&&S.push(`minLength: ${e.minLength}`),"maxLength"in e&&e.maxLength!==void 0&&S.push(`maxLength: ${e.maxLength}`),"minimum"in e&&e.minimum!==void 0&&S.push(`min: ${e.minimum}`),"maximum"in e&&e.maximum!==void 0&&S.push(`max: ${e.maximum}`),S.length>0&&(h+=`${f} (${S.join(", ")})
|
|
28
|
+
`)}return h}function x(e,c,a,p=new Set){if(!(!e||typeof e!="object")){if("$ref"in e&&e.$ref){if(p.has(e.$ref))return;p.add(e.$ref);const l=F(e.$ref,c);if(!l||typeof l!="object"){p.delete(e.$ref);return}const f=e.$ref.split("/").pop()||"Unknown";a.has(e.$ref)||a.set(e.$ref,{name:f,schema:l}),x(l,c,a,p),p.delete(e.$ref);return}if("properties"in e&&e.properties)for(const l of Object.values(e.properties))x(l,c,a,p);"items"in e&&e.items&&x(e.items,c,a,p),"allOf"in e&&e.allOf&&e.allOf.forEach(l=>x(l,c,a,p)),"anyOf"in e&&e.anyOf&&e.anyOf.forEach(l=>x(l,c,a,p)),"oneOf"in e&&e.oneOf&&e.oneOf.forEach(l=>x(l,c,a,p))}}function P(e,c){if(!i.value||!e||!c)return null;const a=i.value.paths[e];if(!a)return null;const p=c.toLowerCase();return a[p]||null}function L(e){if(!e||!i.value)return null;let c=e.requestBody;if(!c||typeof c!="object")return null;if("$ref"in c&&c.$ref){const p=F(c.$ref,i.value);if(!p||typeof p!="object")return null;c=p}if(!c||!("content"in c)||!c.content)return null;const a=c.content["application/json"];return!a||!a.schema?null:a.schema}function Y(e){if(!e||!i.value)return null;const c=L(e);return c?U(c,i.value):null}function H(e,c=!0){if(!e||!i.value)return null;const a=e.responses;if(!a||typeof a!="object")return null;const p=["200","201","202","204"];let l;if(c){for(const h of p)if(a&&h in a){l=a[h];break}}if(!l&&a){const h=Object.keys(a)[0];h&&(l=a[h])}if(!l||typeof l!="object")return null;if("$ref"in l&&l.$ref){const h=F(l.$ref,i.value);if(!h||typeof h!="object")return null;l=h}if(!l||typeof l!="object"||!("content"in l)||!l.content)return null;const f=l.content["application/json"];return!f||!f.schema?null:U(f.schema,i.value)}function pe(e){if(!e||!i.value)return[];const c=e.responses;if(!c||typeof c!="object")return[];const a=[];for(const[p,l]of Object.entries(c)){let f=l;if(f&&typeof f=="object"&&"$ref"in f&&f.$ref){const r=F(f.$ref,i.value);if(!r||typeof r!="object")continue;f=r}if(!f||typeof f!="object")continue;const h="description"in f&&f.description||"No description";let b=null,Z;if("content"in f&&f.content){const r=f.content["application/json"];r&&r.schema&&(Z=r.schema,b=U(r.schema,i.value))}const le=parseInt(p),S=!isNaN(le)&&le>=200&&le<300;a.push({code:p,description:h,example:b,schema:Z,isSuccess:S})}return a.sort((p,l)=>{if(p.isSuccess!==l.isSuccess)return p.isSuccess?-1:1;const f=parseInt(p.code),h=parseInt(l.code);return!isNaN(f)&&!isNaN(h)?f-h:p.code.localeCompare(l.code)})}function ue(e){if(!e||!i.value)return[];const c=new Map,a=L(e);if(a&&x(a,i.value,c),e.responses)for(const p of Object.values(e.responses)){let l=p;if(l&&typeof l=="object"&&"$ref"in l&&l.$ref){const f=F(l.$ref,i.value);f&&typeof f=="object"&&(l=f)}if(l&&typeof l=="object"&&"content"in l&&l.content){const f=l.content["application/json"];f&&f.schema&&x(f.schema,i.value,c)}}if(e.parameters)for(const p of e.parameters){const l=D(p);l&&l.schema&&x(l.schema,i.value,c)}return Array.from(c.values()).sort((p,l)=>p.name.localeCompare(l.name))}function oe(e){return i.value?!!(e.security&&e.security.length>0||i.value.security&&i.value.security.length>0):!1}function ne(e){if(!i.value?.components?.securitySchemes)return[];const c=new Set,a=[];if(e.security&&e.security.length>0){for(const p of e.security)for(const l in p)if(!c.has(l)){c.add(l);const f=E.value.find(h=>h.name===l);f&&a.push(f)}}else if(i.value.security&&i.value.security.length>0){for(const p of i.value.security)for(const l in p)if(!c.has(l)){c.add(l);const f=E.value.find(h=>h.name===l);f&&a.push(f)}}return a}function se(e){if(!e||!i.value?.components?.securitySchemes)return[];const c=new Set,a=[];if(e.security&&e.security.length>0){for(const p of e.security)for(const l in p)if(!c.has(l)){c.add(l);const f=E.value.find(h=>h.name===l);f&&a.push(f)}return a}if(i.value.security&&i.value.security.length>0){for(const p of i.value.security)for(const l in p)if(!c.has(l)){c.add(l);const f=E.value.find(h=>h.name===l);f&&a.push(f)}}return a}return{openApiSpec:i,loading:A,error:_,openApiSpecUrl:g,endpoints:y,securitySchemes:E,openApiTitle:N,openApiDescription:V,openApiVersion:Q,loadSpec:O,resolveReference:F,resolveParameter:D,generateExampleFromSchema:U,formatSchemaForDisplay:W,getSelectedEndpoint:P,getRequestBodySchema:L,getExampleFromRequestBody:Y,getExampleFromResponse:H,getAllResponseExamples:pe,getEndpointSchemaReferences:ue,endpointRequiresSecurity:oe,getRequiredSecuritySchemes:ne,getAvailableSecuritySchemes:se}}),sn={class:"openapi-test"},an={class:"test-header"},on={class:"header-content"},ln={class:"header-title-section"},rn={class:"title-row"},un={class:"logo"},cn={key:0,class:"api-version"},dn={key:0,class:"api-description"},pn={class:"header-actions"},fn=["href"],vn={href:"https://github.com/gamja-labs/openapi-studio",target:"_blank",rel:"noopener noreferrer",class:"github-link",title:"View on GitHub"},hn={key:0,class:"auth-section"},yn={key:1,class:"user-section"},mn={key:0,class:"auth-side-menu"},gn={class:"auth-menu-header"},kn={class:"auth-menu-content"},_n={class:"auth-scheme-header"},bn={style:{display:"flex","align-items":"center",gap:"0.5rem"}},Sn={class:"auth-scheme-header"},wn={style:{display:"flex","align-items":"center",gap:"0.5rem"}},Cn=["onClick"],$n={class:"auth-scheme-header"},jn={style:{display:"flex","align-items":"center",gap:"0.5rem"}},On={class:"auth-scheme-type"},xn={key:0,class:"auth-scheme-description"},Bn={class:"field-location"},qn=["value","onInput","placeholder"],An=["onClick"],En=["value","onInput"],Tn=["value","onInput"],Ln=["onClick"],Rn=["value","onInput"],In=["onClick"],Pn=["value","onInput"],Vn=["onClick"],zn=["value","onInput"],Mn=["onClick"],Nn={class:"clerk-key-card"},Dn={class:"clerk-key-description"},Un={key:0},Fn={key:1},Hn={class:"clerk-key-fields"},Jn=["disabled"],Kn={class:"test-container"},Qn={class:"sidebar-header"},Gn=["title"],Wn={class:"sidebar-content"},Zn={key:0,class:"loading"},Xn={key:1,class:"error"},Yn={key:2,class:"endpoints-groups"},es=["onClick"],ts={class:"group-name"},ns={class:"group-count"},ss={class:"group-toggle"},as={key:0,class:"group-endpoints"},os=["onClick"],ls={class:"endpoint-path"},rs={class:"endpoint-meta"},is={key:0,class:"endpoint-summary"},us={key:0,class:"endpoint-content"},cs={class:"endpoint-tester"},ds={class:"endpoint-header"},ps={class:"endpoint-title"},fs={class:"endpoint-path"},vs={key:0,class:"endpoint-info"},hs={key:0,class:"endpoint-summary-text"},ys={key:1,class:"endpoint-description"},ms={key:0,class:"security-schemes-wrapper"},gs={class:"security-schemes-section"},ks=["onClick"],_s={class:"scheme-name"},bs={class:"request-section"},Ss={key:0,class:"params-section"},ws={class:"params-list"},Cs={class:"param-name"},$s={key:0,class:"required"},js={key:1,class:"param-desc"},Os=["onUpdate:modelValue","placeholder"],xs={key:1,class:"params-section"},Bs={class:"params-list"},qs={class:"param-name"},As={key:0,class:"required"},Es={key:1,class:"param-desc"},Ts=["onUpdate:modelValue","placeholder"],Ls={key:2,class:"body-section"},Rs={class:"json-editor-wrapper"},Is=["disabled"],Ps={class:"response-section"},Vs={class:"section-header"},zs={key:0,class:"no-response"},Ms={key:1,class:"no-response"},Ns={key:2,class:"request-history-list"},Ds={class:"history-item-header"},Us={class:"history-item-title"},Fs={class:"history-url"},Hs={key:0,class:"history-auth-scheme"},Js={key:1,class:"history-auth-scheme"},Ks={class:"history-timestamp"},Qs={key:0,class:"history-status"},Gs={class:"history-curl-section"},Ws=["onClick"],Zs={class:"curl-header-left"},Xs=["onClick"],Ys={key:0,class:"curl-command"},ea={key:0,class:"history-request-body"},ta={class:"json-editor-wrapper"},na={key:1,class:"history-error"},sa={class:"error-message"},aa={key:2,class:"history-response"},oa={class:"json-editor-wrapper"},la={class:"app-footer"},ra={class:"examples-header"},ia=["title"],ua={class:"examples-content"},ca={key:0,class:"example-section"},da={class:"example-section-header"},pa={class:"view-toggle"},fa={class:"example-content"},va={key:0,class:"schema-display"},ha={class:"schema-text"},ya={key:1,class:"json-editor-wrapper"},ma={key:1,class:"example-section"},ga={class:"response-codes-list"},ka={class:"response-code-number"},_a={class:"response-code-description"},ba={class:"view-toggle"},Sa=["onClick"],wa=["onClick"],Ca={key:0,class:"example-content"},$a={key:0,class:"schema-display"},ja={class:"schema-text"},Oa={key:1,class:"json-editor-wrapper"},xa={key:1,class:"no-example"},Ba={key:2,class:"no-examples"},qa={key:3,class:"example-section"},Aa={class:"schema-references-list"},Ea=["onClick"],Ta={class:"schema-reference-toggle"},La={class:"schema-reference-name"},Ra={key:0,class:"example-content"},Ia={class:"schema-display"},Pa={class:"schema-text"},Va={key:1,class:"endpoint-tester empty"},za={class:"empty-state"},Ma={class:"welcome-content"},Na={class:"welcome-icon"},Da={class:"welcome-tips"},Ua={class:"tip-item"},Fa={class:"tip-item"},Ha={class:"tip-item"},Ja={class:"app-footer"},ce="__clerk_bearer__",Qa=dt({__name:"Main",setup(i){const A=qt(),_=At(),g=Et(),y=nn(),E=Tt();let N=g.hasClerkKey,V=null;if(N)try{V=Lt()}catch(o){console.warn("Failed to initialize Clerk auth:",o),N=!1,V=null}const Q=j(()=>{if(!V)return!1;try{return V.isSignedIn.value??!1}catch{return!1}}),O=V?.getToken?.value??(()=>Promise.resolve(null)),F=j(()=>{if(!V)return!1;try{return V.isLoaded.value??!1}catch{return!1}}),D=j(()=>y.openApiSpec),U=j(()=>y.loading),W=j(()=>y.error),x=T(null),P=T(null),L=T(null),Y=T({}),H=T(""),pe=T(null),ue=T(null),oe=T(!1),ne=T(new Set),se=T(new Set),e=T(new Map),c=T(!1),a=T({}),p=T(!1),l=T(!1),f=T(new Set),h=T([]),b=j(()=>y.getSelectedEndpoint(x.value,L.value)),Z=j(()=>y.endpoints),le=j(()=>{if(Z.value.length===0)return[];const o=new Map;for(const s of Z.value){const t=s.operation.tags||[];if(t.length>0){const v=t[0];v&&(o.has(v)||o.set(v,{name:v,endpoints:[]}),o.get(v).endpoints.push(s))}else{const v=s.path.split("/").filter(I=>I),B=v.length>0?`/${v[0]}`:"Other";o.has(B)||o.set(B,{name:B,endpoints:[]}),o.get(B).endpoints.push(s)}}return ne.value.size===0&&o.forEach((s,t)=>ne.value.add(t)),Array.from(o.values()).sort((s,t)=>s.name.localeCompare(t.name))}),S=o=>{ne.value.has(o)?ne.value.delete(o):ne.value.add(o)},r=o=>{se.value.has(o)?se.value.delete(o):se.value.add(o)},C=o=>{const s=e.value.get(o)||!1;e.value.set(o,!s)},$=o=>e.value.get(o)||!1,q=new Map;async function fe(o,s){const t=`${s}:${o}`;if(q.has(t))return q.get(t);const B=new TextEncoder().encode(t),I=await crypto.subtle.digest("SHA-256",B),G=Array.from(new Uint8Array(I)).map(ze=>ze.toString(16).padStart(2,"0")).join("").slice(0,16);return q.set(t,G),G}function we(o,s){const t=`${s}:${o}`;return q.get(t)||""}async function Ce(){const o=_.query.endpoint;if(!o)return null;for(const s of Z.value)if(await fe(s.path,s.method)===o)return{path:s.path,method:s.method};return null}pt(async()=>{E.initialize(),g.loadClerkKey(),await y.loadSpec();for(const s of Z.value)await fe(s.path,s.method);const o=await Ce();o&&(await Fe(),await Ae(o.path,o.method,!1)),Se(()=>_.query.endpoint,async s=>{if(s){const t=await Ce();t&&(x.value!==t.path||L.value!==t.method)&&await Ae(t.path,t.method,!1)}else(x.value||L.value)&&(x.value=null,L.value=null)})});const ee=(o,s,t)=>{a.value[o]||(a.value[o]={}),a.value[o][s]=t},ve=o=>{delete a.value[o]},vt=()=>{g.saveClerkKey()},ht=()=>{g.clearClerkKey()},Ae=async(o,s,t=!0)=>{if(x.value=o,L.value=s,Y.value={},H.value="",pe.value=null,ue.value=null,se.value.clear(),e.value.clear(),t){const B=we(o,s)||await fe(o,s);_.query.endpoint!==B&&await A.replace({query:{..._.query,endpoint:B}})}const v=Z.value.find(B=>B.path===o&&B.method===s);if(v?.operation.parameters)for(const B of v.operation.parameters){const I=y.resolveParameter(B);I&&(I.in==="query"||I.in==="path")&&(Y.value[I.name]="")}if(v?.operation.requestBody){let B=v.operation.requestBody;if(B&&typeof B=="object"&&"$ref"in B&&B.$ref&&D.value){const I=y.resolveReference(B.$ref,D.value);I&&typeof I=="object"&&(B=I)}if(B&&typeof B=="object"&&"content"in B&&B.content){const I=B.content["application/json"];if(I?.schema&&D.value){const ge=y.generateExampleFromSchema(I.schema,D.value);H.value=JSON.stringify(ge||{},null,2)}else H.value=JSON.stringify({},null,2)}}},yt=async()=>{if(!x.value||!L.value)return;oe.value=!0,pe.value=null,ue.value=null;const o={id:Date.now().toString()+Math.random().toString(36).substr(2,9),timestamp:new Date,method:L.value,path:x.value||"",url:"",requestBody:H.value.trim()?(()=>{try{return JSON.parse(H.value)}catch{return H.value}})():null,requestParams:{...Y.value},headers:{},response:null,responseError:null,authScheme:P.value};try{let t=`${zt()}${x.value}`;const v={},B=new URLSearchParams;for(const[z,R]of Object.entries(Y.value))if(R!==""&&R!=null){const X=Z.value.find(Be=>Be.path===x.value&&Be.method===L.value);let xe=!1;if(X?.operation.parameters)for(const Be of X.operation.parameters){const Me=y.resolveParameter(Be);if(Me&&Me.name===z){xe=Me.in==="path";break}}xe?v[z]=String(R):B.append(z,String(R))}for(const[z,R]of Object.entries(v))t=t.replace(`{${z}}`,encodeURIComponent(R));const I={"Content-Type":"application/json"};if(P.value===ce){if(Q.value){F.value||await new Promise(R=>{const X=setInterval(()=>{F.value&&(clearInterval(X),R(void 0))},100)});const z=await O();z&&(I.Authorization=`Bearer ${z}`)}}else if(P.value&&D.value?.components?.securitySchemes){const z=D.value.components.securitySchemes[P.value];if(z&&typeof z=="object"&&!("$ref"in z)){const R=a.value[P.value];if(z.type==="apiKey"){const X=z;R?.value&&(X.in==="header"?I[X.name]=R.value:X.in==="query"?B.append(X.name,R.value):X.in)}else if(z.type==="http"){const X=z;if(X.scheme==="basic"){if(R?.username&&R?.password){const xe=`${R.username}:${R.password}`;I.Authorization=`Basic ${btoa(xe)}`}}else X.scheme==="bearer"&&R?.token&&(I.Authorization=`Bearer ${R.token}`)}else z.type==="oauth2"?R?.accessToken&&(I.Authorization=`Bearer ${R.accessToken}`):z.type==="openIdConnect"&&R?.idToken&&(I.Authorization=`Bearer ${R.idToken}`)}}B.toString()&&(t+=`?${B.toString()}`),o.url=t,o.headers={...I};const ge={method:L.value,headers:I};if(["POST","PUT","PATCH"].includes(L.value)&&H.value.trim())try{ge.body=JSON.stringify(JSON.parse(H.value))}catch{const R="Invalid JSON in request body";ue.value=R,o.responseError=R,h.value.unshift(o),oe.value=!1;return}const G=await fetch(t,ge),ze=G.headers.get("content-type");let Oe;if(ze?.includes("application/json"))Oe={status:G.status,statusText:G.statusText,headers:Object.fromEntries(G.headers.entries()),body:await G.json()};else{const z=await G.text();Oe={status:G.status,statusText:G.statusText,headers:Object.fromEntries(G.headers.entries()),body:z}}pe.value=Oe,o.response=Oe,o.status=G.status,o.statusText=G.statusText}catch(s){const t=s instanceof Error?s.message:"Request failed";ue.value=t,o.responseError=t}finally{oe.value=!1,h.value.unshift(o)}},Je=o=>{const s=["curl"];o.method!=="GET"&&s.push(`-X ${o.method}`);for(const[t,v]of Object.entries(o.headers||{})){const B=v.replace(/"/g,'\\"');s.push(`-H "${t}: ${B}"`)}if(["POST","PUT","PATCH"].includes(o.method)&&o.requestBody){const v=(typeof o.requestBody=="string"?o.requestBody:JSON.stringify(o.requestBody,null,2)).replace(/'/g,"'\\''").replace(/\n/g,"\\n");s.push(`-d '${v}'`)}return s.push(`"${o.url}"`),s.join(` \\
|
|
29
|
+
`)},mt=async o=>{const s=Je(o);try{await navigator.clipboard.writeText(s)}catch(t){console.error("Failed to copy to clipboard:",t)}},Ee=o=>({GET:"#61affe",POST:"#49cc90",PUT:"#fca130",PATCH:"#50e3c2",DELETE:"#f93e3e"})[o]||"#999",Ke=j(()=>!b.value||!b.value.parameters?[]:b.value.parameters.map(y.resolveParameter).filter(o=>o!==null&&o.in==="path")),Qe=j(()=>!b.value||!b.value.parameters?[]:b.value.parameters.map(y.resolveParameter).filter(o=>o!==null&&o.in==="query")),Ge=j({get:()=>{if(!H.value.trim())return{};try{return JSON.parse(H.value)}catch{return{}}},set:o=>{try{H.value=JSON.stringify(o,null,2)}catch{}}}),Te=j(()=>b.value?y.getExampleFromRequestBody(b.value):null),Le=j(()=>b.value?y.getRequestBodySchema(b.value):null),We=j(()=>!Le.value||!D.value?null:y.formatSchemaForDisplay(Le.value,D.value)),gt=o=>!o||!D.value?null:y.formatSchemaForDisplay(o,D.value),Re=j(()=>b.value?y.getAllResponseExamples(b.value):[]),Ze=j(()=>b.value?y.getEndpointSchemaReferences(b.value):[]),$e=j(()=>y.securitySchemes),Xe=o=>y.endpointRequiresSecurity(o),Ye=j(()=>b.value?y.getAvailableSecuritySchemes(b.value):[]),kt=j(()=>(b.value?Ye.value:$e.value).some(s=>s.scheme.type==="http"&&s.scheme.scheme==="bearer")),et=j(()=>{const o=b.value?[...Ye.value]:[...$e.value];return kt.value&&N&&(o.some(t=>t.name===ce)||o.push({name:ce,scheme:{type:"http",scheme:"bearer",description:"Clerk Bearer Authentication"}})),o}),_t=j(()=>y.openApiTitle),tt=j(()=>y.openApiDescription),nt=j(()=>y.openApiVersion),Ie=j(()=>g.hasSavedClerkKey),Pe=j(()=>g.isClerkKeyReadOnly),bt=j(()=>g.clerkKeySource),st=j(()=>{const o=bt.value;return o==="config.json"?`Key loaded from ${Rt()}`:o==="env"?"Key loaded from environment variable":null}),St=j(()=>{if(!P.value)return"Anonymous";if(P.value===ce)return"Clerk Bearer";const o=$e.value.find(s=>s.name===P.value);return o?o.name:"Anonymous"}),je=o=>{o===null||P.value===o?P.value=null:P.value=o},Ve=j(()=>!x.value||!L.value?[]:h.value.filter(o=>o.path===x.value&&o.method===L.value)),wt=()=>{!x.value||!L.value||(h.value=h.value.filter(o=>!(o.path===x.value&&o.method===L.value)))};return(o,s)=>(u(),d("div",sn,[n("header",an,[n("div",on,[n("div",ln,[n("div",rn,[n("h1",un,m(_t.value),1),nt.value?(u(),d("div",cn,"v"+m(nt.value),1)):w("",!0)]),tt.value?(u(),d("p",dn,m(tt.value),1)):w("",!0)]),n("div",pn,[n("a",{href:k(y).openApiSpecUrl,target:"_blank",rel:"noopener noreferrer",class:"openapi-spec-link",title:"View OpenAPI Spec JSON"},[M(k(ut),{size:20})],8,fn),n("a",vn,[M(k(Yt),{size:20})]),n("button",{onClick:s[0]||(s[0]=t=>c.value=!c.value),class:K(["auth-menu-toggle",{active:c.value,"has-selection":P.value}]),title:"Security Scheme"},[P.value?(u(),J(k(he),{key:1,size:16})):(u(),J(k(Ue),{key:0,size:16})),n("span",null,m(P.value?St.value:"Security"),1)],2),k(N)?(u(),d("div",hn,[Q.value?(u(),d("div",yn,[M(k(Vt))])):(u(),J(k(Pt),{key:0,mode:"modal"},{default:It(()=>[...s[15]||(s[15]=[n("button",{class:"sign-in-btn"},"Sign In",-1)])]),_:1}))])):w("",!0)])])]),c.value?(u(),d("aside",mn,[n("div",gn,[s[16]||(s[16]=n("h2",null,"Security Scheme",-1)),n("button",{onClick:s[1]||(s[1]=t=>c.value=!1),class:"close-auth-menu",title:"Close"},[M(k(en),{size:20})])]),n("div",kn,[n("div",{class:K(["auth-scheme anonymous-option",{selected:P.value===null}]),onClick:s[2]||(s[2]=t=>je(null))},[n("div",_n,[n("div",bn,[M(k(Ue),{size:18}),s[17]||(s[17]=n("h3",null,"Anonymous",-1))]),s[18]||(s[18]=n("span",{class:"auth-scheme-type"},"NONE",-1))]),s[19]||(s[19]=n("div",{class:"auth-scheme-description"}," Make requests without authentication ",-1))],2),k(N)?(u(),d("div",{key:0,class:K(["auth-scheme clerk-bearer-option",{selected:P.value===ce}]),onClick:s[3]||(s[3]=t=>je(ce))},[n("div",Sn,[n("div",wn,[M(k(he),{size:18}),s[20]||(s[20]=n("h3",null,"Clerk Bearer",-1))]),s[21]||(s[21]=n("span",{class:"auth-scheme-type"},"CLERK",-1))]),s[22]||(s[22]=n("div",{class:"auth-scheme-description"}," Use Clerk authentication token for bearer authentication ",-1))],2)):w("",!0),(u(!0),d(re,null,ie($e.value,t=>(u(),d("div",{key:t.name,class:K(["auth-scheme",{selected:P.value===t.name}]),onClick:v=>je(t.name)},[n("div",$n,[n("div",jn,[M(k(he),{size:18}),n("h3",null,m(t.name),1)]),n("span",On,m(t.scheme.type),1)]),t.scheme.description?(u(),d("div",xn,m(t.scheme.description),1)):w("",!0),t.scheme.type==="apiKey"?(u(),d("div",{key:1,class:"auth-scheme-fields",onClick:s[4]||(s[4]=de(()=>{},["stop"]))},[n("label",null,[n("span",null,m(t.scheme.name),1),n("span",Bn,"("+m(t.scheme.in)+")",1),n("input",{type:"text",value:a.value[t.name]?.value||"",onInput:v=>ee(t.name,"value",v.target.value),placeholder:`Enter ${t.scheme.name}`,class:"auth-input"},null,40,qn)]),a.value[t.name]?.value?(u(),d("button",{key:0,onClick:v=>ve(t.name),class:"clear-credential-btn"}," Clear ",8,An)):w("",!0)])):t.scheme.type==="http"&&t.scheme.scheme==="basic"?(u(),d("div",{key:2,class:"auth-scheme-fields",onClick:s[5]||(s[5]=de(()=>{},["stop"]))},[n("label",null,[s[23]||(s[23]=n("span",null,"Username",-1)),n("input",{type:"text",value:a.value[t.name]?.username||"",onInput:v=>ee(t.name,"username",v.target.value),placeholder:"Enter username",class:"auth-input"},null,40,En)]),n("label",null,[s[24]||(s[24]=n("span",null,"Password",-1)),n("input",{type:"text",value:a.value[t.name]?.password||"",onInput:v=>ee(t.name,"password",v.target.value),placeholder:"Enter password",class:"auth-input"},null,40,Tn)]),a.value[t.name]?.username||a.value[t.name]?.password?(u(),d("button",{key:0,onClick:v=>ve(t.name),class:"clear-credential-btn"}," Clear ",8,Ln)):w("",!0)])):t.scheme.type==="http"&&t.scheme.scheme==="bearer"?(u(),d("div",{key:3,class:"auth-scheme-fields",onClick:s[6]||(s[6]=de(()=>{},["stop"]))},[n("label",null,[s[25]||(s[25]=n("span",null,"Bearer Token",-1)),n("input",{type:"text",value:a.value[t.name]?.token||"",onInput:v=>ee(t.name,"token",v.target.value),placeholder:"Enter bearer token",class:"auth-input"},null,40,Rn)]),a.value[t.name]?.token?(u(),d("button",{key:0,onClick:v=>ve(t.name),class:"clear-credential-btn"}," Clear ",8,In)):w("",!0)])):t.scheme.type==="oauth2"?(u(),d("div",{key:4,class:"auth-scheme-fields",onClick:s[7]||(s[7]=de(()=>{},["stop"]))},[n("label",null,[s[26]||(s[26]=n("span",null,"Access Token",-1)),n("input",{type:"text",value:a.value[t.name]?.accessToken||"",onInput:v=>ee(t.name,"accessToken",v.target.value),placeholder:"Enter OAuth2 access token",class:"auth-input"},null,40,Pn)]),a.value[t.name]?.accessToken?(u(),d("button",{key:0,onClick:v=>ve(t.name),class:"clear-credential-btn"}," Clear ",8,Vn)):w("",!0)])):t.scheme.type==="openIdConnect"?(u(),d("div",{key:5,class:"auth-scheme-fields",onClick:s[8]||(s[8]=de(()=>{},["stop"]))},[n("label",null,[s[27]||(s[27]=n("span",null,"ID Token",-1)),n("input",{type:"text",value:a.value[t.name]?.idToken||"",onInput:v=>ee(t.name,"idToken",v.target.value),placeholder:"Enter OpenID Connect ID token",class:"auth-input"},null,40,zn)]),a.value[t.name]?.idToken?(u(),d("button",{key:0,onClick:v=>ve(t.name),class:"clear-credential-btn"}," Clear ",8,Mn)):w("",!0)])):w("",!0)],10,Cn))),128)),n("div",Nn,[s[29]||(s[29]=n("div",{class:"clerk-key-header"},[n("h3",null,"Clerk Publishable Key")],-1)),n("div",Dn,[st.value?(u(),d("span",Un,m(st.value),1)):(u(),d("span",Fn," Enter your Clerk publishable key to enable authentication. This will be stored locally in your browser. "))]),n("div",Hn,[n("label",null,[s[28]||(s[28]=n("span",null,"Publishable Key",-1)),ke(n("input",{"onUpdate:modelValue":s[9]||(s[9]=t=>k(g).clerkKey=t),type:"text",placeholder:"pk_test_...",class:"clerk-key-input",disabled:Ie.value||Pe.value},null,8,Jn),[[Ne,k(g).clerkKey]])]),!Ie.value&&!Pe.value?(u(),d("button",{key:0,onClick:vt,class:"save-button"}," Save and reload ")):Ie.value&&!Pe.value?(u(),d("button",{key:1,onClick:ht,class:"save-button"}," Clear and reload ")):w("",!0)])])])])):w("",!0),n("div",Kn,[n("aside",{class:K(["endpoints-sidebar",{collapsed:p.value}])},[n("div",Qn,[s[30]||(s[30]=n("h2",null,"Endpoints",-1)),n("button",{onClick:s[10]||(s[10]=t=>p.value=!p.value),class:"sidebar-toggle",title:p.value?"Expand sidebar":"Collapse sidebar"},[p.value?(u(),J(k(be),{key:0,size:16})):(u(),J(k(it),{key:1,size:16}))],8,Gn)]),ke(n("div",Wn,[U.value?(u(),d("div",Zn,"Loading OpenAPI spec...")):W.value?(u(),d("div",Xn,m(W.value),1)):(u(),d("div",Yn,[(u(!0),d(re,null,ie(le.value,t=>(u(),d("div",{key:t.name,class:"endpoint-group"},[n("div",{class:"group-header",onClick:v=>S(t.name)},[n("span",ts,m(t.name),1),n("span",ns,"("+m(t.endpoints.length)+")",1),n("span",ss,[ne.value.has(t.name)?(u(),J(k(De),{key:0,size:14})):(u(),J(k(be),{key:1,size:14}))])],8,es),ne.value.has(t.name)?(u(),d("div",as,[(u(!0),d(re,null,ie(t.endpoints,v=>(u(),d("div",{key:`${v.method}-${v.path}`,class:K(["endpoint-item",{active:x.value===v.path&&L.value===v.method}]),onClick:de(B=>Ae(v.path,v.method),["stop"])},[n("span",{class:"method-badge",style:qe({backgroundColor:Ee(v.method)})},m(v.method),5),n("span",ls,m(v.path),1),n("div",rs,[v.operation.summary?(u(),d("span",is,m(v.operation.summary),1)):w("",!0),Xe(v.operation)?(u(),J(k(he),{key:1,size:14,class:"security-indicator",title:"Requires authentication"})):w("",!0)])],10,os))),128))])):w("",!0)]))),128))]))],512),[[at,!p.value]])],2),b.value?(u(),d("div",us,[n("main",cs,[n("div",ds,[n("div",ps,[n("span",{class:"method-badge large",style:qe({backgroundColor:Ee(L.value||"")})},m(L.value),5),n("span",fs,m(x.value),1),Xe(b.value)?(u(),J(k(he),{key:0,size:18,class:"security-indicator-large",title:"Requires authentication"})):w("",!0)]),b.value.summary||b.value.description?(u(),d("div",vs,[b.value.summary?(u(),d("p",hs,m(b.value.summary),1)):w("",!0),b.value.description?(u(),d("p",ys,m(b.value.description),1)):w("",!0)])):w("",!0)]),et.value.length>0?(u(),d("div",ms,[s[31]||(s[31]=n("h4",{class:"security-schemes-title"},"Security Schemes",-1)),n("div",gs,[(u(!0),d(re,null,ie(et.value,t=>(u(),d("div",{key:t.name,class:K(["security-scheme-card",{selected:P.value===t.name}]),onClick:v=>je(t.name)},[M(k(he),{size:12,class:"security-card-icon"}),n("span",_s,m(t.name===ce?"Clerk Bearer":t.name),1)],10,ks))),128))])])):w("",!0),n("div",bs,[s[35]||(s[35]=n("h3",null,"Request",-1)),Ke.value.length>0?(u(),d("div",Ss,[s[32]||(s[32]=n("h4",null,"Path Parameters",-1)),n("dl",ws,[(u(!0),d(re,null,ie(Ke.value,t=>(u(),d("div",{key:t.name,class:"param-item"},[n("dt",null,[n("span",Cs,m(t.name),1),t.required?(u(),d("span",$s,"*")):w("",!0),t.description?(u(),d("span",js," - "+m(t.description),1)):w("",!0)]),n("dd",null,[ke(n("input",{"onUpdate:modelValue":v=>Y.value[t.name]=v,type:"text",placeholder:t.schema&&"default"in t.schema?String(t.schema.default):""},null,8,Os),[[Ne,Y.value[t.name]]])])]))),128))])])):w("",!0),Qe.value.length>0?(u(),d("div",xs,[s[33]||(s[33]=n("h4",null,"Query Parameters",-1)),n("dl",Bs,[(u(!0),d(re,null,ie(Qe.value,t=>(u(),d("div",{key:t.name,class:"param-item"},[n("dt",null,[n("span",qs,m(t.name),1),t.required?(u(),d("span",As,"*")):w("",!0),t.description?(u(),d("span",Es," - "+m(t.description),1)):w("",!0)]),n("dd",null,[ke(n("input",{"onUpdate:modelValue":v=>Y.value[t.name]=v,type:"text",placeholder:t.schema&&"default"in t.schema?String(t.schema.default):""},null,8,Ts),[[Ne,Y.value[t.name]]])])]))),128))])])):w("",!0),b.value.requestBody?(u(),d("div",Ls,[s[34]||(s[34]=n("h4",null,"Request Body",-1)),n("div",Rs,[M(k(me),{modelValue:Ge.value,"onUpdate:modelValue":s[11]||(s[11]=t=>Ge.value=t),mode:"text",mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["modelValue"])])])):w("",!0),n("button",{onClick:yt,class:"send-button",disabled:oe.value},[M(k(ct),{size:16,class:"send-button-icon"}),n("span",null,m(oe.value?"Sending...":"Send Request"),1)],8,Is)]),n("div",Ps,[n("div",Vs,[s[36]||(s[36]=n("h3",null,"Request History",-1)),Ve.value.length>0?(u(),d("button",{key:0,onClick:wt,class:"clear-history-btn"}," Clear History ")):w("",!0)]),!x.value||!L.value?(u(),d("div",zs," Select an endpoint to view request history. ")):Ve.value.length===0?(u(),d("div",Ms,' No requests sent yet. Click "Send Request" to test the endpoint. ')):(u(),d("div",Ns,[(u(!0),d(re,null,ie(Ve.value,t=>(u(),d("div",{key:t.id,class:"history-item"},[n("div",Ds,[n("div",Us,[n("span",{class:"method-badge small",style:qe({backgroundColor:Ee(t.method)})},m(t.method),5),n("span",Fs,m(t.url),1),t.authScheme?(u(),d("span",Hs,[M(k(he),{size:12}),ot(" "+m(t.authScheme===ce?"Clerk Bearer":t.authScheme),1)])):(u(),d("span",Js,[M(k(Ue),{size:12}),s[37]||(s[37]=ot(" Anonymous ",-1))])),n("span",Ks,m(new Date(t.timestamp).toLocaleTimeString()),1)]),t.status?(u(),d("div",Qs,[n("span",{class:K(["status-code",{success:t.status>=200&&t.status<300,error:t.status>=400}])},m(t.status)+" "+m(t.statusText),3)])):w("",!0)]),n("div",Gs,[n("div",{class:"curl-header",onClick:v=>f.value.has(t.id)?f.value.delete(t.id):f.value.add(t.id)},[n("div",Zs,[f.value.has(t.id)?(u(),J(k(De),{key:0,size:16,class:"curl-toggle-icon"})):(u(),J(k(be),{key:1,size:16,class:"curl-toggle-icon"})),s[38]||(s[38]=n("h5",null,"cURL Command",-1))]),n("button",{onClick:de(v=>mt(t),["stop"]),class:"copy-curl-btn",title:"Copy cURL command"},[M(k(Xt),{size:16}),s[39]||(s[39]=n("span",null,"Copy",-1))],8,Xs)],8,Ws),f.value.has(t.id)?(u(),d("div",Ys,[n("pre",null,m(Je(t)),1)])):w("",!0)]),t.requestBody?(u(),d("div",ea,[s[40]||(s[40]=n("h5",null,"Request Body",-1)),n("div",ta,[M(k(me),{"model-value":t.requestBody,mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])])])):w("",!0),t.responseError?(u(),d("div",na,[s[41]||(s[41]=n("h5",null,"Error",-1)),n("div",sa,m(t.responseError),1)])):t.response?(u(),d("div",aa,[s[42]||(s[42]=n("h5",null,"Response",-1)),n("div",oa,[M(k(me),{"model-value":(()=>{if(typeof t.response.body=="string")try{return JSON.parse(t.response.body)}catch{return{text:t.response.body}}return t.response.body||{}})(),mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])])])):w("",!0)]))),128))]))]),n("footer",la,[n("p",null,"© "+m(new Date().getFullYear())+" Gamja Labs",1)])]),n("aside",{class:K(["examples-sidebar",{collapsed:l.value}])},[n("div",ra,[s[43]||(s[43]=n("h3",null,"Examples",-1)),n("button",{onClick:s[12]||(s[12]=t=>l.value=!l.value),class:"examples-toggle",title:l.value?"Expand examples":"Collapse examples"},[l.value?(u(),J(k(it),{key:0,size:16})):(u(),J(k(be),{key:1,size:16}))],8,ia)]),ke(n("div",ua,[Te.value||Le.value?(u(),d("div",ca,[n("div",da,[n("h4",null,m($("request-body")?"Request Body Schema":"Example Request Body"),1),n("div",pa,[n("button",{onClick:s[13]||(s[13]=t=>C("request-body")),class:K([{active:!$("request-body")},"toggle-btn"])}," Example ",2),n("button",{onClick:s[14]||(s[14]=t=>C("request-body")),class:K([{active:$("request-body")},"toggle-btn"])}," Schema ",2)])]),n("div",fa,[$("request-body")&&We.value?(u(),d("div",va,[n("pre",ha,m(We.value),1)])):$("request-body")?w("",!0):(u(),d("div",ya,[M(k(me),{"model-value":Te.value,mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])]))])])):w("",!0),Re.value.length>0?(u(),d("div",ma,[s[44]||(s[44]=n("h4",null,"Response Codes",-1)),n("div",ga,[(u(!0),d(re,null,ie(Re.value,t=>(u(),d("div",{key:t.code,class:"response-code-item"},[n("div",{class:K(["response-code-header",{success:t.isSuccess,error:!t.isSuccess}])},[n("span",ka,m(t.code),1),n("span",_a,m(t.description),1),n("div",ba,[n("button",{onClick:v=>C(`response-${t.code}`),class:K([{active:!$(`response-${t.code}`)},"toggle-btn small"])}," Example ",10,Sa),n("button",{onClick:v=>C(`response-${t.code}`),class:K([{active:$(`response-${t.code}`)},"toggle-btn small"])}," Schema ",10,wa)])],2),($(`response-${t.code}`)?t.schema:t.example)?(u(),d("div",Ca,[$(`response-${t.code}`)&&t.schema?(u(),d("div",$a,[n("pre",ja,m(gt(t.schema)),1)])):$(`response-${t.code}`)?w("",!0):(u(),d("div",Oa,[M(k(me),{"model-value":t.example,mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])]))])):(u(),d("div",xa," No "+m($(`response-${t.code}`)?"schema":"example")+" available ",1))]))),128))])])):w("",!0),!Te.value&&Re.value.length===0?(u(),d("div",Ba," No examples available for this endpoint. ")):w("",!0),Ze.value.length>0?(u(),d("div",qa,[s[45]||(s[45]=n("h4",null,"Referenced Schemas",-1)),n("div",Aa,[(u(!0),d(re,null,ie(Ze.value,t=>(u(),d("div",{key:t.name,class:"schema-reference-item"},[n("div",{class:"schema-reference-header",onClick:v=>r(t.name)},[n("span",Ta,[se.value.has(t.name)?(u(),J(k(De),{key:0,size:14})):(u(),J(k(be),{key:1,size:14}))]),n("span",La,m(t.name),1)],8,Ea),se.value.has(t.name)?(u(),d("div",Ra,[n("div",Ia,[n("pre",Pa,m(k(y).formatSchemaForDisplay(t.schema,D.value)),1)])])):w("",!0)]))),128))])])):w("",!0)],512),[[at,!l.value]])],2)])):(u(),d("main",Va,[n("div",za,[n("div",Ma,[n("div",Na,[M(k(ct),{size:64})]),s[49]||(s[49]=n("h1",{class:"welcome-title"},"Welcome to OpenAPI Studio",-1)),s[50]||(s[50]=n("p",{class:"welcome-description"}," Select an endpoint from the sidebar to start testing your API endpoints. ",-1)),n("div",Da,[n("div",Ua,[M(k(ut),{size:20,class:"tip-icon"}),s[46]||(s[46]=n("span",null,"Browse available endpoints in the sidebar",-1))]),n("div",Fa,[M(k(tn),{size:20,class:"tip-icon"}),s[47]||(s[47]=n("span",null,"Test requests with custom parameters",-1))]),n("div",Ha,[M(k(Zt),{size:20,class:"tip-icon"}),s[48]||(s[48]=n("span",null,"View responses and schema documentation",-1))])])])]),n("footer",Ja,[n("p",null,"© "+m(new Date().getFullYear())+" Gamja Labs",1)])]))])]))}});export{Qa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.not-found-container[data-v-4d21c9c8]{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem;background-color:hsl(var(--background));background-image:linear-gradient(hsl(var(--border)/.3) 1px,transparent 1px),linear-gradient(90deg,hsl(var(--border)/.3) 1px,transparent 1px);background-size:50px 50px;background-position:0 0,0 0}.not-found-content[data-v-4d21c9c8]{text-align:center;max-width:600px}.error-code[data-v-4d21c9c8]{font-size:8rem;font-weight:900;line-height:1;color:hsl(var(--muted-foreground));margin-bottom:1rem}.error-title[data-v-4d21c9c8]{font-size:2rem;font-weight:700;margin-bottom:1rem;color:hsl(var(--foreground))}.error-description[data-v-4d21c9c8]{font-size:1.125rem;color:hsl(var(--muted-foreground));margin-bottom:2rem}.error-actions[data-v-4d21c9c8]{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}.btn[data-v-4d21c9c8]{padding:.75rem 1.5rem;border-radius:.5rem;font-weight:500;cursor:pointer;transition:all .2s;border:1px solid transparent}.btn-primary[data-v-4d21c9c8]{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground))}.btn-primary[data-v-4d21c9c8]:hover{background-color:hsl(var(--primary)/.9)}.btn-outline[data-v-4d21c9c8]{background-color:transparent;color:hsl(var(--foreground));border-color:hsl(var(--border))}.btn-outline[data-v-4d21c9c8]:hover{background-color:hsl(var(--muted))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as n,u as r,c as a,z as e,o as d,M as c}from"./app-CQCir06q.js";const i={class:"not-found-container"},l=n({__name:"NotFound",setup(u){const t=r(),s=()=>{t.replace("/")};return(p,o)=>(d(),a("div",i,[e("div",{class:"not-found-content"},[o[0]||(o[0]=e("div",{class:"error-code"},"404",-1)),o[1]||(o[1]=e("h1",{class:"error-title"},"Page Not Found",-1)),o[2]||(o[2]=e("p",{class:"error-description"}," The page you're looking for doesn't exist or has been moved. ",-1)),e("div",{class:"error-actions"},[e("button",{class:"btn btn-primary",onClick:s}," Go to Home ")])])]))}}),f=c(l,[["__scopeId","data-v-4d21c9c8"]]);export{f as default};
|