🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

swagger-ui-svelte

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-ui-svelte - npm Package Compare versions

Comparing version

to
0.0.4

698

dist/index.js

@@ -282,3 +282,3 @@ (function (global, factory) {

const child_ctx = ctx.slice();
child_ctx[10] = list[i];
child_ctx[11] = list[i];
return child_ctx;

@@ -289,10 +289,28 @@ }

const child_ctx = ctx.slice();
child_ctx[13] = list[i];
child_ctx[14] = list[i];
return child_ctx;
}
function get_each_context_6(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[20] = list[i];
return child_ctx;
}
function get_each_context_5(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[20] = list[i];
return child_ctx;
}
function get_each_context_4(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[17] = list[i];
return child_ctx;
}
function get_each_context_1(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[7] = list[i];
child_ctx[9] = i;
child_ctx[8] = list[i];
child_ctx[10] = i;
return child_ctx;

@@ -303,8 +321,8 @@ }

const child_ctx = ctx.slice();
child_ctx[4] = list[i];
child_ctx[6] = i;
child_ctx[5] = list[i];
child_ctx[7] = i;
return child_ctx;
}
// (19:6) {#if swagger}
// (23:6) {#if swagger}
function create_if_block(ctx) {

@@ -315,3 +333,2 @@ let h1;

let t1;
let t2;
let each_1_anchor;

@@ -329,4 +346,3 @@ let each_value = Object.entries(/*swagger*/ ctx[1].paths);

t0 = text(t0_value);
t1 = text("!");
t2 = space();
t1 = space();

@@ -343,4 +359,3 @@ for (let i = 0; i < each_blocks.length; i += 1) {

append(h1, t0);
append(h1, t1);
insert(target, t2, anchor);
insert(target, t1, anchor);

@@ -356,3 +371,3 @@ for (let i = 0; i < each_blocks.length; i += 1) {

if (dirty & /*Object, swagger, active*/ 3) {
if (dirty & /*Object, swagger, active, getSchema*/ 7) {
each_value = Object.entries(/*swagger*/ ctx[1].paths);

@@ -382,3 +397,3 @@ let i;

if (detaching) detach(h1);
if (detaching) detach(t2);
if (detaching) detach(t1);
destroy_each(each_blocks, detaching);

@@ -390,5 +405,193 @@ if (detaching) detach(each_1_anchor);

// (29:20) {#if method[1].summary}
// (33:20) {#if method[1].summary}
function create_if_block_10(ctx) {
let t_value = /*method*/ ctx[8][1].summary + "";
let t;
return {
c() {
t = text(t_value);
},
m(target, anchor) {
insert(target, t, anchor);
},
p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*method*/ ctx[8][1].summary + "")) set_data(t, t_value);
},
d(detaching) {
if (detaching) detach(t);
}
};
}
// (39:18) {#if method[1].requestBody && method[1].requestBody.content}
function create_if_block_6(ctx) {
let t_value = /*method*/ ctx[7][1].summary + "";
let each_1_anchor;
let each_value_4 = Object.entries(/*method*/ ctx[8][1].requestBody.content);
let each_blocks = [];
for (let i = 0; i < each_value_4.length; i += 1) {
each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i));
}
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
}
insert(target, each_1_anchor, anchor);
},
p(ctx, dirty) {
if (dirty & /*Object, getSchema, swagger*/ 6) {
each_value_4 = Object.entries(/*method*/ ctx[8][1].requestBody.content);
let i;
for (i = 0; i < each_value_4.length; i += 1) {
const child_ctx = get_each_context_4(ctx, each_value_4, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
} else {
each_blocks[i] = create_each_block_4(child_ctx);
each_blocks[i].c();
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value_4.length;
}
},
d(detaching) {
destroy_each(each_blocks, detaching);
if (detaching) detach(each_1_anchor);
}
};
}
// (71:26) {:else}
function create_else_block_3(ctx) {
let each_1_anchor;
let each_value_6 = Object.entries(/*requestBody*/ ctx[17][1]["schema"]["properties"]);
let each_blocks = [];
for (let i = 0; i < each_value_6.length; i += 1) {
each_blocks[i] = create_each_block_6(get_each_context_6(ctx, each_value_6, i));
}
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
}
insert(target, each_1_anchor, anchor);
},
p(ctx, dirty) {
if (dirty & /*Object, swagger*/ 2) {
each_value_6 = Object.entries(/*requestBody*/ ctx[17][1]["schema"]["properties"]);
let i;
for (i = 0; i < each_value_6.length; i += 1) {
const child_ctx = get_each_context_6(ctx, each_value_6, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
} else {
each_blocks[i] = create_each_block_6(child_ctx);
each_blocks[i].c();
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value_6.length;
}
},
d(detaching) {
destroy_each(each_blocks, detaching);
if (detaching) detach(each_1_anchor);
}
};
}
// (53:26) {#if '$ref' in requestBody[1]["schema"]}
function create_if_block_7(ctx) {
let each_1_anchor;
let each_value_5 = Object.entries(/*getSchema*/ ctx[2](/*requestBody*/ ctx[17][1]["schema"]["$ref"]).properties);
let each_blocks = [];
for (let i = 0; i < each_value_5.length; i += 1) {
each_blocks[i] = create_each_block_5(get_each_context_5(ctx, each_value_5, i));
}
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
}
insert(target, each_1_anchor, anchor);
},
p(ctx, dirty) {
if (dirty & /*Object, getSchema, swagger*/ 6) {
each_value_5 = Object.entries(/*getSchema*/ ctx[2](/*requestBody*/ ctx[17][1]["schema"]["$ref"]).properties);
let i;
for (i = 0; i < each_value_5.length; i += 1) {
const child_ctx = get_each_context_5(ctx, each_value_5, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
} else {
each_blocks[i] = create_each_block_5(child_ctx);
each_blocks[i].c();
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value_5.length;
}
},
d(detaching) {
destroy_each(each_blocks, detaching);
if (detaching) detach(each_1_anchor);
}
};
}
// (83:32) {:else}
function create_else_block_4(ctx) {
let t;

@@ -398,2 +601,21 @@

c() {
t = text("String");
},
m(target, anchor) {
insert(target, t, anchor);
},
p: noop,
d(detaching) {
if (detaching) detach(t);
}
};
}
// (81:32) {#if property[1].type}
function create_if_block_9(ctx) {
let t_value = /*property*/ ctx[20][1].type + "";
let t;
return {
c() {
t = text(t_value);

@@ -405,3 +627,3 @@ },

p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*method*/ ctx[7][1].summary + "")) set_data(t, t_value);
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*property*/ ctx[20][1].type + "")) set_data(t, t_value);
},

@@ -414,7 +636,271 @@ d(detaching) {

// (35:18) {#if method[1].parameters}
// (72:26) {#each Object.entries(requestBody[1]["schema"]["properties"]) as property}
function create_each_block_6(ctx) {
let tr;
let td0;
let span;
let t0_value = /*property*/ ctx[20][0] + "";
let t0;
let t1;
let td1;
let raw_value = /*property*/ ctx[20][1].description + "";
let t2;
let td2;
let t3;
function select_block_type_2(ctx, dirty) {
if (/*property*/ ctx[20][1].type) return create_if_block_9;
return create_else_block_4;
}
let current_block_type = select_block_type_2(ctx);
let if_block = current_block_type(ctx);
return {
c() {
tr = element("tr");
td0 = element("td");
span = element("span");
t0 = text(t0_value);
t1 = space();
td1 = element("td");
t2 = space();
td2 = element("td");
if_block.c();
t3 = space();
},
m(target, anchor) {
insert(target, tr, anchor);
append(tr, td0);
append(td0, span);
append(span, t0);
append(tr, t1);
append(tr, td1);
td1.innerHTML = raw_value;
append(tr, t2);
append(tr, td2);
if_block.m(td2, null);
append(tr, t3);
},
p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*property*/ ctx[20][0] + "")) set_data(t0, t0_value);
if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*property*/ ctx[20][1].description + "")) td1.innerHTML = raw_value;
if (current_block_type === (current_block_type = select_block_type_2(ctx)) && if_block) {
if_block.p(ctx, dirty);
} else {
if_block.d(1);
if_block = current_block_type(ctx);
if (if_block) {
if_block.c();
if_block.m(td2, null);
}
}
},
d(detaching) {
if (detaching) detach(tr);
if_block.d();
}
};
}
// (65:32) {:else}
function create_else_block_2(ctx) {
let t;
return {
c() {
t = text("String");
},
m(target, anchor) {
insert(target, t, anchor);
},
p: noop,
d(detaching) {
if (detaching) detach(t);
}
};
}
// (63:32) {#if property[1].type}
function create_if_block_8(ctx) {
let t_value = /*property*/ ctx[20][1].type + "";
let t;
return {
c() {
t = text(t_value);
},
m(target, anchor) {
insert(target, t, anchor);
},
p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*property*/ ctx[20][1].type + "")) set_data(t, t_value);
},
d(detaching) {
if (detaching) detach(t);
}
};
}
// (54:28) {#each Object.entries(getSchema(requestBody[1]["schema"]["$ref"]).properties) as property}
function create_each_block_5(ctx) {
let tr;
let td0;
let span;
let t0_value = /*property*/ ctx[20][0] + "";
let t0;
let t1;
let td1;
let raw_value = /*property*/ ctx[20][1].description + "";
let t2;
let td2;
let t3;
function select_block_type_1(ctx, dirty) {
if (/*property*/ ctx[20][1].type) return create_if_block_8;
return create_else_block_2;
}
let current_block_type = select_block_type_1(ctx);
let if_block = current_block_type(ctx);
return {
c() {
tr = element("tr");
td0 = element("td");
span = element("span");
t0 = text(t0_value);
t1 = space();
td1 = element("td");
t2 = space();
td2 = element("td");
if_block.c();
t3 = space();
},
m(target, anchor) {
insert(target, tr, anchor);
append(tr, td0);
append(td0, span);
append(span, t0);
append(tr, t1);
append(tr, td1);
td1.innerHTML = raw_value;
append(tr, t2);
append(tr, td2);
if_block.m(td2, null);
append(tr, t3);
},
p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*property*/ ctx[20][0] + "")) set_data(t0, t0_value);
if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*property*/ ctx[20][1].description + "")) td1.innerHTML = raw_value;
if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) {
if_block.p(ctx, dirty);
} else {
if_block.d(1);
if_block = current_block_type(ctx);
if (if_block) {
if_block.c();
if_block.m(td2, null);
}
}
},
d(detaching) {
if (detaching) detach(tr);
if_block.d();
}
};
}
// (40:18) {#each Object.entries(method[1].requestBody.content) as requestBody }
function create_each_block_4(ctx) {
let div1;
let h4;
let t0;
let t1_value = /*requestBody*/ ctx[17][0] + "";
let t1;
let t2;
let div0;
let table;
let thead;
let t9;
let tbody;
let t10;
function select_block_type(ctx, dirty) {
if ("$ref" in /*requestBody*/ ctx[17][1]["schema"]) return create_if_block_7;
return create_else_block_3;
}
let current_block_type = select_block_type(ctx);
let if_block = current_block_type(ctx);
return {
c() {
div1 = element("div");
h4 = element("h4");
t0 = text("Request Body - ");
t1 = text(t1_value);
t2 = space();
div0 = element("div");
table = element("table");
thead = element("thead");
thead.innerHTML = `<tr><th>Name</th>
<th>Description</th>
<th>Type</th>
</tr><tr></tr>`;
t9 = space();
tbody = element("tbody");
if_block.c();
t10 = space();
attr(h4, "class", "subtitle");
attr(table, "class", "table is-hoverable is-fullwidth");
attr(div0, "class", "table-container");
attr(div1, "class", "swagger-parameters");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, h4);
append(h4, t0);
append(h4, t1);
append(div1, t2);
append(div1, div0);
append(div0, table);
append(table, thead);
append(table, t9);
append(table, tbody);
if_block.m(tbody, null);
append(div1, t10);
},
p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*requestBody*/ ctx[17][0] + "")) set_data(t1, t1_value);
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
if_block.p(ctx, dirty);
} else {
if_block.d(1);
if_block = current_block_type(ctx);
if (if_block) {
if_block.c();
if_block.m(tbody, null);
}
}
},
d(detaching) {
if (detaching) detach(div1);
if_block.d();
}
};
}
// (96:18) {#if method[1].parameters}
function create_if_block_2(ctx) {
let div;
let div1;
let h4;
let t1;
let div0;
let table;

@@ -424,3 +910,3 @@ let thead;

let tbody;
let each_value_3 = /*method*/ ctx[7][1].parameters;
let each_value_3 = /*method*/ ctx[8][1].parameters;
let each_blocks = [];

@@ -434,6 +920,7 @@

c() {
div = element("div");
div1 = element("div");
h4 = element("h4");
h4.textContent = "Parameters";
t1 = space();
div0 = element("div");
table = element("table");

@@ -455,10 +942,13 @@ thead = element("thead");

attr(h4, "class", "subtitle");
attr(table, "class", "table is-hoverable");
attr(div, "class", "swagger-parameters");
attr(div0, "class", "table-container");
attr(div1, "class", "swagger-parameters");
},
m(target, anchor) {
insert(target, div, anchor);
append(div, h4);
append(div, t1);
append(div, table);
insert(target, div1, anchor);
append(div1, h4);
append(div1, t1);
append(div1, div0);
append(div0, table);
append(table, thead);

@@ -474,3 +964,3 @@ append(table, t10);

if (dirty & /*Object, swagger*/ 2) {
each_value_3 = /*method*/ ctx[7][1].parameters;
each_value_3 = /*method*/ ctx[8][1].parameters;
let i;

@@ -498,3 +988,3 @@

d(detaching) {
if (detaching) detach(div);
if (detaching) detach(div1);
destroy_each(each_blocks, detaching);

@@ -505,6 +995,6 @@ }

// (55:32) {:else}
// (117:32) {:else}
function create_else_block_1(ctx) {
let span;
let t_value = /*parameter*/ ctx[13].name + "";
let t_value = /*parameter*/ ctx[14].name + "";
let t;

@@ -522,3 +1012,3 @@

p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*parameter*/ ctx[13].name + "")) set_data(t, t_value);
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*parameter*/ ctx[14].name + "")) set_data(t, t_value);
},

@@ -531,6 +1021,6 @@ d(detaching) {

// (51:32) {#if parameter.required}
// (113:32) {#if parameter.required}
function create_if_block_5(ctx) {
let span;
let t_value = /*parameter*/ ctx[13].name + "";
let t_value = /*parameter*/ ctx[14].name + "";
let t;

@@ -549,3 +1039,3 @@

p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*parameter*/ ctx[13].name + "")) set_data(t, t_value);
if (dirty & /*swagger*/ 2 && t_value !== (t_value = /*parameter*/ ctx[14].name + "")) set_data(t, t_value);
},

@@ -558,3 +1048,3 @@ d(detaching) {

// (70:32) {:else}
// (132:32) {:else}
function create_else_block(ctx) {

@@ -577,9 +1067,9 @@ let t;

// (64:32) {#if parameter.type}
// (126:32) {#if parameter.type}
function create_if_block_3(ctx) {
let t0_value = /*parameter*/ ctx[13].type + "";
let t0_value = /*parameter*/ ctx[14].type + "";
let t0;
let t1;
let if_block_anchor;
let if_block = /*parameter*/ ctx[13].items && create_if_block_4(ctx);
let if_block = /*parameter*/ ctx[14].items && create_if_block_4(ctx);

@@ -600,5 +1090,5 @@ return {

p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*parameter*/ ctx[13].type + "")) set_data(t0, t0_value);
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*parameter*/ ctx[14].type + "")) set_data(t0, t0_value);
if (/*parameter*/ ctx[13].items) {
if (/*parameter*/ ctx[14].items) {
if (if_block) {

@@ -625,6 +1115,6 @@ if_block.p(ctx, dirty);

// (66:34) {#if parameter.items }
// (128:34) {#if parameter.items }
function create_if_block_4(ctx) {
let t0;
let t1_value = /*parameter*/ ctx[13].items.type + "";
let t1_value = /*parameter*/ ctx[14].items.type + "";
let t1;

@@ -642,3 +1132,3 @@

p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*parameter*/ ctx[13].items.type + "")) set_data(t1, t1_value);
if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*parameter*/ ctx[14].items.type + "")) set_data(t1, t1_value);
},

@@ -652,3 +1142,3 @@ d(detaching) {

// (48:26) {#each method[1].parameters as parameter}
// (110:26) {#each method[1].parameters as parameter}
function create_each_block_3(ctx) {

@@ -659,7 +1149,7 @@ let tr;

let td1;
let t1_value = /*parameter*/ ctx[13].in + "";
let t1_value = /*parameter*/ ctx[14].in + "";
let t1;
let t2;
let td2;
let raw_value = /*parameter*/ ctx[13].description + "";
let raw_value = /*parameter*/ ctx[14].description + "";
let t3;

@@ -669,16 +1159,16 @@ let td3;

function select_block_type(ctx, dirty) {
if (/*parameter*/ ctx[13].required) return create_if_block_5;
function select_block_type_3(ctx, dirty) {
if (/*parameter*/ ctx[14].required) return create_if_block_5;
return create_else_block_1;
}
let current_block_type = select_block_type(ctx);
let current_block_type = select_block_type_3(ctx);
let if_block0 = current_block_type(ctx);
function select_block_type_1(ctx, dirty) {
if (/*parameter*/ ctx[13].type) return create_if_block_3;
function select_block_type_4(ctx, dirty) {
if (/*parameter*/ ctx[14].type) return create_if_block_3;
return create_else_block;
}
let current_block_type_1 = select_block_type_1(ctx);
let current_block_type_1 = select_block_type_4(ctx);
let if_block1 = current_block_type_1(ctx);

@@ -717,3 +1207,3 @@

p(ctx, dirty) {
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block0) {
if (current_block_type === (current_block_type = select_block_type_3(ctx)) && if_block0) {
if_block0.p(ctx, dirty);

@@ -730,5 +1220,5 @@ } else {

if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*parameter*/ ctx[13].in + "")) set_data(t1, t1_value);
if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*parameter*/ ctx[13].description + "")) td2.innerHTML = raw_value;
if (current_block_type_1 === (current_block_type_1 = select_block_type_1(ctx)) && if_block1) {
if (dirty & /*swagger*/ 2 && t1_value !== (t1_value = /*parameter*/ ctx[14].in + "")) set_data(t1, t1_value);
if (dirty & /*swagger*/ 2 && raw_value !== (raw_value = /*parameter*/ ctx[14].description + "")) td2.innerHTML = raw_value;
if (current_block_type_1 === (current_block_type_1 = select_block_type_4(ctx)) && if_block1) {
if_block1.p(ctx, dirty);

@@ -753,3 +1243,3 @@ } else {

// (80:18) {#if method[1].responses}
// (143:18) {#if method[1].responses}
function create_if_block_1(ctx) {

@@ -759,3 +1249,3 @@ let div;

let t1;
let each_value_2 = Object.entries(/*method*/ ctx[7][1].responses);
let each_value_2 = Object.entries(/*method*/ ctx[8][1].responses);
let each_blocks = [];

@@ -791,3 +1281,3 @@

if (dirty & /*Object, swagger*/ 2) {
each_value_2 = Object.entries(/*method*/ ctx[7][1].responses);
each_value_2 = Object.entries(/*method*/ ctx[8][1].responses);
let i;

@@ -821,10 +1311,10 @@

// (83:22) {#each Object.entries(method[1].responses) as response}
// (146:22) {#each Object.entries(method[1].responses) as response}
function create_each_block_2(ctx) {
let h5;
let span;
let t0_value = /*response*/ ctx[10][0] + "";
let t0_value = /*response*/ ctx[11][0] + "";
let t0;
let t1;
let t2_value = /*response*/ ctx[10][1].description + "";
let t2_value = /*response*/ ctx[11][1].description + "";
let t2;

@@ -849,4 +1339,4 @@

p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*response*/ ctx[10][0] + "")) set_data(t0, t0_value);
if (dirty & /*swagger*/ 2 && t2_value !== (t2_value = /*response*/ ctx[10][1].description + "")) set_data(t2, t2_value);
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*response*/ ctx[11][0] + "")) set_data(t0, t0_value);
if (dirty & /*swagger*/ 2 && t2_value !== (t2_value = /*response*/ ctx[11][1].description + "")) set_data(t2, t2_value);
},

@@ -859,3 +1349,3 @@ d(detaching) {

// (24:12) {#each Object.entries(route[1]) as method, methodIdx}
// (28:12) {#each Object.entries(route[1]) as method, methodIdx}
function create_each_block_1(ctx) {

@@ -866,3 +1356,3 @@ let div2;

let span;
let t0_value = /*method*/ ctx[7][0] + "";
let t0_value = /*method*/ ctx[8][0] + "";
let t0;

@@ -874,13 +1364,15 @@ let t1;

let t3;
let t4;
let div2_class_value;
let mounted;
let dispose;
let if_block0 = /*method*/ ctx[7][1].summary && create_if_block_6(ctx);
let if_block0 = /*method*/ ctx[8][1].summary && create_if_block_10(ctx);
function click_handler(...args) {
return /*click_handler*/ ctx[3](/*routeIdx*/ ctx[6], ...args);
return /*click_handler*/ ctx[4](/*routeIdx*/ ctx[7], ...args);
}
let if_block1 = /*method*/ ctx[7][1].parameters && create_if_block_2(ctx);
let if_block2 = /*method*/ ctx[7][1].responses && create_if_block_1(ctx);
let if_block1 = /*method*/ ctx[8][1].requestBody && /*method*/ ctx[8][1].requestBody.content && create_if_block_6(ctx);
let if_block2 = /*method*/ ctx[8][1].parameters && create_if_block_2(ctx);
let if_block3 = /*method*/ ctx[8][1].responses && create_if_block_1(ctx);

@@ -901,2 +1393,4 @@ return {

if (if_block2) if_block2.c();
t4 = space();
if (if_block3) if_block3.c();
attr(span, "class", "swagger-method-name");

@@ -907,4 +1401,4 @@ attr(a, "class", "swagger-method-link");

attr(div1, "class", "swagger-method-details open");
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[6]}`]);
attr(div2, "class", div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[7][0]);
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[7]}`]);
attr(div2, "class", div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[8][0]);
},

@@ -924,2 +1418,4 @@ m(target, anchor) {

if (if_block2) if_block2.m(div1, null);
append(div1, t4);
if (if_block3) if_block3.m(div1, null);

@@ -933,9 +1429,9 @@ if (!mounted) {

ctx = new_ctx;
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*method*/ ctx[7][0] + "")) set_data(t0, t0_value);
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*method*/ ctx[8][0] + "")) set_data(t0, t0_value);
if (/*method*/ ctx[7][1].summary) {
if (/*method*/ ctx[8][1].summary) {
if (if_block0) {
if_block0.p(ctx, dirty);
} else {
if_block0 = create_if_block_6(ctx);
if_block0 = create_if_block_10(ctx);
if_block0.c();

@@ -949,7 +1445,7 @@ if_block0.m(a, null);

if (/*method*/ ctx[7][1].parameters) {
if (/*method*/ ctx[8][1].requestBody && /*method*/ ctx[8][1].requestBody.content) {
if (if_block1) {
if_block1.p(ctx, dirty);
} else {
if_block1 = create_if_block_2(ctx);
if_block1 = create_if_block_6(ctx);
if_block1.c();

@@ -963,9 +1459,9 @@ if_block1.m(div1, t3);

if (/*method*/ ctx[7][1].responses) {
if (/*method*/ ctx[8][1].parameters) {
if (if_block2) {
if_block2.p(ctx, dirty);
} else {
if_block2 = create_if_block_1(ctx);
if_block2 = create_if_block_2(ctx);
if_block2.c();
if_block2.m(div1, null);
if_block2.m(div1, t4);
}

@@ -977,7 +1473,20 @@ } else if (if_block2) {

if (/*method*/ ctx[8][1].responses) {
if (if_block3) {
if_block3.p(ctx, dirty);
} else {
if_block3 = create_if_block_1(ctx);
if_block3.c();
if_block3.m(div1, null);
}
} else if (if_block3) {
if_block3.d(1);
if_block3 = null;
}
if (dirty & /*active*/ 1) {
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[6]}`]);
toggle_class(div1, "open", /*active*/ ctx[0][`${/*routeIdx*/ ctx[7]}`]);
}
if (dirty & /*swagger*/ 2 && div2_class_value !== (div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[7][0])) {
if (dirty & /*swagger*/ 2 && div2_class_value !== (div2_class_value = "swagger-method swagger-method-" + /*method*/ ctx[8][0])) {
attr(div2, "class", div2_class_value);

@@ -991,2 +1500,3 @@ }

if (if_block2) if_block2.d();
if (if_block3) if_block3.d();
mounted = false;

@@ -998,11 +1508,11 @@ dispose();

// (21:8) {#each Object.entries(swagger.paths) as route, routeIdx}
// (25:8) {#each Object.entries(swagger.paths) as route, routeIdx}
function create_each_block(ctx) {
let div;
let h3;
let t0_value = /*route*/ ctx[4][0] + "";
let t0_value = /*route*/ ctx[5][0] + "";
let t0;
let t1;
let t2;
let each_value_1 = Object.entries(/*route*/ ctx[4][1]);
let each_value_1 = Object.entries(/*route*/ ctx[5][1]);
let each_blocks = [];

@@ -1042,6 +1552,6 @@

p(ctx, dirty) {
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*route*/ ctx[4][0] + "")) set_data(t0, t0_value);
if (dirty & /*swagger*/ 2 && t0_value !== (t0_value = /*route*/ ctx[5][0] + "")) set_data(t0, t0_value);
if (dirty & /*Object, swagger, active*/ 3) {
each_value_1 = Object.entries(/*route*/ ctx[4][1]);
if (dirty & /*Object, swagger, active, getSchema*/ 7) {
each_value_1 = Object.entries(/*route*/ ctx[5][1]);
let i;

@@ -1127,12 +1637,16 @@

$$invalidate(1, swagger = await res.json());
console.log(swagger);
});
const getSchema = refName => {
const division = refName.replace("#/", "").split("/");
return swagger[division[0]][division[1]][division[2]];
};
const click_handler = routeIdx => $$invalidate(0, active[`${routeIdx}`] = !active[`${routeIdx}`], active);
$$self.$$set = $$props => {
if ("swagger_url" in $$props) $$invalidate(2, swagger_url = $$props.swagger_url);
if ("swagger_url" in $$props) $$invalidate(3, swagger_url = $$props.swagger_url);
};
return [active, swagger, swagger_url, click_handler];
return [active, swagger, getSchema, swagger_url, click_handler];
}

@@ -1143,3 +1657,3 @@

super();
init(this, options, instance, create_fragment, safe_not_equal, { swagger_url: 2 });
init(this, options, instance, create_fragment, safe_not_equal, { swagger_url: 3 });
}

@@ -1146,0 +1660,0 @@ }

2

package.json

@@ -6,3 +6,3 @@ {

"svelte": "src/SwaggerUISvelte.svelte",
"version": "0.0.3",
"version": "0.0.4",
"scripts": {

@@ -9,0 +9,0 @@ "build": "rollup -c",

@@ -1,2 +0,2 @@

var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function i(t){t.parentNode.removeChild(t)}function u(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function a(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function d(){return f(" ")}function m(){return f("")}function p(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e,n){t.classList[n?"add":"remove"](e)}let $;function y(t){$=t}function b(t){(function(){if(!$)throw new Error("Function called outside component initialization");return $})().$$.on_mount.push(t)}const w=[],v=[],_=[],x=[],j=Promise.resolve();let k=!1;function O(t){_.push(t)}let E=!1;const L=new Set;function N(){if(!E){E=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];y(e),T(e.$$)}for(y(null),w.length=0;v.length;)v.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];L.has(e)||(L.add(e),e())}_.length=0}while(w.length);for(;x.length;)x.pop()();k=!1,E=!1,L.clear()}}function T(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(O)}}const A=new Set;function C(t,e){-1===t.$$.dirty[0]&&(w.push(t),k||(k=!0,j.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function M(l,c,s,u,a,f,d=[-1]){const m=$;y(l);const p=c.props||{},h=l.$$={fragment:null,ctx:null,props:f,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(m?m.$$.context:[]),callbacks:n(),dirty:d,skip_bound:!1};let g=!1;if(h.ctx=s?s(l,p,(t,e,...n)=>{const r=n.length?n[0]:e;return h.ctx&&a(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),g&&C(l,t)),e}):[],h.update(),g=!0,r(h.before_update),h.fragment=!!u&&u(h.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);h.fragment&&h.fragment.l(t),t.forEach(i)}else h.fragment&&h.fragment.c();c.intro&&((b=l.$$.fragment)&&b.i&&(A.delete(b),b.i(w))),function(t,n,l){const{fragment:c,on_mount:s,on_destroy:i,after_update:u}=t.$$;c&&c.m(n,l),O(()=>{const n=s.map(e).filter(o);i?i.push(...n):r(n),t.$$.on_mount=[]}),u.forEach(O)}(l,c.target,c.anchor),N()}var b,w;y(m)}function q(t,e,n){const r=t.slice();return r[11]=e[n],r}function H(t,e,n){const r=t.slice();return r[14]=e[n],r}function P(t,e,n){const r=t.slice();return r[8]=e[n],r[10]=n,r}function S(t,e,n){const r=t.slice();return r[5]=e[n],r[7]=n,r}function z(t){let e,n,r,o,l,g=t[1].info.title+"",$=Object.entries(t[1].paths),y=[];for(let e=0;e<$.length;e+=1)y[e]=W(S(t,$,e));return{c(){e=a("h1"),n=f(g),r=f("!"),o=d();for(let t=0;t<y.length;t+=1)y[t].c();l=m(),p(e,"class","title")},m(t,i){s(t,e,i),c(e,n),c(e,r),s(t,o,i);for(let e=0;e<y.length;e+=1)y[e].m(t,i);s(t,l,i)},p(t,e){if(2&e&&g!==(g=t[1].info.title+"")&&h(n,g),3&e){let n;for($=Object.entries(t[1].paths),n=0;n<$.length;n+=1){const r=S(t,$,n);y[n]?y[n].p(r,e):(y[n]=W(r),y[n].c(),y[n].m(l.parentNode,l))}for(;n<y.length;n+=1)y[n].d(1);y.length=$.length}},d(t){t&&i(e),t&&i(o),u(y,t),t&&i(l)}}}function B(t){let e,n=t[8][1].summary+"";return{c(){e=f(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[8][1].summary+"")&&h(e,n)},d(t){t&&i(e)}}}function D(t){let e,n,r,o,l,f,m,h=t[8][1].parameters,g=[];for(let e=0;e<h.length;e+=1)g[e]=K(H(t,h,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Parameters",r=d(),o=a("table"),l=a("thead"),l.innerHTML="<tr><th>Name</th> \n <th>Located in</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",f=d(),m=a("tbody");for(let t=0;t<g.length;t+=1)g[t].c();p(o,"class","table is-hoverable"),p(e,"class","swagger-parameters")},m(t,i){s(t,e,i),c(e,n),c(e,r),c(e,o),c(o,l),c(o,f),c(o,m);for(let t=0;t<g.length;t+=1)g[t].m(m,null)},p(t,e){if(2&e){let n;for(h=t[8][1].parameters,n=0;n<h.length;n+=1){const r=H(t,h,n);g[n]?g[n].p(r,e):(g[n]=K(r),g[n].c(),g[n].m(m,null))}for(;n<g.length;n+=1)g[n].d(1);g.length=h.length}},d(t){t&&i(e),u(g,t)}}}function F(t){let e,n,r=t[14].name+"";return{c(){e=a("span"),n=f(r)},m(t,r){s(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[14].name+"")&&h(n,r)},d(t){t&&i(e)}}}function R(t){let e,n,r=t[14].name+"";return{c(){e=a("span"),n=f(r),p(e,"class","swagger-parameter-required")},m(t,r){s(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[14].name+"")&&h(n,r)},d(t){t&&i(e)}}}function G(e){let n;return{c(){n=f("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function I(t){let e,n,r,o=t[14].type+"",l=t[14].items&&J(t);return{c(){e=f(o),n=d(),l&&l.c(),r=m()},m(t,o){s(t,e,o),s(t,n,o),l&&l.m(t,o),s(t,r,o)},p(t,n){2&n&&o!==(o=t[14].type+"")&&h(e,o),t[14].items?l?l.p(t,n):(l=J(t),l.c(),l.m(r.parentNode,r)):l&&(l.d(1),l=null)},d(t){t&&i(e),t&&i(n),l&&l.d(t),t&&i(r)}}}function J(t){let e,n,r=t[14].items.type+"";return{c(){e=f("of\n "),n=f(r)},m(t,r){s(t,e,r),s(t,n,r)},p(t,e){2&e&&r!==(r=t[14].items.type+"")&&h(n,r)},d(t){t&&i(e),t&&i(n)}}}function K(t){let e,n,r,o,l,u,m,p,g,$,y=t[14].in+"",b=t[14].description+"";function w(t,e){return t[14].required?R:F}let v=w(t),_=v(t);function x(t,e){return t[14].type?I:G}let j=x(t),k=j(t);return{c(){e=a("tr"),n=a("td"),_.c(),r=d(),o=a("td"),l=f(y),u=d(),m=a("td"),p=d(),g=a("td"),k.c(),$=d()},m(t,i){s(t,e,i),c(e,n),_.m(n,null),c(e,r),c(e,o),c(o,l),c(e,u),c(e,m),m.innerHTML=b,c(e,p),c(e,g),k.m(g,null),c(e,$)},p(t,e){v===(v=w(t))&&_?_.p(t,e):(_.d(1),_=v(t),_&&(_.c(),_.m(n,null))),2&e&&y!==(y=t[14].in+"")&&h(l,y),2&e&&b!==(b=t[14].description+"")&&(m.innerHTML=b),j===(j=x(t))&&k?k.p(t,e):(k.d(1),k=j(t),k&&(k.c(),k.m(g,null)))},d(t){t&&i(e),_.d(),k.d()}}}function Q(t){let e,n,r,o=Object.entries(t[8][1].responses),l=[];for(let e=0;e<o.length;e+=1)l[e]=U(q(t,o,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=d();for(let t=0;t<l.length;t+=1)l[t].c();p(e,"class","swagger-response")},m(t,o){s(t,e,o),c(e,n),c(e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null)},p(t,n){if(2&n){let r;for(o=Object.entries(t[8][1].responses),r=0;r<o.length;r+=1){const c=q(t,o,r);l[r]?l[r].p(c,n):(l[r]=U(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=o.length}},d(t){t&&i(e),u(l,t)}}}function U(t){let e,n,r,o,l,u=t[11][0]+"",m=t[11][1].description+"";return{c(){e=a("h5"),n=a("span"),r=f(u),o=d(),l=f(m),p(n,"class","swagger-response-code")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(e,o),c(e,l)},p(t,e){2&e&&u!==(u=t[11][0]+"")&&h(r,u),2&e&&m!==(m=t[11][1].description+"")&&h(l,m)},d(t){t&&i(e)}}}function V(t){let e,n,r,o,l,u,m,$,y,b,w,v,_,x=t[8][0]+"",j=t[8][1].summary&&B(t);function k(...e){return t[3](t[7],...e)}let O=t[8][1].parameters&&D(t),E=t[8][1].responses&&Q(t);return{c(){e=a("div"),n=a("div"),r=a("a"),o=a("span"),l=f(x),u=d(),j&&j.c(),$=d(),y=a("div"),O&&O.c(),b=d(),E&&E.c(),p(o,"class","swagger-method-name"),p(r,"class","swagger-method-link"),p(r,"href",m=null),p(n,"class","swagger-method-title"),p(y,"class","swagger-method-details open"),g(y,"open",t[0][""+t[7]]),p(e,"class",w="swagger-method swagger-method-"+t[8][0])},m(t,i){var a,f,d,m;s(t,e,i),c(e,n),c(n,r),c(r,o),c(o,l),c(r,u),j&&j.m(r,null),c(e,$),c(e,y),O&&O.m(y,null),c(y,b),E&&E.m(y,null),v||(f="click",d=k,(a=n).addEventListener(f,d,m),_=()=>a.removeEventListener(f,d,m),v=!0)},p(n,o){t=n,2&o&&x!==(x=t[8][0]+"")&&h(l,x),t[8][1].summary?j?j.p(t,o):(j=B(t),j.c(),j.m(r,null)):j&&(j.d(1),j=null),t[8][1].parameters?O?O.p(t,o):(O=D(t),O.c(),O.m(y,b)):O&&(O.d(1),O=null),t[8][1].responses?E?E.p(t,o):(E=Q(t),E.c(),E.m(y,null)):E&&(E.d(1),E=null),1&o&&g(y,"open",t[0][""+t[7]]),2&o&&w!==(w="swagger-method swagger-method-"+t[8][0])&&p(e,"class",w)},d(t){t&&i(e),j&&j.d(),O&&O.d(),E&&E.d(),v=!1,_()}}}function W(t){let e,n,r,o,l,m=t[5][0]+"",g=Object.entries(t[5][1]),$=[];for(let e=0;e<g.length;e+=1)$[e]=V(P(t,g,e));return{c(){e=a("div"),n=a("h3"),r=f(m),o=d();for(let t=0;t<$.length;t+=1)$[t].c();l=d(),p(n,"class","title is-small is-3"),p(e,"class","swagger-paths is-small")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(e,o);for(let t=0;t<$.length;t+=1)$[t].m(e,null);c(e,l)},p(t,n){if(2&n&&m!==(m=t[5][0]+"")&&h(r,m),3&n){let r;for(g=Object.entries(t[5][1]),r=0;r<g.length;r+=1){const o=P(t,g,r);$[r]?$[r].p(o,n):($[r]=V(o),$[r].c(),$[r].m(e,l))}for(;r<$.length;r+=1)$[r].d(1);$.length=g.length}},d(t){t&&i(e),u($,t)}}}function X(e){let n,r,o,l=e[1]&&z(e);return{c(){n=a("main"),r=a("section"),o=a("div"),l&&l.c(),p(o,"class","container"),p(r,"class","section")},m(t,e){s(t,n,e),c(n,r),c(r,o),l&&l.m(o,null)},p(t,[e]){t[1]?l?l.p(t,e):(l=z(t),l.c(),l.m(o,null)):l&&(l.d(1),l=null)},i:t,o:t,d(t){t&&i(n),l&&l.d()}}}function Y(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,l){function c(t){try{i(r.next(t))}catch(t){l(t)}}function s(t){try{i(r.throw(t))}catch(t){l(t)}}function i(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}i((r=r.apply(t,e||[])).next())}))};let o,{swagger_url:l="swagger-example.json"}=e,c={};b(()=>r(void 0,void 0,void 0,(function*(){const t=yield fetch(l);n(1,o=yield t.json()),console.log(o)})));return t.$$set=t=>{"swagger_url"in t&&n(2,l=t.swagger_url)},[c,o,l,t=>n(0,c[""+t]=!c[""+t],c)]}return new class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),M(this,t,Y,X,l,{swagger_url:2})}}({target:document.body})}();
var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function l(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function i(t){t.parentNode.removeChild(t)}function u(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function a(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function f(){return d(" ")}function p(){return d("")}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e,n){t.classList[n?"add":"remove"](e)}let y;function b(t){y=t}function $(t){(function(){if(!y)throw new Error("Function called outside component initialization");return y})().$$.on_mount.push(t)}const w=[],v=[],_=[],x=[],j=Promise.resolve();let O=!1;function L(t){_.push(t)}let T=!1;const k=new Set;function q(){if(!T){T=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];b(e),N(e.$$)}for(b(null),w.length=0;v.length;)v.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];k.has(e)||(k.add(e),e())}_.length=0}while(w.length);for(;x.length;)x.pop()();O=!1,T=!1,k.clear()}}function N(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const M=new Set;function B(t,e){-1===t.$$.dirty[0]&&(w.push(t),O||(O=!0,j.then(q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function E(o,c,s,u,a,d,f=[-1]){const p=y;b(o);const m=c.props||{},h=o.$$={fragment:null,ctx:null,props:d,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:f,skip_bound:!1};let g=!1;if(h.ctx=s?s(o,m,(t,e,...n)=>{const r=n.length?n[0]:e;return h.ctx&&a(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),g&&B(o,t)),e}):[],h.update(),g=!0,r(h.before_update),h.fragment=!!u&&u(h.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);h.fragment&&h.fragment.l(t),t.forEach(i)}else h.fragment&&h.fragment.c();c.intro&&(($=o.$$.fragment)&&$.i&&(M.delete($),$.i(w))),function(t,n,o){const{fragment:c,on_mount:s,on_destroy:i,after_update:u}=t.$$;c&&c.m(n,o),L(()=>{const n=s.map(e).filter(l);i?i.push(...n):r(n),t.$$.on_mount=[]}),u.forEach(L)}(o,c.target,c.anchor),q()}var $,w;b(p)}function H(t,e,n){const r=t.slice();return r[12]=e[n],r}function S(t,e,n){const r=t.slice();return r[15]=e[n],r}function A(t,e,n){const r=t.slice();return r[21]=e[n],r}function C(t,e,n){const r=t.slice();return r[21]=e[n],r}function P(t,e,n){const r=t.slice();return r[18]=e[n],r}function D(t,e,n){const r=t.slice();return r[9]=e[n],r[11]=n,r}function R(t,e,n){const r=t.slice();return r[6]=e[n],r[8]=n,r}function z(t){let e,n,r,l,o=t[1].info.title+"",g=Object.entries(t[1].paths),y=[];for(let e=0;e<g.length;e+=1)y[e]=ut(R(t,g,e));return{c(){e=a("h1"),n=d(o),r=f();for(let t=0;t<y.length;t+=1)y[t].c();l=p(),m(e,"class","title")},m(t,o){s(t,e,o),c(e,n),s(t,r,o);for(let e=0;e<y.length;e+=1)y[e].m(t,o);s(t,l,o)},p(t,e){if(2&e&&o!==(o=t[1].info.title+"")&&h(n,o),7&e){let n;for(g=Object.entries(t[1].paths),n=0;n<g.length;n+=1){const r=R(t,g,n);y[n]?y[n].p(r,e):(y[n]=ut(r),y[n].c(),y[n].m(l.parentNode,l))}for(;n<y.length;n+=1)y[n].d(1);y.length=g.length}},d(t){t&&i(e),t&&i(r),u(y,t),t&&i(l)}}}function F(t){let e,n=t[9][1].summary+"";return{c(){e=d(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[9][1].summary+"")&&h(e,n)},d(t){t&&i(e)}}}function G(t){let e,n=Object.entries(t[9][1].requestBody.content),r=[];for(let e=0;e<n.length;e+=1)r[e]=Y(P(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);s(t,e,n)},p(t,l){if(6&l){let o;for(n=Object.entries(t[9][1].requestBody.content),o=0;o<n.length;o+=1){const c=P(t,n,o);r[o]?r[o].p(c,l):(r[o]=Y(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&i(e)}}}function I(t){let e,n=Object.entries(t[18][1].schema.properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=U(A(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);s(t,e,n)},p(t,l){if(2&l){let o;for(n=Object.entries(t[18][1].schema.properties),o=0;o<n.length;o+=1){const c=A(t,n,o);r[o]?r[o].p(c,l):(r[o]=U(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&i(e)}}}function J(t){let e,n=Object.entries(t[2](t[18][1].schema.$ref).properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=X(C(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);s(t,e,n)},p(t,l){if(6&l){let o;for(n=Object.entries(t[2](t[18][1].schema.$ref).properties),o=0;o<n.length;o+=1){const c=C(t,n,o);r[o]?r[o].p(c,l):(r[o]=X(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&i(e)}}}function K(e){let n;return{c(){n=d("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function Q(t){let e,n=t[21][1].type+"";return{c(){e=d(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[21][1].type+"")&&h(e,n)},d(t){t&&i(e)}}}function U(t){let e,n,r,l,o,u,p,m,g,y=t[21][0]+"",b=t[21][1].description+"";function $(t,e){return t[21][1].type?Q:K}let w=$(t),v=w(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=d(y),o=f(),u=a("td"),p=f(),m=a("td"),v.c(),g=f()},m(t,i){s(t,e,i),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=b,c(e,p),c(e,m),v.m(m,null),c(e,g)},p(t,e){2&e&&y!==(y=t[21][0]+"")&&h(l,y),2&e&&b!==(b=t[21][1].description+"")&&(u.innerHTML=b),w===(w=$(t))&&v?v.p(t,e):(v.d(1),v=w(t),v&&(v.c(),v.m(m,null)))},d(t){t&&i(e),v.d()}}}function V(e){let n;return{c(){n=d("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function W(t){let e,n=t[21][1].type+"";return{c(){e=d(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[21][1].type+"")&&h(e,n)},d(t){t&&i(e)}}}function X(t){let e,n,r,l,o,u,p,m,g,y=t[21][0]+"",b=t[21][1].description+"";function $(t,e){return t[21][1].type?W:V}let w=$(t),v=w(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=d(y),o=f(),u=a("td"),p=f(),m=a("td"),v.c(),g=f()},m(t,i){s(t,e,i),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=b,c(e,p),c(e,m),v.m(m,null),c(e,g)},p(t,e){2&e&&y!==(y=t[21][0]+"")&&h(l,y),2&e&&b!==(b=t[21][1].description+"")&&(u.innerHTML=b),w===(w=$(t))&&v?v.p(t,e):(v.d(1),v=w(t),v&&(v.c(),v.m(m,null)))},d(t){t&&i(e),v.d()}}}function Y(t){let e,n,r,l,o,u,p,g,y,b,$,w=t[18][0]+"";function v(t,e){return"$ref"in t[18][1].schema?J:I}let _=v(t),x=_(t);return{c(){e=a("div"),n=a("h4"),r=d("Request Body - "),l=d(w),o=f(),u=a("div"),p=a("table"),g=a("thead"),g.innerHTML="<tr><th>Name</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",y=f(),b=a("tbody"),x.c(),$=f(),m(n,"class","subtitle"),m(p,"class","table is-hoverable is-fullwidth"),m(u,"class","table-container"),m(e,"class","swagger-parameters")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(n,l),c(e,o),c(e,u),c(u,p),c(p,g),c(p,y),c(p,b),x.m(b,null),c(e,$)},p(t,e){2&e&&w!==(w=t[18][0]+"")&&h(l,w),_===(_=v(t))&&x?x.p(t,e):(x.d(1),x=_(t),x&&(x.c(),x.m(b,null)))},d(t){t&&i(e),x.d()}}}function Z(t){let e,n,r,l,o,d,p,h,g=t[9][1].parameters,y=[];for(let e=0;e<g.length;e+=1)y[e]=ot(S(t,g,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Parameters",r=f(),l=a("div"),o=a("table"),d=a("thead"),d.innerHTML="<tr><th>Name</th> \n <th>Located in</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",p=f(),h=a("tbody");for(let t=0;t<y.length;t+=1)y[t].c();m(n,"class","subtitle"),m(o,"class","table is-hoverable"),m(l,"class","table-container"),m(e,"class","swagger-parameters")},m(t,i){s(t,e,i),c(e,n),c(e,r),c(e,l),c(l,o),c(o,d),c(o,p),c(o,h);for(let t=0;t<y.length;t+=1)y[t].m(h,null)},p(t,e){if(2&e){let n;for(g=t[9][1].parameters,n=0;n<g.length;n+=1){const r=S(t,g,n);y[n]?y[n].p(r,e):(y[n]=ot(r),y[n].c(),y[n].m(h,null))}for(;n<y.length;n+=1)y[n].d(1);y.length=g.length}},d(t){t&&i(e),u(y,t)}}}function tt(t){let e,n,r=t[15].name+"";return{c(){e=a("span"),n=d(r)},m(t,r){s(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[15].name+"")&&h(n,r)},d(t){t&&i(e)}}}function et(t){let e,n,r=t[15].name+"";return{c(){e=a("span"),n=d(r),m(e,"class","swagger-parameter-required")},m(t,r){s(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[15].name+"")&&h(n,r)},d(t){t&&i(e)}}}function nt(e){let n;return{c(){n=d("String")},m(t,e){s(t,n,e)},p:t,d(t){t&&i(n)}}}function rt(t){let e,n,r,l=t[15].type+"",o=t[15].items&&lt(t);return{c(){e=d(l),n=f(),o&&o.c(),r=p()},m(t,l){s(t,e,l),s(t,n,l),o&&o.m(t,l),s(t,r,l)},p(t,n){2&n&&l!==(l=t[15].type+"")&&h(e,l),t[15].items?o?o.p(t,n):(o=lt(t),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},d(t){t&&i(e),t&&i(n),o&&o.d(t),t&&i(r)}}}function lt(t){let e,n,r=t[15].items.type+"";return{c(){e=d("of\n "),n=d(r)},m(t,r){s(t,e,r),s(t,n,r)},p(t,e){2&e&&r!==(r=t[15].items.type+"")&&h(n,r)},d(t){t&&i(e),t&&i(n)}}}function ot(t){let e,n,r,l,o,u,p,m,g,y,b=t[15].in+"",$=t[15].description+"";function w(t,e){return t[15].required?et:tt}let v=w(t),_=v(t);function x(t,e){return t[15].type?rt:nt}let j=x(t),O=j(t);return{c(){e=a("tr"),n=a("td"),_.c(),r=f(),l=a("td"),o=d(b),u=f(),p=a("td"),m=f(),g=a("td"),O.c(),y=f()},m(t,i){s(t,e,i),c(e,n),_.m(n,null),c(e,r),c(e,l),c(l,o),c(e,u),c(e,p),p.innerHTML=$,c(e,m),c(e,g),O.m(g,null),c(e,y)},p(t,e){v===(v=w(t))&&_?_.p(t,e):(_.d(1),_=v(t),_&&(_.c(),_.m(n,null))),2&e&&b!==(b=t[15].in+"")&&h(o,b),2&e&&$!==($=t[15].description+"")&&(p.innerHTML=$),j===(j=x(t))&&O?O.p(t,e):(O.d(1),O=j(t),O&&(O.c(),O.m(g,null)))},d(t){t&&i(e),_.d(),O.d()}}}function ct(t){let e,n,r,l=Object.entries(t[9][1].responses),o=[];for(let e=0;e<l.length;e+=1)o[e]=st(H(t,l,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=f();for(let t=0;t<o.length;t+=1)o[t].c();m(e,"class","swagger-response")},m(t,l){s(t,e,l),c(e,n),c(e,r);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,n){if(2&n){let r;for(l=Object.entries(t[9][1].responses),r=0;r<l.length;r+=1){const c=H(t,l,r);o[r]?o[r].p(c,n):(o[r]=st(c),o[r].c(),o[r].m(e,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=l.length}},d(t){t&&i(e),u(o,t)}}}function st(t){let e,n,r,l,o,u=t[12][0]+"",p=t[12][1].description+"";return{c(){e=a("h5"),n=a("span"),r=d(u),l=f(),o=d(p),m(n,"class","swagger-response-code")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(e,l),c(e,o)},p(t,e){2&e&&u!==(u=t[12][0]+"")&&h(r,u),2&e&&p!==(p=t[12][1].description+"")&&h(o,p)},d(t){t&&i(e)}}}function it(t){let e,n,r,l,o,u,p,y,b,$,w,v,_,x,j=t[9][0]+"",O=t[9][1].summary&&F(t);function L(...e){return t[4](t[8],...e)}let T=t[9][1].requestBody&&t[9][1].requestBody.content&&G(t),k=t[9][1].parameters&&Z(t),q=t[9][1].responses&&ct(t);return{c(){e=a("div"),n=a("div"),r=a("a"),l=a("span"),o=d(j),u=f(),O&&O.c(),y=f(),b=a("div"),T&&T.c(),$=f(),k&&k.c(),w=f(),q&&q.c(),m(l,"class","swagger-method-name"),m(r,"class","swagger-method-link"),m(r,"href",p=null),m(n,"class","swagger-method-title"),m(b,"class","swagger-method-details open"),g(b,"open",t[0][""+t[8]]),m(e,"class",v="swagger-method swagger-method-"+t[9][0])},m(t,i){var a,d,f,p;s(t,e,i),c(e,n),c(n,r),c(r,l),c(l,o),c(r,u),O&&O.m(r,null),c(e,y),c(e,b),T&&T.m(b,null),c(b,$),k&&k.m(b,null),c(b,w),q&&q.m(b,null),_||(d="click",f=L,(a=n).addEventListener(d,f,p),x=()=>a.removeEventListener(d,f,p),_=!0)},p(n,l){t=n,2&l&&j!==(j=t[9][0]+"")&&h(o,j),t[9][1].summary?O?O.p(t,l):(O=F(t),O.c(),O.m(r,null)):O&&(O.d(1),O=null),t[9][1].requestBody&&t[9][1].requestBody.content?T?T.p(t,l):(T=G(t),T.c(),T.m(b,$)):T&&(T.d(1),T=null),t[9][1].parameters?k?k.p(t,l):(k=Z(t),k.c(),k.m(b,w)):k&&(k.d(1),k=null),t[9][1].responses?q?q.p(t,l):(q=ct(t),q.c(),q.m(b,null)):q&&(q.d(1),q=null),1&l&&g(b,"open",t[0][""+t[8]]),2&l&&v!==(v="swagger-method swagger-method-"+t[9][0])&&m(e,"class",v)},d(t){t&&i(e),O&&O.d(),T&&T.d(),k&&k.d(),q&&q.d(),_=!1,x()}}}function ut(t){let e,n,r,l,o,p=t[6][0]+"",g=Object.entries(t[6][1]),y=[];for(let e=0;e<g.length;e+=1)y[e]=it(D(t,g,e));return{c(){e=a("div"),n=a("h3"),r=d(p),l=f();for(let t=0;t<y.length;t+=1)y[t].c();o=f(),m(n,"class","title is-small is-3"),m(e,"class","swagger-paths is-small")},m(t,i){s(t,e,i),c(e,n),c(n,r),c(e,l);for(let t=0;t<y.length;t+=1)y[t].m(e,null);c(e,o)},p(t,n){if(2&n&&p!==(p=t[6][0]+"")&&h(r,p),7&n){let r;for(g=Object.entries(t[6][1]),r=0;r<g.length;r+=1){const l=D(t,g,r);y[r]?y[r].p(l,n):(y[r]=it(l),y[r].c(),y[r].m(e,o))}for(;r<y.length;r+=1)y[r].d(1);y.length=g.length}},d(t){t&&i(e),u(y,t)}}}function at(e){let n,r,l,o=e[1]&&z(e);return{c(){n=a("main"),r=a("section"),l=a("div"),o&&o.c(),m(l,"class","container"),m(r,"class","section")},m(t,e){s(t,n,e),c(n,r),c(r,l),o&&o.m(l,null)},p(t,[e]){t[1]?o?o.p(t,e):(o=z(t),o.c(),o.m(l,null)):o&&(o.d(1),o=null)},i:t,o:t,d(t){t&&i(n),o&&o.d()}}}function dt(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(l,o){function c(t){try{i(r.next(t))}catch(t){o(t)}}function s(t){try{i(r.throw(t))}catch(t){o(t)}}function i(t){var e;t.done?l(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}i((r=r.apply(t,e||[])).next())}))};let l,{swagger_url:o="swagger-example.json"}=e,c={};$(()=>r(void 0,void 0,void 0,(function*(){const t=yield fetch(o);n(1,l=yield t.json())})));return t.$$set=t=>{"swagger_url"in t&&n(3,o=t.swagger_url)},[c,l,t=>{const e=t.replace("#/","").split("/");return l[e[0]][e[1]][e[2]]},o,t=>n(0,c[""+t]=!c[""+t],c)]}return new class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),E(this,t,dt,at,o,{swagger_url:3})}}({target:document.body})}();
//# sourceMappingURL=bundle.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet