1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.constructUrl = void 0;
|
4 | var url_1 = require("url");
|
5 | exports.constructUrl = function (storybookUrl, id) {
|
6 | var storyUrl = "/iframe.html?id=" + id;
|
7 | var _a = new url_1.URL(storybookUrl), protocol = _a.protocol, host = _a.host, pathname = _a.pathname, search = _a.search;
|
8 | var pname = pathname.replace(/\/$/, '');
|
9 | var query = search.replace('?', '&');
|
10 | return protocol + "//" + host + pname + storyUrl + query;
|
11 | };
|