From 61d79f599b285de7ff07e53d7c28ac1fef6df87a Mon Sep 17 00:00:00 2001 From: acelaya Date: Mon, 27 Sep 2021 20:57:06 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@785806b7a1781612e0fce8c72182c563d166b648?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- develop/asset-manifest.json | 4 ++-- develop/index.html | 2 +- .../js/{main.89526a11.chunk.js => main.65b3888f.chunk.js} | 4 ++-- ...{main.89526a11.chunk.js.map => main.65b3888f.chunk.js.map} | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename develop/static/js/{main.89526a11.chunk.js => main.65b3888f.chunk.js} (94%) rename develop/static/js/{main.89526a11.chunk.js.map => main.65b3888f.chunk.js.map} (95%) diff --git a/develop/asset-manifest.json b/develop/asset-manifest.json index 8c008637..5157b894 100644 --- a/develop/asset-manifest.json +++ b/develop/asset-manifest.json @@ -1,7 +1,7 @@ { "main.css": "/shlink-web-client/develop/static/css/main.14ee49ff.chunk.css", - "main.js": "/shlink-web-client/develop/static/js/main.89526a11.chunk.js", - "main.js.map": "/shlink-web-client/develop/static/js/main.89526a11.chunk.js.map", + "main.js": "/shlink-web-client/develop/static/js/main.65b3888f.chunk.js", + "main.js.map": "/shlink-web-client/develop/static/js/main.65b3888f.chunk.js.map", "runtime~main.js": "/shlink-web-client/develop/static/js/runtime~main.fadb821e.js", "runtime~main.js.map": "/shlink-web-client/develop/static/js/runtime~main.fadb821e.js.map", "static/css/2.bfc52f08.chunk.css": "/shlink-web-client/develop/static/css/2.bfc52f08.chunk.css", diff --git a/develop/index.html b/develop/index.html index f12010f6..33da5ee6 100644 --- a/develop/index.html +++ b/develop/index.html @@ -1 +1 @@ -Shlink — The URL shortener
\ No newline at end of file +Shlink — The URL shortener
\ No newline at end of file diff --git a/develop/static/js/main.89526a11.chunk.js b/develop/static/js/main.65b3888f.chunk.js similarity index 94% rename from develop/static/js/main.89526a11.chunk.js rename to develop/static/js/main.65b3888f.chunk.js index 334d67cc..591a1ca6 100644 --- a/develop/static/js/main.89526a11.chunk.js +++ b/develop/static/js/main.65b3888f.chunk.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{107:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(3),c=r(0),a=r(1);function s(e){return function(t){return Object(a.useEffect)((function(){t.resetSelectedServer()}),[]),Object(c.jsx)(e,Object(n.a)({},t))}}},108:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return c}));var n=function(e,t,r){var n=e.document,c=n.createElement("a");c.setAttribute("href",t),c.setAttribute("download",r),c.style.visibility="hidden",n.body.appendChild(c),c.click(),n.body.removeChild(c)},c=function(e,t,r){var c=new Blob([t],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(c);n(e,a,r)}},158:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/develop"}')},161:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),a=function(e){var t=e.color,r=void 0===t?c.c:t,a=e.className;return Object(n.jsx)("svg",{className:a,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsxs)("g",{fill:r,children:[Object(n.jsx)("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),Object(n.jsx)("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),Object(n.jsx)("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),Object(n.jsx)("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})})}},162:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(0),a=r(1),s=r(54),i=r(31),o=r(68);function l(e,t){return function(r){var l=r.selectServer,u=r.selectedServer,d=r.match;return Object(a.useEffect)((function(){l(d.params.serverId)}),[d.params.serverId]),u?Object(i.c)(u)?Object(c.jsx)(t,{}):Object(c.jsx)(e,Object(n.a)({},r)):Object(c.jsx)(o.a,{children:Object(c.jsx)(s.a,{loading:!0})})}}},164:function(e,t,r){"use strict";var n=r(0),c=r(25),a=r(37);t.a=function(e){var t=e.to,r=void 0===t?"/":t,s=e.children,i=void 0===s?"Home":s;return Object(n.jsx)("div",{className:"home",children:Object(n.jsxs)(a.a,{className:"p-4",children:[Object(n.jsx)("h2",{children:"Oops! We could not find requested route."}),Object(n.jsx)("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),Object(n.jsx)("br",{}),Object(n.jsx)(c.b,{to:r,className:"btn btn-outline-primary btn-lg",children:i})]})})}},176:function(e,t,r){"use strict";var n=r(0),c=r(685),a=r(686),s=r(25),i=r(8),o=r.n(i),l=r(14),u=r(11),d=function(e){var t=e.id,r=e.name;return Object(n.jsxs)(c.a,{tag:s.b,to:"/server/".concat(t),className:"servers-list__server-item",children:[r,Object(n.jsx)(l.a,{icon:u.j,className:"servers-list__server-item-icon"})]})};t.a=function(e){var t=e.servers,r=e.children,c=e.embedded,s=void 0!==c&&c;return Object(n.jsxs)(n.Fragment,{children:[r&&Object(n.jsx)("h5",{className:"mb-md-3",children:r}),t.length>0&&Object(n.jsx)(a.a,{className:o()("servers-list__list-group",{"servers-list__list-group--embedded":s}),children:t.map((function(e){var t=e.id,r=e.name;return Object(n.jsx)(d,{id:t,name:r},t)}))})]})}},27:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(9),c=r(1),a=r(317),s=r(53),i=function(e,t){return function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,s=Object(c.useState)(r),i=Object(n.a)(s,2),o=i[0],l=i[1],u=Object(c.useRef)(void 0),d=function(){l(!r),u.current&&t(u.current),u.current=e((function(){return l(r)}),a)};return[o,d]}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(c.useState)(e),r=Object(n.a)(t,2),a=r[0],s=r[1];return[a,function(){return s(!a)},function(){return s(!0)},function(){return s(!1)}]},l=function(e,t){var r=function(e){return function(t){t.event.composedPath().some((function(e){var t=e.classList;return null===t||void 0===t?void 0:t.contains("visits-table")}))||document.querySelector(".modal")||e()}};return Object(a.useSwipeable)({delta:40,onSwipedLeft:r(t),onSwipedRight:r(e)})},u=function(e,t){var r=Object(c.useState)(t),a=Object(n.a)(r,2),i=a[0],o=a[1];return[i,function(t){var r=window,n=r.location,c=r.history,a=Object(s.a)(n.search);a[e]=t,c.pushState(null,"","".concat(n.pathname,"?").concat(Object(s.b)(a))),o(t)}]}},29:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"d",(function(){return l})),r.d(t,"c",(function(){return u})),r.d(t,"e",(function(){return d})),r.d(t,"a",(function(){return j}));var n=r(674),c=r(232),a=r(355),s=r(673),i=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Object(n.a)(r,e+1).map(t)},l=function(e){return!Object(c.a)(e)&&!Object(a.a)(e)},u=function(e){return Object(s.a)((function(e){return e.preventDefault()}),e)},d=function(e){return Object(a.a)(e)?null:e},j=function(e){return"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}},31:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"e",(function(){return c})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return i}));var n=function(e){return!(null===e||void 0===e||!e.url)&&!(null===e||void 0===e||!e.apiKey)},c=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("id"))},a=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("version"))},s=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("serverNotFound"))},i=function(e){return c(e)?e.id:""}},314:function(e,t,r){"use strict";(function(e){var n=r(315),c=r.n(n),a=r(316),s=r(347),i=r(348),o=r(349),l=r(350),u=r(318),d=r(345),j=r(107),b=r(320);t.a=function(t,r,n){t.constant("window",e.window),t.constant("console",e.console),t.constant("axios",c.a),t.service("ImageDownloader",b.a,"axios","window"),t.serviceFactory("ScrollToTop",a.a),t.decorator("ScrollToTop",n),t.serviceFactory("MainHeader",s.a,"ServersDropdown"),t.decorator("MainHeader",n),t.serviceFactory("Home",(function(){return i.a})),t.decorator("Home",j.a),t.decorator("Home",r(["servers"],["resetSelectedServer"])),t.serviceFactory("MenuLayout",o.a,"TagsList","ShortUrls","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),t.decorator("MenuLayout",r(["selectedServer","shortUrlsListParams"],["selectServer"])),t.decorator("MenuLayout",n),t.serviceFactory("AsideMenu",l.a,"DeleteServerButton"),t.serviceFactory("ShlinkVersionsContainer",(function(){return d.a})),t.decorator("ShlinkVersionsContainer",r(["selectedServer"])),t.serviceFactory("ErrorHandler",u.a,"window","console")}}).call(this,r(48))},316:function(e,t,r){"use strict";var n=r(0),c=r(1);t.a=function(){return function(e){var t=e.location,r=e.children;return Object(c.useEffect)((function(){scrollTo(0,0)}),[t]),Object(n.jsx)(n.Fragment,{children:r})}}},318:function(e,t,r){"use strict";var n=r(18),c=r(24),a=r(36),s=r(35),i=r(0),o=r(1),l=r(236),u=r(37);t.a=function(e,t){var r=e.location,d=t.error;return function(e){Object(a.a)(o,e);var t=Object(s.a)(o);function o(e){var r;return Object(n.a)(this,o),(r=t.call(this,e)).state={hasError:!1},r}return Object(c.a)(o,[{key:"componentDidCatch",value:function(e){d(e)}},{key:"render",value:function(){return this.state.hasError?Object(i.jsx)("div",{className:"home",children:Object(i.jsxs)(u.a,{className:"p-4",children:[Object(i.jsx)("h1",{children:"Oops! This is awkward :S"}),Object(i.jsx)("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),Object(i.jsx)("br",{}),Object(i.jsx)(l.a,{outline:!0,color:"primary",onClick:function(){return r.reload()},children:"Take me back"})]})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),o}(o.Component)}},320:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(15),s=r(18),i=r(24),o=r(108),l=function(){function e(t,r){Object(s.a)(this,e),this.axios=t,this.window=r}return Object(i.a)(e,[{key:"saveImage",value:function(){var e=Object(a.a)(c.a.mark((function e(t,r){var n,a,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get(t,{responseType:"blob"});case 2:n=e.sent,a=n.data,s=URL.createObjectURL(a),Object(o.b)(this.window,s,r);case 6:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}()},336:function(e,t,r){"use strict";(function(e){var n=r(27),c=r(337),a=r(338);t.a=function(t){t.constant("localStorage",e.localStorage),t.service("Storage",c.a,"localStorage"),t.service("ColorGenerator",a.a,"Storage"),t.constant("setTimeout",e.setTimeout),t.constant("clearTimeout",e.clearTimeout),t.serviceFactory("useStateFlagTimeout",n.b,"setTimeout","clearTimeout")}}).call(this,r(48))},337:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(18),c=function(e){return"".concat("shlink",".").concat(e)},a=function e(t){var r=this;Object(n.a)(this,e),this.localStorage=t,this.get=function(e){var t=r.localStorage.getItem(c(e));return t?JSON.parse(t):void 0},this.set=function(e,t){return r.localStorage.setItem(c(e),JSON.stringify(t))}}},338:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(18),c=r(29),a=Math.floor,s=Math.random,i="0123456789ABCDEF",o=function(e){return e.toLowerCase().trim()},l=function e(t){var r,l=this;Object(n.a)(this,e),this.storage=t,this.colors=void 0,this.getColorForKey=function(e){var t=o(e),r=l.colors[t];return r||l.setColorForKey(t,"#".concat(Object(c.f)(6,(function(){return i[a(s()*i.length)]})).join("")))},this.setColorForKey=function(e,t){var r=o(e);return l.colors[r]=t,l.storage.set("colors",l.colors),t},this.colors=null!==(r=this.storage.get("colors"))&&void 0!==r?r:{}}},345:function(e,t,r){"use strict";var n=r(0),c=r(8),a=r.n(c),s=r(31),i=r(673),o=r(51),l=r(69),u=Object(i.a)(Object(l.c)(),l.b),d=function(e){var t=e.project,r=e.version;return Object(n.jsx)(o.a,{href:"https://github.com/shlinkio/".concat(t,"/releases/").concat(r),className:"text-muted",children:Object(n.jsx)("b",{children:r})})},j=function(e){var t=e.selectedServer,r=e.clientVersion,c=u(void 0===r?"%_VERSION_%":r);return Object(n.jsxs)("small",{className:"text-muted",children:[Object(s.d)(t)&&Object(n.jsxs)(n.Fragment,{children:["Server: ",Object(n.jsx)(d,{project:"shlink",version:t.printableVersion})," - "]}),"Client: ",Object(n.jsx)(d,{project:"shlink-web-client",version:c})]})};t.a=function(e){var t=e.selectedServer,r=a()("text-center",{"shlink-versions-container--with-server":Object(s.d)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},347:function(e,t,r){"use strict";var n=r(9),c=r(0),a=r(11),s=r(14),i=r(1),o=r(25),l=r(678),u=r(679),d=r(680),j=r(681),b=r(682),h=r(683),O=r(684),v=r(8),f=r.n(v),m=r(27),g=r(161);t.a=function(e){return function(t){var r=t.location,v=Object(m.d)(),x=Object(n.a)(v,4),p=x[0],S=x[1],y=x[3],C=r.pathname;Object(i.useEffect)(y,[r]);var N="/settings",w=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":p});return Object(c.jsxs)(l.a,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[Object(c.jsxs)(u.a,{tag:o.b,to:"/",children:[Object(c.jsx)(g.a,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),Object(c.jsx)(d.a,{onClick:S,children:Object(c.jsx)(s.a,{icon:a.i,className:w})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:p,children:Object(c.jsxs)(b.a,{navbar:!0,className:"ml-auto",children:[Object(c.jsx)(h.a,{children:Object(c.jsxs)(O.a,{tag:o.b,to:N,active:C===N,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},348:function(e,t,r){"use strict";var n=r(0),c=r(687),a=r(355),s=r(25),i=r(353),o=r(669),l=r(51),u=r(14),d=r(11),j=r(176),b=r(161);t.a=function(e){var t=e.servers,r=Object(c.a)(t),h=!Object(a.a)(r);return Object(n.jsx)("div",{className:"home",children:Object(n.jsx)(i.a,{className:"home__main-card",children:Object(n.jsxs)(o.a,{noGutters:!0,children:[Object(n.jsx)("div",{className:"col-md-5 d-none d-md-block",children:Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)(b.a,{})})}),Object(n.jsxs)("div",{className:"col-md-7 home__servers-container",children:[Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)("h1",{className:"home__title",children:"Welcome!"})}),Object(n.jsx)(j.a,{embedded:!0,servers:r,children:!h&&Object(n.jsxs)("div",{className:"p-4 text-center",children:[Object(n.jsx)("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),Object(n.jsx)("p",{children:Object(n.jsxs)(s.b,{to:"/server/create",className:"btn btn-outline-primary btn-lg mr-2",children:[Object(n.jsx)(u.a,{icon:d.C})," ",Object(n.jsx)("span",{className:"ml-1",children:"Add a server"})]})}),Object(n.jsx)("p",{className:"mb-0 mt-5",children:Object(n.jsx)(l.a,{href:"https://shlink.io/documentation",children:Object(n.jsxs)("small",{children:[Object(n.jsx)("span",{className:"mr-1",children:"Learn more about Shlink"})," ",Object(n.jsx)(u.a,{icon:d.o})]})})})]})})]})]})})})}},349:function(e,t,r){"use strict";var n=r(3),c=r(9),a=r(0),s=r(1),i=r(41),o=r(11),l=r(14),u=r(8),d=r.n(u),j=r(162),b=r(27),h=r(43),O=r(31),v=r(164);t.a=function(e,t,r,u,f,m,g,x,p,S,y){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,w=Object(b.d)(),_=Object(c.a)(w,4),k=_[0],U=_[1],T=_[2],R=_[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.d)(N))return Object(a.jsx)(x,{});var E=Object(h.d)(N),D=Object(h.c)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":k}),V=Object(b.c)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:L,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},V),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:k}),Object(a.jsx)("div",{className:"menu-layout__container",onClick:function(){return R()},children:Object(a.jsx)("div",{className:"container-xl",children:Object(a.jsxs)(i.d,{children:[Object(a.jsx)(i.a,{exact:!0,from:"/server/:serverId",to:"/server/:serverId/overview"}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/overview",component:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/list-short-urls/:page",component:t}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/create-short-url",component:u}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/visits",component:f}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/edit",component:S}),Object(a.jsx)(i.b,{path:"/server/:serverId/tag/:tag/visits",component:m}),E&&Object(a.jsx)(i.b,{path:"/server/:serverId/orphan-visits",component:g}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),D&&Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-domains",component:y}),Object(a.jsx)(i.b,{render:function(){return Object(a.jsx)(v.a,{to:"/server/".concat(N.id,"/list-short-urls/1"),children:"List short URLs"})}})]})})})]})}))]})}),x)}},350:function(e,t,r){"use strict";var n=r(3),c=r(42),a=r(0),s=r(11),i=r(14),o=r(25),l=r(8),u=r.n(l),d=r(31),j=r(43),b=function(e){var t=e.children,r=e.to,s=e.className,i=Object(c.a)(e,["children","to","className"]);return Object(a.jsx)(o.c,Object(n.a)(Object(n.a)({className:u()("aside-menu__item",s),activeClassName:"aside-menu__item--selected",to:r},i),{},{children:t}))};t.a=function(e){return function(t){var r=t.selectedServer,n=t.showOnMobile,c=void 0!==n&&n,o=Object(d.e)(r)?r.id:"",l=Object(j.c)(r),h=u()("aside-menu",{"aside-menu--hidden":!c}),O=function(e){return"/server/".concat(o).concat(e)};return Object(a.jsx)("aside",{className:h,children:Object(a.jsxs)("nav",{className:"nav flex-column aside-menu__nav",children:[Object(a.jsxs)(b,{to:O("/overview"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.s}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Overview"})]}),Object(a.jsxs)(b,{to:O("/list-short-urls/1"),isActive:function(e,t){return null!==t.pathname.match("/list-short-urls")},children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.v}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),Object(a.jsxs)(b,{to:O("/create-short-url"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.u,flip:"horizontal"}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),Object(a.jsxs)(b,{to:O("/manage-tags"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.L}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),l&&Object(a.jsxs)(b,{to:O("/manage-domains"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.r}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),Object(a.jsxs)(b,{to:O("/edit"),className:"aside-menu__item--push",children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.A}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),Object(d.e)(r)&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},356:function(e,t,r){e.exports=r(665)},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(42),a=r(0),s=r(353),i=r(671),o=r(672),l=function(e){var t=e.title,r=e.children,l=e.bodyClassName,u=Object(c.a)(e,["title","children","bodyClassName"]);return Object(a.jsxs)(s.a,Object(n.a)(Object(n.a)({},u),{},{children:[t&&Object(a.jsx)(i.a,{children:t}),Object(a.jsx)(o.a,{className:l,children:r})]}))}},43:function(e,t,r){"use strict";r.d(t,"f",(function(){return s})),r.d(t,"h",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return l})),r.d(t,"i",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"g",(function(){return b})),r.d(t,"c",(function(){return h}));var n=r(31),c=r(69),a=function(e){return function(t){return Object(n.d)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.5.0"}),i=a({minVersion:"2.6.0"}),o=i,l=i,u=i,d=a({minVersion:"2.7.0"}),j=d,b=a({minVersion:"2.8.0"}),h=b},441:function(e,t){},443:function(e,t){},46:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return u}));var n="#4696e5",c="rgba(70, 150, 229, 0.4)",a="#f77f28",s="rgba(247, 127, 40, 0.4)",i="white",o="#161b22",l=function(e){var t,r=document.getElementsByTagName("html");null===r||void 0===r||null===(t=r[0])||void 0===t||t.setAttribute("data-theme",e)},u=function(){var e,t=document.getElementsByTagName("html");return"dark"===(null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.getAttribute("data-theme"))}},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(231),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},54:function(e,t,r){"use strict";var n=r(0),c=r(669),a=r(353),s=r(8),i=r.n(s),o=r(11),l=r(14),u=function(e){return{error:"border-danger",default:""}[e]},d=function(e){return{error:"text-danger",default:"text-muted"}[e]};t.a=function(e){var t=e.className,r=e.children,s=e.loading,j=void 0!==s&&s,b=e.type,h=void 0===b?"default":b,O=e.fullWidth,v=void 0!==O&&O,f=i()({"col-md-12":v,"col-md-10 offset-md-1":!v});return Object(n.jsx)(c.a,{noGutters:!0,className:t,children:Object(n.jsx)("div",{className:f,children:Object(n.jsx)(a.a,{className:u(h),body:!0,children:Object(n.jsxs)("h3",{className:i()("text-center mb-0",d(h)),children:[j&&Object(n.jsx)(l.a,{icon:o.k,spin:!0}),j&&Object(n.jsx)("span",{className:"ml-2",children:null!==r&&void 0!==r?r:"Loading..."}),!j&&r]})})})})}},665:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return ha})),r.d(n,"normalizeVisits",(function(){return Oa}));var c,a=r(0),s=r(49),i=r(174),o=r(25),l=r(158),u=r(10),d=r(3),j=r(313),b=r(41),h=r(735),O=r(740),v=r(31),f=r(6),m=r.n(f),g=r(15),x=r(18),p=r(346),S=r(232),y=r(355),C=r(53),N=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(p.a)(S.a),_=function e(t,r,n){var c=this;Object(x.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(g.a)(m.a.mark((function e(){var t,r=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.abrupt("return",c.performRequest("/short-urls","GET",t).then((function(e){return e.data.shortUrls})));case 2:case"end":return e.stop()}}),e)}))),this.createShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(p.a)((function(e){return Object(y.a)(e)||Object(S.a)(e)}),t),e.abrupt("return",c.performRequest("/short-urls","POST",{},r).then((function(e){return e.data})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getShortUrlVisits=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getTagVisits=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getOrphanVisits=function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits/orphan","GET",t).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getVisitsOverview=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits","GET").then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)}))),this.getShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"GET",{domain:r}).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.deleteShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"DELETE",{domain:r}).then((function(){})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.updateShortUrlTags=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/tags"),"PUT",{domain:r},{tags:n}).then((function(e){return e.data.tags})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.updateShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"PATCH",{domain:r},n).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.listTags=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","GET",{withStats:"true"}).then((function(e){return e.data.tags})).then((function(e){return{tags:e.data,stats:e.stats}})));case 1:case"end":return e.stop()}}),e)}))),this.deleteTags=function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","DELETE",{tags:t}).then((function(){return{tags:t}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.editTag=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","PUT",{},{oldName:t,newName:r}).then((function(){return{oldName:t,newName:r}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.health=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/health","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.mercureInfo=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/mercure-info","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.listDomains=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains","GET").then((function(e){return e.data.domains.data})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains/redirects","PATCH",{},t).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.performRequest=function(){var e=Object(g.a)(m.a.mark((function e(t){var r,n,a,s,i=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:"GET",n=i.length>2&&void 0!==i[2]?i[2]:{},a=i.length>3&&void 0!==i[3]?i[3]:{},e.prev=3,e.next=6,c.axios({method:r,url:"".concat(N(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:C.b});case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),s=e.t0.response,!s&&2!==c.apiVersion){e.next=15;break}throw e.t0;case 15:return c.apiVersion=c.apiVersion-1,e.next=18,c.performRequest(t,r,n,a);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),this.apiVersion=2},k={},U=function(e){return function(t){var r,n=function(e){return"function"===typeof e}(t)?(r=t,Object(O.a)("selectedServer",r())):t;if(!Object(v.b)(n))throw new Error("There's no selected server or it is not found");var c=n.url,a=n.apiKey,s="".concat(c,"_").concat(a);return k[s]||(k[s]=new _(e,c,a)),k[s]}},T=function(e){e.serviceFactory("buildShlinkApiClient",U,"axios")},R=r(314),E=r(9),D=r(1),L=function(e,t){return function(r){var n,c=r.match,s=null!==(n=null===c||void 0===c?void 0:c.params)&&void 0!==n?n:{},i=s.page,o=void 0===i?"1":i,l=s.serverId,u=void 0===l?"":l,j=Object(D.useState)("".concat(u,"_").concat(o)),b=Object(E.a)(j,2),h=b[0],O=b[1];return Object(D.useEffect)((function(){O("".concat(u,"_").concat(o))}),[u,o]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"form-group",children:Object(a.jsx)(e,{})}),Object(D.createElement)(t,Object(d.a)(Object(d.a)({},r),{},{key:h}))]})}},V=r(11),I=r(14),F=r(673),A=r(431),M=r(8),G=r.n(M),P=function(e){var t=e.onChange,r=e.className,n=e.large,s=void 0===n||n,i=e.noBorder,o=void 0!==i&&i,l=Object(D.useState)(""),u=Object(E.a)(l,2),d=u[0],j=u[1],b=function(){c&&clearTimeout(c),c=null},h=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;j(e),b(),c=setTimeout((function(){t(e),b()}),r)};return Object(a.jsxs)("div",{className:G()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:G()("form-control search-field__input",{"form-control-lg":s,"search-field__input--no-border":o}),placeholder:"Search...",value:d,onChange:function(e){return h(e.target.value)}}),Object(a.jsx)(I.a,{icon:V.F,className:"search-field__icon"}),Object(a.jsx)("div",{className:"close search-field__close",hidden:""===d,id:"search-field__close",onClick:function(){return h("",0)},children:"\xd7"})]})},B=function(e){var t=e.text,r=e.children,n=e.clearable,c=e.className,s=void 0===c?"":c,i=e.colorGenerator,o=e.onClick,l=e.onClose;return Object(a.jsxs)("span",{className:"badge tag ".concat(s),style:{backgroundColor:i.getColorForKey(t),cursor:n||!o?"auto":"pointer"},onClick:o,children:[null!==r&&void 0!==r?r:t,n&&Object(a.jsx)("span",{className:"close tag__close-selected-tag",onClick:l,children:"\xd7"})]})},H=r(691),W=r(135),q=r(688),z=r(689),K=r(27),Q=function(e){var t=e.text,r=e.disabled,n=void 0!==r&&r,c=e.className,s=void 0===c?"":c,i=e.children,o=e.dropdownClassName,l=e.right,u=void 0!==l&&l,d=e.minWidth,j=Object(K.d)(),b=Object(E.a)(j,2),h=b[0],O=b[1],v="dropdown-btn__toggle btn-block ".concat(s),f={minWidth:d&&"".concat(d,"px")};return Object(a.jsxs)(W.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(q.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(z.a,{className:"w-100",right:u,style:f,children:i})]})},J=r(92),Z=r(397),Y=r(219),X=r(344),$=r(667),ee=r(690),te=(r(666),function(e){return"string"!==typeof e}),re=function(e,t){return e&&te(e)?t?Object($.default)(e,t):Object(ee.a)(e):e},ne=function(e){return re(e,void 0)},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return re(t,e)}}(),ae=function(e){return void 0===e||Object(y.a)(Object(X.a)(Boolean,e))},se=function(e){return"string"===typeof e},ie={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180days:"Last 180 days",last365Days:"Last 365 days"},oe=Object.keys(ie),le=function(e){if(e)return se(e)?ie[e]:function(e){if(e&&!ae(e))return e.startDate&&!e.endDate?"Since ".concat(ce(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ce(e.endDate)):"".concat(ce(e.startDate)," - ").concat(ce(e.endDate))}(e)},ue=function(e){return Object(J.default)(Object(Z.default)(new Date,e))},de=function(e){return{startDate:e,endDate:Object(Y.default)(new Date)}},je=function(e){if(!e)return{};switch(e){case"today":return de(Object(J.default)(new Date));case"yesterday":return{startDate:ue(1),endDate:Object(Y.default)(Object(Z.default)(new Date,1))};case"last7Days":return de(ue(7));case"last30Days":return de(ue(30));case"last90Days":return de(ue(90));case"last180days":return de(ue(180));case"last365Days":return de(ue(365))}return{}},be=r(322),he=r.n(be),Oe=r(113),ve=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(S.a)(n),s=Object(D.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(he.a,Object(d.a)(Object(d.a)({},e),{},{dateFormat:"yyyy-MM-dd",className:G()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(I.a,{icon:Oe.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},fe=function(e){var t=e.startDate,r=void 0===t?null:t,n=e.endDate,c=void 0===n?null:n,s=e.disabled,i=void 0!==s&&s,o=e.onStartDateChange,l=e.onEndDateChange;return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ve,{selected:r,placeholderText:"Since...",isClearable:!0,maxDate:null!==c&&void 0!==c?c:void 0,disabled:i,onChange:o})}),Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ve,{className:"mt-2 mt-md-0",selected:c,placeholderText:"Until...",isClearable:!0,minDate:null!==r&&void 0!==r?r:void 0,disabled:i,onChange:l})})]})},me=function(e){var t=e.active,r=e.onChange;return Object(a.jsx)(a.Fragment,{children:oe.map((function(e){return Object(a.jsx)(H.a,{active:t===e,onClick:function(){return r(e)},children:le(e)},e)}))})},ge=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=Object(D.useState)(se(n)?n:void 0),o=Object(E.a)(i,2),l=o[0],u=o[1],j=Object(D.useState)(se(n)?void 0:n),b=Object(E.a)(j,2),h=b[0],O=b[1],v=function(e){u(void 0),O(e),r(e)},f=function(e){return function(){u(e),O(void 0),r(je(e))}};return Object(a.jsxs)(Q,{disabled:s,text:null!==(t=le(null!==l&&void 0!==l?l:h))&&void 0!==t?t:c,children:[Object(a.jsx)(H.a,{active:void 0===l&&ae(h),onClick:f(void 0),children:c}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(me,{active:l,onChange:function(e){return f(e)()}}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{header:!0,children:"Custom:"}),Object(a.jsx)(H.a,{text:!0,children:Object(a.jsx)(fe,Object(d.a)(Object(d.a)({},h),{},{onStartDateChange:function(e){return v(Object(d.a)(Object(d.a)({},h),{},{startDate:e}))},onEndDateChange:function(e){return v(Object(d.a)(Object(d.a)({},h),{},{endDate:e}))}}))})]})},xe=function(e){return e?Object(A.default)(e):null},pe=function(e){return function(t){var r,n=t.listShortUrls,c=t.shortUrlsListParams,s=null!==(r=c.tags)&&void 0!==r?r:[],i=Object(F.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=ne(n))&&void 0!==t?t:void 0,endDate:null!==(r=ne(c))&&void 0!==r?r:void 0}}),(function(e){return n(Object(d.a)(Object(d.a)({},c),e))}));return Object(a.jsxs)("div",{className:"search-bar-container",children:[Object(a.jsx)(P,{onChange:function(e){return n(Object(d.a)(Object(d.a)({},c),{},{searchTerm:e}))}}),Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)("div",{className:"row",children:Object(a.jsx)("div",{className:"col-lg-8 offset-lg-4 col-xl-6 offset-xl-6",children:Object(a.jsx)(ge,{defaultText:"All short URLs",initialDateRange:{startDate:xe(c.startDate),endDate:xe(c.endDate)},onDatesChange:i})})})}),!Object(y.a)(s)&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(I.a,{icon:V.L,className:"search-bar__tags-icon"}),"\xa0",s.map((function(t){return Object(a.jsx)(B,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return n(Object(d.a)(Object(d.a)({},c),{},{tags:s.filter((function(e){return e!==t}))}))}},t)}))]})]})}},Se=r(26),ye=r(701),Ce=r(59),Ne=r(687),we=r(353),_e=r(692),ke=r(693),Ue=r(29);function Te(e){var t=e.items,r=e.orderField,n=e.orderDir,c=e.onChange,s=e.isButton,i=void 0===s||s,o=e.right,l=void 0!==o&&o,u=function(e){return function(){var t=Object(Ue.b)(e,r,n);c(t?e:void 0,t)}};return Object(a.jsxs)(_e.a,{children:[Object(a.jsxs)(q.a,{caret:!0,color:i?"primary":"link",className:G()({"dropdown-btn__toggle btn-block":i,"btn-sm p-0":!i}),children:[!i&&Object(a.jsx)(a.Fragment,{children:"Order by"}),i&&!r&&Object(a.jsx)(a.Fragment,{children:"Order by..."}),i&&r&&'Order by: "'.concat(t[r],'" - "').concat(null!==n&&void 0!==n?n:"DESC",'"')]}),Object(a.jsxs)(z.a,{right:l,className:G()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(ke.a)(t).map((function(e){var t=Object(E.a)(e,2),c=t[0],s=t[1];return Object(a.jsxs)(H.a,{active:r===c,onClick:u(c),children:[s,r===c&&Object(a.jsx)(I.a,{icon:"ASC"===n?V.I:V.H,className:"sorting-dropdown__sort-icon"})]},c)})),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{disabled:!r,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Re=r(323);function Ee(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(D.useEffect)((function(){var e=function(e,t,r,n){var c=e.mercureHubUrl,a=e.token,s=e.loading,i=e.error;if(!s&&!i&&c){var o=function(e){var t=e.data;return r(JSON.parse(t))},l=function(e){return 401===e.status&&n()},u=t.map((function(e){var t=new URL(c);t.searchParams.append("topic",e);var r=new Re.EventSourcePolyfill(t,{headers:{Authorization:"Bearer ".concat(a)}});return r.onmessage=o,r.onerror=l,r}));return function(){return u.forEach((function(e){return e.close()}))}}}(i,t(n),(function(e){return o?r.add(e):c([e])}),s);if(!o)return e;var a=setInterval((function(){c(Object(Se.a)(r)),r.clear()}),1e3*o*60);return Object(F.a)((function(){return clearInterval(a)}),(function(){return null===e||void 0===e?void 0:e()}))}),[i]),Object(a.jsx)(e,Object(d.a)({},n))}}var De=function e(){Object(x.a)(this,e)};De.visits="https://shlink.io/new-visit",De.orphanVisits="https://shlink.io/new-orphan-visit",De.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Le,Ve,Ie,Fe,Ae,Me,Ge,Pe,Be,He,We,qe,ze,Ke,Qe,Je,Ze,Ye,Xe,$e=function(e,t){return function(r,n){var c=n.type,a=e[c],s=null!==r&&void 0!==r?r:t;return a?a(s,n):s}},et=function(e){return function(){return{type:e}}},tt=r(694),rt=r(695),nt=r(324),ct=r(696),at=function(e,t,r){return Object(S.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},st="shlink/visitCreation/CREATE_VISITS",it=function(e){return{type:st,createdVisits:e}},ot=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},lt=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},ut="shlink/deleteShortUrl/DELETE_SHORT_URL_START",dt="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",jt="shlink/deleteShortUrl/SHORT_URL_DELETED",bt="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",ht={shortCode:"",loading:!1,error:!1},Ot=$e((Le={},Object(u.a)(Le,ut,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Le,dt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Le,jt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Le,bt,(function(){return ht})),Le),ht),vt=function(e){return function(t,r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:ut}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:jt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:dt,errorData:ot(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},ft=et(bt),mt="shlink/createShortUrl/CREATE_SHORT_URL_START",gt="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",xt="shlink/createShortUrl/CREATE_SHORT_URL",pt="shlink/createShortUrl/RESET_CREATE_SHORT_URL",St={result:null,saving:!1,error:!1},yt=$e((Ve={},Object(u.a)(Ve,mt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ve,gt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Ve,xt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Ve,pt,(function(){return St})),Ve),St),Ct=function(e){return function(t){return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:mt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:xt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:gt,errorData:ot(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Nt=et(pt),wt=r(43),_t="shlink/shortUrlEdition/EDIT_SHORT_URL_START",kt="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Ut="shlink/shortUrlEdition/SHORT_URL_EDITED",Tt=$e((Ie={},Object(u.a)(Ie,_t,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ie,kt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Ie,Ut,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),Ie),{saving:!1,error:!1}),Rt=function(e){return function(t,r,n){return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,d,j,b,h,O;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return a({type:_t}),i=s(),o=i.selectedServer,l=!Object(wt.i)(o),u=e(s),d=u.updateShortUrl,j=u.updateShortUrlTags,c.prev=4,c.next=7,Promise.all([d(t,r,n),l&&n.tags?j(t,r,n.tags):void 0]);case 7:b=c.sent,h=Object(E.a)(b,1),O=h[0],a({shortUrl:O,type:Ut}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:kt,errorData:ot(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},Et="shlink/shortUrlsList/LIST_SHORT_URLS_START",Dt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Lt="shlink/shortUrlsList/LIST_SHORT_URLS",Vt=$e((Fe={},Object(u.a)(Fe,Et,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Fe,Dt,(function(){return{loading:!1,error:!0}})),Object(u.a)(Fe,Lt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Fe,jt,Object(F.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(tt.a)(["shortUrls","data"],Object(p.a)((function(e){return at(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(tt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Fe,st,(function(e,t){var r,n,c=t.createdVisits;return Object(tt.a)(["shortUrls","data"],null===(r=e.shortUrls)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.map((function(e){var t=Object(rt.a)(c.filter((function(t){var r=t.shortUrl;return r&&at(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(nt.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Fe,xt,Object(F.a)((function(e,t){var r=t.result;return e.shortUrls?Object(tt.a)(["shortUrls","data"],[r].concat(Object(Se.a)(Object(ct.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(tt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Fe,Ut,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(tt.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return at(e,t,n)?r:e})),e):e})),Fe),{loading:!0,error:!1}),It=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Et}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Lt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Dt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Ft="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",At={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Mt={page:"1",orderBy:{dateCreated:"DESC"}},Gt=$e((Ae={},Object(u.a)(Ae,Lt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ae,Ft,(function(){return Mt})),Ae),Mt),Pt=et(Ft),Bt=r(698),Ht=r(699),Wt=r(700),qt=r(674),zt=r(325),Kt=r(697),Qt=Math.ceil,Jt=new Intl.NumberFormat("en-US"),Zt=function(e){return Jt.format(Number(e))},Yt="...",Xt=function(e,t){var r=Object(qt.a)(Object(zt.a)(2,e-2),Object(Kt.a)(t-1,e+2)+1);return e-2>2&&r.unshift(Yt),e+2=l,children:Object(a.jsx)(Ht.a,{next:!0,tag:o.b,to:"/server/".concat(r,"/list-short-urls/").concat(s+1)})})]})},nr=function(e){return Ee((function(t){var r,n=t.listShortUrls,c=t.resetShortUrlParams,s=t.shortUrlsListParams,i=t.match,o=t.location,l=t.shortUrlsList,j=t.selectedServer,b=s.orderBy,h=Object(D.useState)({orderField:b&&Object(ye.a)(Object(Ce.a)(b)),orderDir:b&&Object(ye.a)(Object(Ne.a)(b))}),O=Object(E.a)(h,2),f=O[0],m=O[1],g=(null!==(r=null===l||void 0===l?void 0:l.shortUrls)&&void 0!==r?r:{}).pagination,x=function(e){return n(Object(d.a)(Object(d.a)({},s),e))},p=function(e,t){m({orderField:e,orderDir:t}),x({orderBy:e?Object(u.a)({},e,t):void 0})};return Object(D.useEffect)((function(){var e=Object(C.a)(o.search).tag,t=e?[decodeURIComponent(e)]:s.tags;return x({page:i.params.page,tags:t,itemsPerPage:void 0}),c}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"d-block d-lg-none mb-3",children:Object(a.jsx)(Te,{items:At,orderField:f.orderField,orderDir:f.orderDir,onChange:p})}),Object(a.jsxs)(we.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{orderByColumn:function(e){return function(){return p(e,Object(Ue.b)(e,f.orderField,f.orderDir))}},renderOrderIcon:function(e){return f.orderField!==e?null:f.orderDir?Object(a.jsx)(I.a,{icon:"ASC"===f.orderDir?V.f:V.e,className:"short-urls-list__header-icon"}):null},selectedServer:j,shortUrlsList:l,onTagClick:function(e){var t;return x({tags:[].concat(Object(Se.a)(null!==(t=s.tags)&&void 0!==t?t:[]),[e])})}}),Object(a.jsx)(rr,{paginator:g,serverId:Object(v.d)(j)?j.id:""})]})]})}),(function(){return[De.visits]}))},cr=r(51),ar=r(170),sr=r.n(ar),ir=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(sr.a,{text:t,onCopy:r,children:Object(a.jsx)(I.a,{icon:Oe.b,className:"ml-2 copy-to-clipboard-icon"})})},or=r(702),lr=r(742),ur=function(e){var t=e.date,r=e.format,n=void 0===r?"yyyy-MM-dd HH:mm":r,c=e.relative,s=void 0!==c&&c,i=te(t)?t:Object(A.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(or.a)(i),"000"),children:s?"".concat(Object(lr.a)(new Date,i)," ago"):Object($.default)(i,n)})},dr=r(703),jr=r(42),br=function(e,t,r){var n=e.id,c=t.shortCode,a=t.domain,s=a?"?domain=".concat(a):"";return"/server/".concat(n,"/short-code/").concat(c,"/").concat(r).concat(s)},hr=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(jr.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.e)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:br(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},Or=function(e){var t,r=e.visitsCount,n=e.shortUrl,c=e.selectedServer,s=e.active,i=void 0!==s&&s,o=null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.maxVisits,l=Object(a.jsx)(hr,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:G()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:Zt(r)})});if(!o)return l;var u=Zt(o),d=Object(D.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:"indivisible",children:[l,Object(a.jsxs)("small",{className:"short-urls-visits-count__max-visits-control",ref:function(e){d.current=e},children:[" ","/ ",u," ",Object(a.jsx)("sup",{children:Object(a.jsx)(I.a,{icon:V.t})})]})]}),Object(a.jsxs)(dr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},vr=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(D.useRef)(!0);return Object(D.useEffect)((function(){m.current?m.current=!1:f()}),[i.visitsCount]),Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:Object(a.jsx)(ur,{date:i.dateCreated})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:Object(a.jsxs)("span",{className:"indivisible short-urls-row__cell--relative",children:[Object(a.jsx)(cr.a,{href:i.shortUrl}),Object(a.jsx)(ir,{text:i.shortUrl,onCopy:b}),Object(a.jsx)("span",{className:"badge badge-warning short-urls-row__copy-hint",hidden:!j,children:"Copied short URL!"})]})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":"".concat(i.title?"Title":"Long URL"),children:Object(a.jsx)(cr.a,{href:i.longUrl,children:null!==(c=i.title)&&void 0!==c?c:i.longUrl})}),i.title&&Object(a.jsx)("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:Object(a.jsx)(cr.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(y.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(B,{colorGenerator:t,text:e,onClick:function(){return null===l||void 0===l?void 0:l(e)}},e)})))}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(Or,{visitsCount:i.visitsCount,shortUrl:i,selectedServer:o,active:v})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell",children:Object(a.jsx)(e,{selectedServer:o,shortUrl:i})})]})}},fr=r(704),mr=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(fr.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(q.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(I.a,{icon:V.n}),"\xa0"]}),Object(a.jsx)(z.a,{right:s,children:n})]})},gr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(K.d)(),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(K.d)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(K.d)(),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(mr,{toggle:l,isOpen:o,children:[Object(a.jsxs)(H.a,{tag:hr,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(I.a,{icon:V.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(H.a,{tag:hr,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(H.a,{onClick:b,children:[Object(a.jsx)(I.a,{icon:V.D,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsxs)(H.a,{className:"short-urls-row-menu__dropdown-item--danger",onClick:f,children:[Object(a.jsx)(I.a,{icon:V.x,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},xr=function(e,t){return function(r){var n=r.createShortUrl,c=r.shortUrlCreationResult,s=r.resetCreateShortUrl,i=r.selectedServer,o=r.basicMode,l=void 0!==o&&o,u=r.settings.shortUrlCreation,j=Object(D.useMemo)((function(){return function(e){var t;return{longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:null!==(t=null===e||void 0===e?void 0:e.validateUrls)&&void 0!==t&&t}}(u)}),[u]);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(e,{initialState:j,saving:c.saving,selectedServer:i,mode:l?"create-basic":"create",onSave:function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(),e.abrupt("return",n(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),Object(a.jsx)(t,Object(d.a)(Object(d.a)({},c),{},{resetCreateShortUrl:s,canBeClosed:l}))]})}},pr=r(744),Sr=r(705),yr=r(706),Cr=r(707),Nr=r(675),wr=r(669),_r=r(37),kr=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(wr.a,{className:n,children:Object(a.jsx)("div",{className:G()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(_r.a,{className:G()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:G()({"p-2":s}),children:t})})})},Ur=function(e){var t,r,n=e.errorData,c=e.fallbackMessage;return Object(a.jsxs)(a.Fragment,{children:[null!==(t=null===n||void 0===n?void 0:n.detail)&&void 0!==t?t:c,(r=n,"INVALID_ARGUMENT"===(null===r||void 0===r?void 0:r.type)&&Object(a.jsxs)("p",{className:"mb-0",children:["Invalid elements: [",n.invalidElements.join(", "),"]"]}))]})},Tr=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(D.useState)(""),l=Object(E.a)(o,2),u=l[0],d=l[1];Object(D.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(F.a)(s,r),O=Object(Ue.c)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Nr.a)}));return Object(a.jsx)(pr.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(Sr.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("p",{children:[Object(a.jsx)("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),Object(a.jsx)("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),Object(a.jsxs)("p",{children:["Write ",Object(a.jsx)("b",{children:t.shortCode})," to confirm deletion."]}),Object(a.jsx)("input",{type:"text",className:"form-control",placeholder:"Insert the short code (".concat(t.shortCode,")"),value:u,onChange:function(e){return d(e.target.value)}}),j&&Object(a.jsx)(kr,{type:lt(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-link",onClick:h,children:"Cancel"}),Object(a.jsx)("button",{type:"submit",className:"btn btn-danger",disabled:u!==t.shortCode||c.loading,children:c.loading?"Deleting...":"Delete"})]})]})})},Rr=r(239),Er=function(e){return function(t){var r=t.error,n=t.errorData,c=t.result,s=t.resetCreateShortUrl,i=t.canBeClosed,o=void 0!==i&&i,l=e(),u=Object(E.a)(l,2),d=u[0],j=u[1];if(Object(D.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(kr,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.N,className:"float-right pointer",onClick:s}),Object(a.jsx)(Ur,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(S.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(kr,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.N,className:"float-right pointer",onClick:s}),Object(a.jsx)("b",{children:"Great!"})," The short URL is ",Object(a.jsx)("b",{children:b}),Object(a.jsx)(sr.a,{text:b,onCopy:j,children:Object(a.jsxs)("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[Object(a.jsx)(I.a,{icon:Oe.b})," Copy"]})}),Object(a.jsx)(Rr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},Dr=function(e){return function(t){var r=t.orderByColumn,n=t.renderOrderIcon,c=t.shortUrlsList,s=t.onTagClick,i=t.selectedServer,o=t.className,l=c.error,u=c.loading,d=c.shortUrls,j=G()({"short-urls-table__header-cell--with-action":!!r}),b=G()("short-urls-table__header-cell",j),h=G()("table table-hover",o),O=Object(wt.h)(i);return Object(a.jsxs)("table",{className:h,children:[Object(a.jsx)("thead",{className:"responsive-table__header short-urls-table__header",children:Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("dateCreated"),children:["Created at",null===n||void 0===n?void 0:n("dateCreated")]}),Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("shortCode"),children:["Short URL",null===n||void 0===n?void 0:n("shortCode")]}),!O&&Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("longUrl"),children:["Long URL",null===n||void 0===n?void 0:n("longUrl")]})||Object(a.jsxs)("th",{className:"short-urls-table__header-cell",children:[Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("title"),children:["Title",null===n||void 0===n?void 0:n("title")]}),"\xa0\xa0/\xa0\xa0",Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("longUrl"),children:[Object(a.jsx)("span",{className:"indivisible",children:"Long URL"}),null===n||void 0===n?void 0:n("longUrl")]})]}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"Tags"}),Object(a.jsx)("th",{className:b,onClick:null===r||void 0===r?void 0:r("visits"),children:Object(a.jsxs)("span",{className:"indivisible",children:["Visits",null===n||void 0===n?void 0:n("visits")]})}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"\xa0"})]})}),Object(a.jsx)("tbody",{children:l?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center table-danger",children:"Something went wrong while loading short URLs :("})}):u?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!u&&Object(y.a)(null===d||void 0===d?void 0:d.data)?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"No results found"})}):null===d||void 0===d?void 0:d.data.map((function(t){return Object(a.jsx)(e,{shortUrl:t,selectedServer:i,onTagClick:s},t.shortUrl)}))})]})}},Lr=r(708),Vr=r(236),Ir=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(Q,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(H.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(H.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},Fr=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(Q,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(H.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(H.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(H.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(H.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},Ar=function(e,t){return function(r){var n=r.shortUrl,c=n.shortUrl,s=n.shortCode,i=r.toggle,o=r.isOpen,l=r.selectedServer,u=Object(D.useState)(300),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(D.useState)(0),O=Object(E.a)(h,2),v=O[0],f=O[1],x=Object(D.useState)("png"),p=Object(E.a)(x,2),S=p[0],N=p[1],w=Object(D.useState)("L"),_=Object(E.a)(w,2),k=_[0],U=_[1],T=Object(D.useMemo)((function(){return{useSizeInPath:!Object(wt.f)(l),marginIsSupported:Object(wt.e)(l),errorCorrectionIsSupported:Object(wt.g)(l)}}),[l]),R=T.marginIsSupported!==T.errorCorrectionIsSupported,L=Object(D.useMemo)((function(){return function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.marginIsSupported,l=r.errorCorrectionIsSupported,u="".concat(e,"/qr-code").concat(i?"/".concat(n):""),d=Object(C.b)({size:i?void 0:n,format:c,margin:o&&a>0?a:void 0,errorCorrection:l?s:void 0});return"".concat(u).concat(Object(y.a)(d)?"":"?".concat(d))}(c,{size:j,format:S,margin:v,errorCorrection:k},T)}),[c,j,S,v,k,T]),F=Object(D.useMemo)((function(){return j+v}),[j,v]),A=Object(D.useMemo)((function(){if(!(F<500))return F<800?"lg":"xl"}),[F]);return Object(a.jsxs)(pr.a,{isOpen:o,toggle:i,centered:!0,size:A,children:[Object(a.jsxs)(Sr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(cr.a,{href:c,children:c})]}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)(wr.a,{children:[Object(a.jsxs)(Lr.a,{className:G()({"col-md-4":R,"col-md-6":!R}),children:[Object(a.jsxs)("label",{className:"mb-0",children:["Size: ",j,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:j,step:10,min:50,max:1e3,onChange:function(e){return b(Number(e.target.value))}})]}),T.marginIsSupported&&Object(a.jsxs)(Lr.a,{className:R?"col-md-4":"col-md-6",children:[Object(a.jsxs)("label",{className:"mb-0",children:["Margin: ",v,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:v,step:1,min:0,max:100,onChange:function(e){return f(Number(e.target.value))}})]}),Object(a.jsx)(Lr.a,{className:R?"col-md-4":"col-md-6",children:Object(a.jsx)(Ir,{format:S,setFormat:N})}),T.errorCorrectionIsSupported&&Object(a.jsx)(Lr.a,{className:"col-md-6",children:Object(a.jsx)(Fr,{errorCorrection:k,setErrorCorrection:U})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(cr.a,{href:L}),Object(a.jsx)(ir,{text:L})]}),Object(a.jsx)("img",{src:L,className:"qr-code-modal__img",alt:"QR code"}),Object(a.jsx)(t,{minVersion:"2.9.0",children:Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Vr.a,{block:!0,color:"primary",onClick:Object(g.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.saveImage(L,"".concat(s,"-qr-code.").concat(S)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(I.a,{icon:V.q,className:"ml-1"})]})})})]})]})]})}},Mr=r(711),Gr=r(709),Pr=r(710),Br=r(739),Hr=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?Nr.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(D.useRef)(Object(Br.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:G()("custom-control",j,s),style:b,children:[Object(a.jsx)("input",{type:"checkbox",className:"custom-control-input",id:d,checked:r,onChange:function(e){return c(e.target.checked,e)}}),Object(a.jsx)("label",{className:"custom-control-label",htmlFor:d,children:i})]})},Wr=function(e){return Object(a.jsx)(Hr,Object(d.a)({type:"checkbox"},e))},qr=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(pr.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(Sr.a,{toggle:r,children:"Info"}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("p",{children:["When the\xa0",Object(a.jsx)("b",{children:Object(a.jsx)("i",{children:'"Use existing URL if found"'})}),"\xa0checkbox is checked, the server will return an existing short URL if it matches provided params."]}),Object(a.jsx)("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),Object(a.jsxs)("ul",{children:[Object(a.jsx)("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),Object(a.jsxs)("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",Object(a.jsx)("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),Object(a.jsx)("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]})},zr=function(){var e=Object(K.d)(),t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{title:"What does this mean?",children:Object(a.jsx)(I.a,{icon:V.t,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(qr,{isOpen:r,toggle:n})]})},Kr=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(D.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(I.a,{icon:V.t})}),Object(a.jsx)(dr.a,{target:function(){return s.current},placement:n,children:c})]})},Qr=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(Wr,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(Kr,{placement:"right",children:r})]})},Jr=Object(F.a)(Gr.a,Object(Pr.a)(/ /g,"-")),Zr=function(e){return"string"===typeof e?Object(A.default)(e):e},Yr=function(e,t){return function(r){var n,c=r.mode,s=r.saving,i=r.onSave,o=r.initialState,l=r.selectedServer,j=Object(D.useState)(o),b=Object(E.a)(j,2),h=b[0],O=b[1],v="edit"===c,f=Object(Ue.c)(Object(g.a)(m.a.mark((function e(){var t,r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},h),{},{validSince:null!==(t=ne(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=ne(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Ue.d)(h.maxVisits)?Number(h.maxVisits):null,title:Object(Ue.d)(h.title)?h.title:void 0})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(D.useEffect)((function(){O(o)}),[o]);var x=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.jsx)(Lr.a,{children:Object(a.jsx)(Mr.a,Object(d.a)({id:e,type:n,placeholder:t,value:null!==(r=h[e])&&void 0!==r?r:"",onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t.target.value)))}},c))})},p=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(a.jsx)("div",{className:"form-group",children:Object(a.jsx)(ve,Object(d.a)({selected:h[e]?Zr(h[e]):null,placeholderText:t,isClearable:!0,onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t)))}},r))})},S=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Lr.a,{children:Object(a.jsx)(Mr.a,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:h.longUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{longUrl:e.target.value}))}})}),Object(a.jsx)(Lr.a,{children:Object(a.jsx)(e,{selectedTags:null!==(n=h.tags)&&void 0!==n?n:[],onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{tags:e.map(Jr)}))}})})]}),C=Object(wt.h)(l),N=C||!v,w=G()("mb-3",{"col-sm-6":N,"col-sm-12":!N}),_=Object(wt.b)(l);return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:f,children:["create-basic"===c&&S,"create-basic"!==c&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(_r.a,{title:"Basic options",className:"mb-3",children:S}),Object(a.jsxs)(wr.a,{children:[N&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(_r.a,{title:"Customize the short URL",children:[C&&x("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(wr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:Object(Ue.d)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",{min:4,disabled:Object(Ue.d)(h.customSlug)})})]}),Object(a.jsx)(Lr.a,{children:Object(a.jsx)(t,{value:h.domain,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{domain:e}))}})})]})]})}),Object(a.jsx)("div",{className:w,children:Object(a.jsxs)(_r.a,{title:"Limit access to the short URL",children:[x("maxVisits","Maximum number of visits allowed","number",{min:1}),p("validSince","Enabled since...",{maxDate:h.validUntil?Zr(h.validUntil):void 0}),p("validUntil","Enabled until...",{minDate:h.validSince?Zr(h.validSince):void 0})]})})]}),Object(a.jsxs)(_r.a,{title:"Extra checks",className:"mb-3",children:[Object(a.jsx)(Qr,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:h.validateUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{validateUrl:e}))},children:"Validate URL"}),_&&Object(a.jsx)(Qr,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:h.crawlable,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{crawlable:e}))},children:"Make it crawlable"}),!v&&Object(a.jsxs)("p",{children:[Object(a.jsx)(Wr,{inline:!0,className:"mr-2",checked:h.findIfExists,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{findIfExists:e}))},children:"Use existing URL if found"}),Object(a.jsx)(zr,{})]})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Vr.a,{outline:!0,color:"primary",disabled:s||Object(y.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},Xr=r(54),$r=function(e){return function(t){var r,n=t.history.goBack,c=t.match.params,s=t.location.search,i=t.settings.shortUrlCreation,o=t.selectedServer,l=t.shortUrlDetail,u=t.getShortUrlDetail,d=t.shortUrlEdition,j=t.editShortUrl,b=l.loading,h=l.error,O=l.errorData,v=l.shortUrl,f=d.saving,x=d.error,p=d.errorData,S=Object(C.a)(s).domain,y=Object(D.useMemo)((function(){return function(e,t){var r,n,c,a,s,i,o=null!==(r=null===t||void 0===t?void 0:t.validateUrls)&&void 0!==r&&r;return e?{longUrl:e.longUrl,tags:e.tags,title:null!==(n=e.title)&&void 0!==n?n:void 0,domain:null!==(c=e.domain)&&void 0!==c?c:void 0,validSince:null!==(a=e.meta.validSince)&&void 0!==a?a:void 0,validUntil:null!==(s=e.meta.validUntil)&&void 0!==s?s:void 0,maxVisits:null!==(i=e.meta.maxVisits)&&void 0!==i?i:void 0,crawlable:e.crawlable,validateUrl:o}:{longUrl:"",validateUrl:o}}(v,i)}),[v,i]),N=Object(K.d)(),w=Object(E.a)(N,4),_=w[0],k=w[2],U=w[3];return Object(D.useEffect)((function(){u(c.shortCode,S)}),[]),b?Object(a.jsx)(Xr.a,{loading:!0}):h?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:O,fallbackMessage:"An error occurred while loading short URL detail :("})}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("header",{className:"mb-3",children:Object(a.jsx)(we.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Vr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(cr.a,{href:null!==(r=null===v||void 0===v?void 0:v.shortUrl)&&void 0!==r?r:""})]})}),Object(a.jsx)("span",{})]})})}),Object(a.jsx)(e,{initialState:y,saving:f,selectedServer:o,mode:"edit",onSave:function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=2;break}return e.abrupt("return");case 2:U(),j(v.shortCode,v.domain,t).then(k).catch(U);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),x&&Object(a.jsx)(kr,{type:"error",className:"mt-3",children:Object(a.jsx)(Ur,{errorData:p,fallbackMessage:"An error occurred while updating short URL :("})}),_&&Object(a.jsx)(kr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},en="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",tn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",rn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",nn={loading:!1,error:!1},cn=$e((Me={},Object(u.a)(Me,en,(function(){return{loading:!0,error:!1}})),Object(u.a)(Me,tn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Me,rn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},nn)})),Me),nn),an=function(e){return function(t,r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c({type:en}),n.prev=1,o=a(),l=o.shortUrlsList,null===(s=null===l||void 0===l||null===(i=l.shortUrls)||void 0===i?void 0:i.data.find((function(e){return at(e,t,r)})))||void 0===s){n.next=7;break}n.t0=s,n.next=10;break;case 7:return n.next=9,e(a).getShortUrl(t,r);case 9:n.t0=n.sent;case 10:u=n.t0,c({shortUrl:u,type:rn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:tn,errorData:ot(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},sn=function(e,t){e.serviceFactory("ShortUrls",L,"SearchBar","ShortUrlsList"),e.decorator("ShortUrls",t(["shortUrlsList"])),e.serviceFactory("ShortUrlsList",nr,"ShortUrlsTable"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Dr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",vr,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",gr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Er,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",Yr,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",xr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",$r,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return Tr})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",Ar,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",pe,"ColorGenerator"),e.decorator("SearchBar",t(["shortUrlsListParams"],["listShortUrls"])),e.serviceFactory("listShortUrls",It,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return Pt})),e.serviceFactory("createShortUrl",Ct,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return Nt})),e.serviceFactory("deleteShortUrl",vt,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return ft})),e.serviceFactory("getShortUrlDetail",an,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",Rt,"buildShlinkApiClient")},on=r(326),ln=r.n(on),un=r(68),dn=function(e){var t=e.children,r=e.value,n=e.onChange,c=e.id,s=e.type,i=e.required,o=e.placeholder,l=e.className,u=e.labelClassName,d=Object(D.useRef)(null!==c&&void 0!==c?c:Object(Br.a)());return Object(a.jsxs)("div",{className:"form-group ".concat(null!==l&&void 0!==l?l:""),children:[Object(a.jsxs)("label",{htmlFor:d.current,className:null!==u&&void 0!==u?u:"",children:[t,":"]}),Object(a.jsx)("input",{className:"form-control",type:null!==s&&void 0!==s?s:"text",id:d.current,value:r,required:null===i||void 0===i||i,placeholder:o,onChange:function(e){return n(e.target.value)}})]})},jn=function(e){return Object(a.jsx)(dn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},bn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(D.useState)(""),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(D.useState)(""),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(D.useState)(""),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(Ue.c)((function(){return t({name:o,url:j,apiKey:v})}));return Object(D.useEffect)((function(){r&&l(r.name),r&&b(r.url),r&&f(r.apiKey)}),[r]),Object(a.jsxs)("form",{className:"server-form",onSubmit:m,children:[Object(a.jsxs)(_r.a,{className:"mb-3",title:c,children:[Object(a.jsx)(jn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(jn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(jn,{value:v,onChange:f,children:"APIkey"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},hn=function(e){var t=e.type;return Object(a.jsxs)(kr,{type:t,children:["success"===t&&"Servers properly imported. You can now select one from the list :)","error"===t&&"The servers could not be imported. Make sure the format is correct."]})},On=function(e,t){return function(r){var n=r.createServer,c=r.history.push,s=t(!1,4e3),i=Object(E.a)(s,2),o=i[0],l=i[1],u=t(!1,4e3),j=Object(E.a)(u,2),b=j[0],h=j[1];return Object(a.jsxs)(un.a,{children:[Object(a.jsxs)(bn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(Br.a)();n(Object(d.a)(Object(d.a)({},e),{},{id:t})),c("/server/".concat(t))},children:[Object(a.jsx)(e,{onImport:l,onImportError:h}),Object(a.jsx)("button",{className:"btn btn-outline-primary",children:"Create server"})]}),(o||b)&&Object(a.jsxs)("div",{className:"mt-3",children:[o&&Object(a.jsx)(hn,{type:"success"}),b&&Object(a.jsx)(hn,{type:"error"})]})]})}},vn=function(e){return function(t){var r=t.servers,n=t.selectedServer,c=Object(Ne.a)(r),s=Object(a.jsxs)(H.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.C})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]});return Object(a.jsxs)(_e.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(q.a,{nav:!0,caret:!0,children:[Object(a.jsx)(I.a,{icon:V.G})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(z.a,{right:!0,children:Object(y.a)(c)?s:Object(a.jsxs)(a.Fragment,{children:[c.map((function(e){var t=e.name,r=e.id;return Object(a.jsx)(H.a,{tag:o.b,to:"/server/".concat(r),active:Object(v.e)(n)&&n.id===r,children:t},r)})),Object(a.jsx)(H.a,{divider:!0}),s,Object(a.jsxs)(H.a,{className:"servers-dropdown__export-item",onClick:Object(g.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.exportServers());case 1:case"end":return t.stop()}}),t)}))),children:[Object(a.jsx)(I.a,{icon:V.q})," ",Object(a.jsx)("span",{className:"ml-1",children:"Export servers"})]})]})})]})}},fn=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history;return Object(a.jsxs)(pr.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(Sr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("p",{children:["Are you sure you want to remove ",Object(a.jsx)("b",{children:t?t.name:""}),"?"]}),Object(a.jsx)("p",{children:Object(a.jsx)("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",onClick:function(){return c(t),r(),void s.push("/")},children:"Delete"})]})]})},mn=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(K.d)(),o=Object(E.a)(i,4),l=o[0],u=o[2],d=o[3];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:n,onClick:u,children:[!c&&Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.x}),Object(a.jsx)("span",{className:s,children:null!==c&&void 0!==c?c:"Remove this server"})]}),Object(a.jsx)(e,{server:r,isOpen:l,toggle:d})]})}},gn=r(162),xn=function(e){return Object(gn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history,c=n.push,s=n.goBack;if(!Object(v.e)(r))return null;return Object(a.jsx)(un.a,{children:Object(a.jsxs)(bn,{title:Object(a.jsxs)("h5",{className:"mb-0",children:['Edit "',r.name,'"']}),initialValues:r,onSubmit:function(e){t(r.id,e),c("/server/".concat(r.id))},children:[Object(a.jsx)(Vr.a,{outline:!0,className:"mr-2",onClick:s,children:"Cancel"}),Object(a.jsx)(Vr.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},pn=function(e){var t=e.importServersFromFile;return function(e){var r=e.createServers,n=e.fileRef,c=e.onImport,s=void 0===c?function(){}:c,i=e.onImportError,o=void 0===i?function(){}:i,l=null!==n&&void 0!==n?n:Object(D.useRef)(),u=function(){var e=Object(g.a)(m.a.mark((function e(n){var c,a;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.target,e.abrupt("return",t(null===(c=a.files)||void 0===c?void 0:c[0]).then(r).then(s).then((function(){a.value=null})).catch(o));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-outline-secondary mr-2",id:"importBtn",onClick:function(){var e;return null===(e=l.current)||void 0===e?void 0:e.click()},children:"Import from file"}),Object(a.jsxs)(dr.a,{placement:"top",target:"importBtn",children:["You can create servers by importing a CSV file with columns ",Object(a.jsx)("b",{children:"name"}),", ",Object(a.jsx)("b",{children:"apiKey"})," and ",Object(a.jsx)("b",{children:"url"}),"."]}),Object(a.jsx)("input",{type:"file",accept:"text/csv",className:"create-server__csv-select",ref:l,onChange:u})]})}},Sn=r(670),yn=r(69),Cn="shlink/selectedServer/SELECT_SERVER",Nn="shlink/selectedServer/RESET_SELECTED_SERVER",wn=Object(F.a)((function(e){return"latest"===e?"999.999.999":e}),Object(yn.c)("1.0.0")),_n=Object(Sn.a)(Nr.a,function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r().then((function(e){var t=e.version;return{version:wn(t),printableVersion:Object(yn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),kn=$e((Ge={},Object(u.a)(Ge,Nn,(function(){return null})),Object(u.a)(Ge,Cn,(function(e,t){return t.selectedServer})),Ge),null),Un=et(Nn),Tn=function(e,t){return function(r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j,b,h;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c(Un()),c(Pt()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:Cn,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 7:return n.prev=7,l=e(o),u=l.health,n.next=11,_n(r,u);case 11:j=n.sent,b=j.version,h=j.printableVersion,c({type:Cn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{version:b,printableVersion:h})}),c(t()),n.next=21;break;case 18:n.prev=18,n.t0=n.catch(7),c({type:Cn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{serverNotReachable:!0})});case 21:case"end":return n.stop()}}),n,null,[[7,18]])})));return function(e,t){return n.apply(this,arguments)}}()}},Rn=r(712),En=r(163),Dn=r(351),Ln="shlink/servers/EDIT_SERVER",Vn="shlink/servers/DELETE_SERVER",In="shlink/servers/CREATE_SERVERS",Fn=$e((Pe={},Object(u.a)(Pe,In,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Pe,Vn,(function(e,t){var r=t.serverId;return Object(Rn.a)(r,e)})),Object(u.a)(Pe,Ln,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(nt.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Pe),{}),An=Object(En.a)((function(e,t){return Object(nt.a)(t.id,t,e)}),{}),Mn=Object(F.a)(Object(Dn.a)((function(e){return e.id?e:Object(nt.a)("id",Object(Br.a)(),e)})),An,(function(e){return{type:In,newServers:e}})),Gn=function(e){return Mn([e])},Pn=function(e,t){return{type:Ln,serverId:e,serverData:t}},Bn=function(e){var t=e.id;return{type:Vn,serverId:t}},Hn=Object(F.a)(Object(O.a)("data"),(function(e){if(!Array.isArray(e))throw new Error("Value is not an array");return e})),Wn=function(e){var t=e.get;return function(){return function(){var e=Object(g.a)(m.a.mark((function e(r){var n;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("".concat(l.a,"/servers.json")).then(Hn).catch((function(){return[]}));case 2:n=e.sent,r(Mn(n));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},qn=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.d)(n))return null;var s=n.version;return Object(yn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},zn=r(176),Kn=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(un.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(Xr.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.e)(n)&&"Could not find this Shlink server.",Object(v.e)(n)&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),Object(a.jsxs)(zn.a,{servers:Object.values(r),children:["These are the Shlink servers currently configured. Choose one of them or ",Object(a.jsx)(o.b,{to:"/server/create",children:"add a new one"}),"."]}),Object(v.e)(n)&&Object(a.jsx)("div",{className:"container mt-3 mt-md-5",children:Object(a.jsxs)("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",Object(a.jsx)(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or\xa0",Object(a.jsx)(o.b,{to:"/server/".concat(n.id,"/edit"),children:"edit it"}),"."]})})]})})}},Qn=r(107),Jn=r(713),Zn=r(714),Yn=r(671),Xn=r(672),$n=function(e,t,r){return Ee((function(n){var c,s=n.shortUrlsList,i=n.listShortUrls,l=n.listTags,u=n.tagsList,d=n.selectedServer,j=n.loadVisitsOverview,h=n.visitsOverview,O=s.loading,f=s.shortUrls,m=u.loading,g=h.loading,x=h.visitsCount,p=h.orphanVisitsCount,S=Object(v.e)(d)?d.id:"",y=Object(b.g)();return Object(D.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(wr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(Zn.a,{tag:"h2",children:g?"Loading...":Zt(x)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/orphan-visits"),children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(Zn.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:g?"Loading...":Zt(null!==p&&void 0!==p?p:0)}),Object(a.jsx)(r,{maxVersion:"2.5.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.6 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/list-short-urls/1"),children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(Zn.a,{tag:"h2",children:O?"Loading...":Zt(null!==(c=null===f||void 0===f?void 0:f.pagination.totalItems)&&void 0!==c?c:0)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/manage-tags"),children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(Zn.a,{tag:"h2",children:m?"Loading...":Zt(u.tags.length)})]})})]}),Object(a.jsxs)(we.a,{className:"mb-3",children:[Object(a.jsxs)(Yn.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Create a short URL"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(S,"/create-short-url"),children:"Advanced options \xbb"})]}),Object(a.jsx)(Xn.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(we.a,{children:[Object(a.jsxs)(Yn.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Recently created URLs"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(S,"/list-short-urls/1"),children:"See all \xbb"})]}),Object(a.jsx)(Xn.a,{children:Object(a.jsx)(e,{shortUrlsList:s,selectedServer:d,className:"mb-0",onTagClick:function(e){return y.push("/server/".concat(S,"/list-short-urls/1?tag=").concat(e))}})})]})]})}),(function(){return[De.visits,De.orphanVisits]}))},ec=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},tc=function(e){return Array.isArray(e)&&e.every(ec)},rc=function e(t,r){var n=this;Object(x.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(g.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("No file provided");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e,c){r.addEventListener("loadend",(function(t){try{var r,a,s,i=null!==(r=null===(a=t.target)||void 0===a||null===(s=a.result)||void 0===s?void 0:s.toString())&&void 0!==r?r:"",o=n.csvJson.toObject(i);if(!tc(o))throw new Error("Provided file does not have the right format.");e(o)}catch(t){c(t)}})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},nc=r(108),cc=function e(t,r,n){var c=this;Object(x.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(g.a)(m.a.mark((function e(){var t,r,n;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Ne.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(Object(Rn.a)("id"));try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(nc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},ac=function(e,t,r){e.serviceFactory("CreateServer",On,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",Qn.a),e.decorator("CreateServer",t(["selectedServer"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",xn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",vn,"ServersExporter"),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return fn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",mn,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",pn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return qn})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",Kn,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",$n,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",ln.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",rc,"csvjson","fileReaderFactory"),e.service("ServersExporter",cc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Tn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return Gn})),e.serviceFactory("createServers",(function(){return Mn})),e.serviceFactory("deleteServer",(function(){return Bn})),e.serviceFactory("editServer",(function(){return Pn})),e.serviceFactory("fetchServers",Wn,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Un}))},sc=function(e){var t=e.visits,r=e.goBack,n=e.shortUrl,c=e.children,s=e.title;return Object(a.jsx)("header",{children:Object(a.jsxs)(we.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Vr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center d-none d-sm-block",children:Object(a.jsx)("small",{children:s})}),Object(a.jsxs)("span",{className:"badge badge-main ml-3",children:["Visits:"," ",Object(a.jsx)(Or,{visitsCount:t.length,shortUrl:n})]})]}),Object(a.jsx)("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:Object(a.jsx)("small",{children:s})}),c&&Object(a.jsx)("div",{className:"mt-md-2",children:c})]})})},ic=function(e){var t,r,n=e.shortUrlDetail,c=e.shortUrlVisits,s=e.goBack,i=n.shortUrl,o=n.loading,l=c.visits,u=null!==(t=null===i||void 0===i?void 0:i.shortUrl)&&void 0!==t?t:"",d=null!==(r=null===i||void 0===i?void 0:i.longUrl)&&void 0!==r?r:"",j=null===i||void 0===i?void 0:i.title,b=Object(a.jsxs)(a.Fragment,{children:["Visits for ",Object(a.jsx)(cr.a,{href:u})]});return Object(a.jsxs)(sc,{title:b,goBack:s,visits:l,shortUrl:i,children:[Object(a.jsx)("hr",{}),Object(a.jsxs)("div",{children:["Created: ",i?Object(a.jsxs)("span",{children:[Object(a.jsx)("b",{id:"created",className:"short-url-visits-header__created-at",children:Object(a.jsx)(ur,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(dr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(ur,{date:i.dateCreated})})]}):Object(a.jsx)("small",{children:"Loading..."})]}),Object(a.jsxs)("div",{children:["".concat(j?"Title":"Long URL",": "),o&&Object(a.jsx)("small",{children:"Loading..."}),!o&&Object(a.jsx)(cr.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},oc=r(732),lc=r(684),uc=r(733),dc=r(682),jc=r(118),bc=r(719),hc=r(720),Oc=r(721),vc=r(723),fc=r(716),mc=r(330),gc=r(717),xc=r(352),pc=r(93),Sc=r(718),yc=r(722),Cc=r(329),Nc=r.n(Cc),wc=r(715),_c="Others",kc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Uc=function(e){var t,r;return Object(Ue.d)(e)?null!==(t=null===(r=e.split("/")[e.includes("://")?2:0])||void 0===r?void 0:r.split(":")[0])&&void 0!==t?t:"":"Direct"},Tc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(wc.a)(t,t.map((function(){return 0})))),e))},Rc=function(e){return Object(a.jsx)(Hr,Object(d.a)({type:"switch"},e))},Ec=function(e,t){var r=e.native,n=Object(E.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},Dc=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(Zt(r))},Lc=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(Zt(r))},Vc=r(46),Ic={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Fc={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},Ac={hourly:fc.a,daily:mc.a,weekly:gc.a,monthly:xc.a},Mc={hourly:function(e){return Object($.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object($.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object($.default)(Object(pc.a)(e),"yyyy-MM-dd"),r=Object($.default)(Object(Sc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object($.default)(e,"yyyy-MM")}},Gc=function(e,t){return Object(Oc.a)((function(t){return Mc[e](Object(A.default)(t.date))}),t)},Pc=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=Ac[e],n=Mc[e],c=Object(A.default)(t[0].date),a=Object(A.default)(t[t.length-1].date),s=r(c,a),i=Fc[e];return[n(a)].concat(Object(Se.a)(Object(Ue.f)(s,(function(e){return n(Object(yc.a)(a,i(e)))}))))}(r,e);return[c,Tc(t,c)]},Bc=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},Hc=null,Wc=function(e,t,r){return function(n){var c=Object(E.a)(n,1)[0];if(r&&c){var a,s=c.index;if(Hc===e[s])r([]),Hc=null;else r(e[s]&&t[e[s]]||[]),Hc=null!==(a=e[s])&&void 0!==a?a:null}}},qc=function(e){var t=e.title,r=e.visits,n=e.highlightedVisits,c=e.highlightedLabel,s=void 0===c?"Selected":c,i=e.setSelectedVisits,o=Object(D.useState)(r.length>0?function(e){var t,r=new Date,n=Object(A.default)(e);return null!==(t=Object(bc.a)([[function(){return Object(mc.a)(r,n)<=2},Object(hc.a)("hourly")],[function(){return Object(xc.a)(r,n)<=1},Object(hc.a)("daily")],[function(){return Object(xc.a)(r,n)<=6},Object(hc.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(E.a)(o,2),u=l[0],d=l[1],j=Object(K.d)(!0),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(D.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=Mc[e](Object(A.default)(r.date));return t[c]=null!==(n=t[c])&&void 0!==n?n:[],t[c].push(r),t}),{})}(u,r)}),[u,r]),f=Object(D.useMemo)((function(){return Gc(u,Object(vc.a)(r))}),[u,r]),m=Object(D.useMemo)((function(){return Pc(r,f,u,h)}),[r,u,h]),g=Object(E.a)(m,2),x=g[0],p=g[1],S=Object(D.useMemo)((function(){return Tc(Gc(u,Object(vc.a)(n)),x)}),[n,u,x]),y=function(){var e=Bc(p,"Visits",Vc.c);return 0===n.length?[e]:[e,Bc(S,s,Vc.a)]},C={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:Dc}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:Zt}},x:{title:{display:!0,text:Ic[u]}}},onHover:Ec},N=function(){return Object(a.jsx)(jc.c,{data:{labels:x,datasets:y()},options:C,getElementAtEvent:Wc(x,v,i)})};return Object(a.jsxs)(we.a,{children:[Object(a.jsxs)(Yn.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(_e.a,{children:[Object(a.jsx)(q.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(z.a,{right:!0,children:Object.entries(Ic).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(H.a,{active:u===r,onClick:function(){return d(r)},children:n},r)}))})]})}),Object(a.jsx)("div",{className:"float-right mr-2",children:Object(a.jsx)(Rc,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(Xn.a,{className:"line-chart-card__body",children:[n.length>0&&N(),0===n.length&&N()]})]})},zc=r(724),Kc=function(e){var t=e.pagesCount,r=e.currentPage,n=e.setCurrentPage,c=e.centered,s=void 0===c||c;if(t<2)return null;var i=function(e){return function(){return!$t(e)&&n(e)}};return Object(a.jsxs)(Wt.a,{listClassName:G()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(Bt.a,{disabled:r<=1,children:Object(a.jsx)(Ht.a,{previous:!0,tag:"span",onClick:i(r-1)})}),Xt(r,t).map((function(e,t){return Object(a.jsx)(Bt.a,{disabled:$t(e),active:r===e,children:Object(a.jsx)(Ht.a,{tag:"span",onClick:i(e),children:er(e)})},tr(e,t))})),Object(a.jsx)(Bt.a,{disabled:r>=t,children:Object(a.jsx)(Ht.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},Qc=function(e,t){return t.filter((function(t){return function(e,t){var r=e.browser,n=e.os,c=e.referer,a=e.country,s=e.city,i=Object(jr.a)(e,["browser","os","referer","country","city"]);return"".concat(r," ").concat(n," ").concat(c," ").concat(a," ").concat(s," ").concat(i.visitedUrl).toLowerCase().includes(t.toLowerCase())}(t,e)}))},Jc=function(e){var t,r,n=e.visits,c=e.selectedVisits,s=void 0===c?[]:c,i=e.setSelectedVisits,o=e.selectedServer,l=e.matchMedia,u=void 0===l?window.matchMedia:l,d=e.isOrphanVisits,j=void 0!==d&&d,b="visits-table__header-cell visits-table__sticky",h=function(){return u("(max-width: 767px)").matches},O=Object(D.useState)(h()),v=Object(E.a)(O,2),f=v[0],m=v[1],g=Object(D.useState)(void 0),x=Object(E.a)(g,2),p=x[0],S=x[1],y=Object(D.useState)({field:void 0,dir:void 0}),C=Object(E.a)(y,2),N=C[0],w=C[1],_=Object(D.useMemo)((function(){return function(e,t,r){var n=function(e,t){var r=e.field,n=e.dir;return r&&n?t.sort((function(e,t){var c="ASC"===n?1:-1,a="ASC"===n?-1:1;return e[r]>t[r]?c:a})):t}(r,t?Qc(t,e):Object(Se.a)(e)),c=n.length;return{visitsGroups:Object(zc.a)(20,n),total:c}}(n,p,N)}),[p,N]),k=Object(D.useRef)(!0),U=Object(D.useState)(1),T=Object(E.a)(U,2),R=T[0],L=T[1],F=20*R,A=F-20,M=Object(wt.a)(o),B=7+Number(M)+Number(j),H=function(e){return function(){return w({field:e,dir:Object(Ue.b)(e,N.field,N.dir)})}},W=function(e){return N.dir&&N.field===e&&Object(a.jsx)(I.a,{icon:"ASC"===N.dir?V.f:V.e,className:"visits-table__header-icon"})};return Object(D.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(D.useEffect)((function(){L(1),!k.current&&i([]),k.current=!1}),[p]),Object(a.jsxs)("table",{className:"table table-bordered table-hover table-sm table-responsive-sm visits-table",children:[Object(a.jsxs)("thead",{className:"visits-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{className:"".concat(b," text-center"),onClick:function(){return i(s.length<_.total?_.visitsGroups.flat():[])},children:Object(a.jsx)(I.a,{icon:V.h,className:G()({"text-primary":s.length>0})})}),M&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(I.a,{icon:V.E}),W("potentialBot")]}),Object(a.jsxs)("th",{className:b,onClick:H("date"),children:["Date",W("date")]}),Object(a.jsxs)("th",{className:b,onClick:H("country"),children:["Country",W("country")]}),Object(a.jsxs)("th",{className:b,onClick:H("city"),children:["City",W("city")]}),Object(a.jsxs)("th",{className:b,onClick:H("browser"),children:["Browser",W("browser")]}),Object(a.jsxs)("th",{className:b,onClick:H("os"),children:["OS",W("os")]}),Object(a.jsxs)("th",{className:b,onClick:H("referer"),children:["Referrer",W("referer")]}),j&&Object(a.jsxs)("th",{className:b,onClick:H("visitedUrl"),children:["Visited URL",W("visitedUrl")]})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"p-0",children:Object(a.jsx)(P,{noBorder:!0,large:!1,onChange:S})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=_.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"text-center",children:"No visits found with current filtering"})}),null===(r=_.visitsGroups[R-1])||void 0===r?void 0:r.map((function(e,t){var r=s.includes(e);return Object(a.jsxs)("tr",{style:{cursor:"pointer"},className:G()({"table-active":r}),onClick:function(){return i(r?s.filter((function(t){return t!==e})):[].concat(Object(Se.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(I.a,{icon:V.h,className:"text-primary"})}),M&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.E,id:"botIcon".concat(t)}),Object(a.jsx)(dr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(ur,{date:e.date})}),Object(a.jsx)("td",{children:e.country}),Object(a.jsx)("td",{children:e.city}),Object(a.jsx)("td",{children:e.browser}),Object(a.jsx)("td",{children:e.os}),Object(a.jsx)("td",{children:e.referer}),j&&Object(a.jsx)("td",{children:e.visitedUrl})]},t)}))]}),_.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"visits-table__footer-cell visits-table__sticky",children:Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(Kc,{pagesCount:Math.ceil(_.total/20),currentPage:R,setCurrentPage:L,centered:f})}),Object(a.jsx)("div",{className:G()("col-md-6",{"d-flex align-items-center flex-row-reverse":!f,"text-center mt-3":f}),children:Object(a.jsxs)("div",{children:["Visits ",Object(a.jsx)("b",{children:Zt(A+1)})," to"," ",Object(a.jsx)("b",{children:Zt(Object(Kt.a)(F,_.total))})," of"," ",Object(a.jsx)("b",{children:Zt(_.total)})]})})]})})})})]})},Zc=r(745),Yc=r(725),Xc=r(726),$c=r(727),ea=function(){return Object(a.jsx)(Zc.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ta=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(E.a)(e,1)[0].latLong}},ra=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(pr.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(yr.a,{className:"map-modal__modal-body",children:[Object(a.jsxs)("h3",{className:"map-modal__modal-title",children:[n,Object(a.jsx)("button",{type:"button",className:"close",onClick:t,children:"\xd7"})]}),Object(a.jsxs)(Yc.a,Object(d.a)(Object(d.a)({},ta(s)),{},{children:[Object(a.jsx)(ea,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Xc.a,{position:n,children:Object(a.jsxs)($c.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},na=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(K.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(K.d)(),j=Object(E.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(D.useState)([]),f=Object(E.a)(v,2),m=f[0],g=f[1],x=Object(D.useRef)(),p=function(e){return function(){g(e?c.filter((function(e){var t=e.cityName;return r.includes(t)})):c),l()}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("button",{className:"btn btn-link open-map-modal-btn__btn",ref:x,onClick:function(){if(!r)return g(c),void l();O()},children:Object(a.jsx)(I.a,{icon:V.w})}),Object(a.jsx)(dr.a,{placement:"left",target:function(){return x.current},children:"Show in map"}),Object(a.jsx)(W.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(z.a,{right:!0,children:[Object(a.jsx)(H.a,{onClick:p(!1),children:"Show all locations"}),Object(a.jsx)(H.a,{onClick:p(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(ra,{toggle:u,isOpen:o,title:t,locations:m})]})},ca=r(728),aa=function(e){return e.hasOwnProperty("visitedUrl")},sa=Object(F.a)(Object(ca.a)((function(e){return aa(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),ia=function(e,t){return Object(Oc.a)(Object(O.a)(t),e)},oa=function(e){var t,r,n=e.page,c=e.itemsPerPage,a=e.filter,s=e.dateRange;return{page:n,itemsPerPage:c,startDate:null!==(t=(null===s||void 0===s?void 0:s.startDate)&&ne(null===s||void 0===s?void 0:s.startDate))&&void 0!==t?t:void 0,endDate:null!==(r=(null===s||void 0===s?void 0:s.endDate)&&ne(null===s||void 0===s?void 0:s.endDate))&&void 0!==r?r:void 0,excludeBots:(null===a||void 0===a?void 0:a.excludeBots)||void 0}},la=function(e,t){return!Object(S.a)(e)&&Object(Ue.d)(e[t])},ua=function(e){return"number"===typeof e?e:e?parseFloat(e):0},da=function(e){return function(t,r){var n=la(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},ja=da("country"),ba=da("city"),ha=function(e){return e.reduce((function(e,t){return function(e,t){var r=t.os;e[r]=(e[r]||0)+1}(e.os,t),function(e,t){var r=t.browser;e[r]=(e[r]||0)+1}(e.browsers,t),function(e,t){var r=t.referer;e[r]=(e[r]||0)+1}(e.referrers,t),ja(e.countries,t),ba(e.cities,t),function(e,t){if(la(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[ua(n),ua(c)]};a.count++,e[r]=a}}(e.citiesForMap,t),function(e,t){if(function(e){return e.hasOwnProperty("visitedUrl")}(t)){var r=t.visitedUrl;e[r]=(e[r]||0)+1}}(e.visitedUrls,t),e}),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}})},Oa=Object(Dn.a)((function(e){var t=e.userAgent,r=e.date,n=e.referer,c=e.visitLocation,a=e.potentialBot,s=void 0!==a&&a,i=Object(d.a)(Object(d.a)({date:r,potentialBot:s},function(e){if(!Object(Ue.d)(e))return{browser:_c,os:_c};var t=Nc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:_c,browser:r&&kc.includes(r)?r:_c}}(t)),{},{referer:Uc(n),country:(null===c||void 0===c?void 0:c.countryName)||"Unknown",city:(null===c||void 0===c?void 0:c.cityName)||"Unknown",latitude:null===c||void 0===c?void 0:c.latitude,longitude:null===c||void 0===c?void 0:c.longitude});return aa(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),va=function(e){var t=e.onChange,r=e.selected,n=void 0===r?{}:r,c=e.className,s=e.isOrphanVisits,i=e.botsSupported;if(!i&&!s)return null;var o=n.orphanVisitsType,l=n.excludeBots,u=void 0!==l&&l,j=function(e){return{active:o===e,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{orphanVisitsType:e===(null===n||void 0===n?void 0:n.orphanVisitsType)?void 0:e}))}}};return Object(a.jsxs)(Q,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(H.a,{header:!0,children:"Bots:"}),Object(a.jsx)(H.a,{active:u,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{excludeBots:!(null!==n&&void 0!==n&&n.excludeBots)}))},children:"Exclude potential bots"})]}),i&&s&&Object(a.jsx)(H.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(H.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(H.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(H.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(H.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{disabled:!Object(Ue.d)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},fa=function(e){var t,r,n=e.chart.config,c=null!==(t=n.data)&&void 0!==t?t:{},s=c.labels,i=void 0===s?[]:s,o=c.datasets,l=void 0===o?[]:o,u=Object(E.a)(l,1)[0].backgroundColor,d=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor;return Object(a.jsx)("ul",{className:"doughnut-chart-legend",children:i.map((function(e,t){var r;return Object(a.jsxs)("li",{className:"doughnut-chart-legend__item d-flex",children:[Object(a.jsx)("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:null!==(r=u[t])&&void 0!==r?r:d}}),Object(a.jsx)("small",{className:"doughnut-chart-legend__item-text flex-fill",children:e})]},e)}))})},ma=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(Vc.h)()?Vc.e:Vc.f,borderWidth:2}]},ga=Object(D.memo)((function(e){var t=e.stats,r=Object(D.useState)(),n=Object(E.a)(r,2),c=n[0],s=n[1],i=Object(Ce.a)(t),o=Object(Ne.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:Lc}}}},u=function(e,t){return{labels:e,datasets:ma(t)}}(i,o);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-sm-12 col-md-7",children:Object(a.jsx)(jc.b,{height:300,data:u,options:l,ref:function(e){s(null!==e&&void 0!==e?e:void 0)}})}),Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:c&&Object(a.jsx)(fa,{chart:c})})]})})),xa=r(729),pa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(we.a,{children:[Object(a.jsx)(Yn.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(Xn.a,{children:n}),r&&Object(a.jsx)(xa.a,{className:"chart-card__footer--sticky",children:r})]})},Sa=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(pa,{title:t,children:Object(a.jsx)(ga,{stats:r})})},ya=r(132),Ca=r(738),Na=r(730),wa=r(731),_a=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(_e.a,{children:[Object(a.jsx)(q.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(z.a,{right:!0,children:[r.map((function(e){return Object(a.jsxs)(H.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},ka=function(e){return e.startsWith("hidden")?"":e},Ua=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:Vc.d,borderColor:Vc.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:Vc.b,borderColor:Vc.a,borderWidth:2}]},Ta=function(e,t){return function(r){var n=Object(E.a)(r,1)[0];t&&n&&t(e[n.index])}},Ra=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ce.a)(t).map(ka),o=Object(Ne.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ce.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=Tc(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:Dc}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:Zt}},y:{stacked:!0}},onHover:Ec,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:Ua(t,r,n)}}(i,o,l,n),b=function(e){return e.length>20?10*e.length:void 0}(i),h=function(e){return Object(a.jsx)(jc.a,{data:j,options:u,height:b,getElementAtEvent:Ta(i,c)},"".concat(b,"_").concat(e))};return Object(a.jsxs)(a.Fragment,{children:[void 0!==r&&h("with_stats"),void 0===r&&h("without_stats")]})},Ea=function(e){return"String"===Object(ya.a)(e)?Object(Ca.a)(e):e},Da=function(e){return Object(E.a)(e,1)[0]},La=function(e){return Object(E.a)(e,2)[1]},Va=function(e){var t=e.stats,r=e.highlightedStats,n=e.title,c=e.sortingItems,s=e.extraHeaderContent,i=e.withPagination,o=void 0===i||i,l=Object(jr.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(D.useState)({orderField:void 0,orderDir:void 0}),j=Object(E.a)(u,2),b=j[0],h=j[1],O=Object(D.useState)(1),v=Object(E.a)(O,2),f=v[0],m=v[1],g=Object(D.useState)(50),x=Object(E.a)(g,2),p=x[0],S=x[1],y=function(e){var t=e[f-1];if(f0?r:void 0,c),N=C.currentPageStats,w=C.currentPageHighlightedStats,_=C.pagination,k=C.max,U=Object.keys(N);return Object(a.jsx)(pa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Te,{isButton:!1,right:!0,items:c,orderField:b.orderField,orderDir:b.orderDir,onChange:function(e,t){h({orderField:e,orderDir:t}),m(1)}})}),o&&Object.keys(t).length>50&&Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(_a,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:p,setValue:function(e){S(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(_?U:void 0)})]})},footer:_,children:Object(a.jsx)(Ra,Object(d.a)({stats:N,highlightedStats:w,max:k},l))})},Ia={byTime:{title:"By time",subPath:"",icon:V.d},byContext:{title:"By context",subPath:"/by-context",icon:V.g},byLocation:{title:"By location",subPath:"/by-location",icon:V.w},list:{title:"List",subPath:"/list",icon:V.v}},Fa=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(lc.a,{tag:o.c,className:"visits-stats__nav-link",to:c,isActive:function(e,r){return r.pathname.endsWith("visits".concat(t))},replace:!0,children:[Object(a.jsx)(I.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},Aa=function(e){var t,r,n=e.children,c=e.visitsInfo,s=e.getVisits,i=e.cancelGetVisits,o=e.baseUrl,l=e.domain,u=e.settings,j=e.exportCsv,h=e.selectedServer,O=e.isOrphanVisits,v=void 0!==O&&O,f=null!==(t=null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",m=Object(D.useState)(je(f)),g=Object(E.a)(m,2),x=g[0],p=g[1],S=Object(D.useState)([]),C=Object(E.a)(S,2),N=C[0],w=C[1],_=Object(D.useState)(),k=Object(E.a)(_,2),U=k[0],T=k[1],R=Object(D.useState)({}),L=Object(E.a)(R,2),F=L[0],A=L[1],M=Object(wt.a)(h),P=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},B=c.visits,H=c.loading,W=c.loadingLarge,q=c.error,z=c.errorData,K=c.progress,Q=Object(D.useMemo)((function(){return Oa(B)}),[B]),J=Object(D.useMemo)((function(){return ha(Q)}),[Q]),Z=J.os,Y=J.browsers,X=J.referrers,$=J.countries,ee=J.cities,te=J.citiesForMap,re=J.visitedUrls,ne=Object(Ne.a)(te),ce=function(e){Be=void 0,w(e)},ae=function(e){return function(t){var r="".concat(e,"_").concat(t);Be===r?(w([]),T(void 0),Be=void 0):(w(Q.filter(Object(oc.a)(e,t))),T(t),Be=r)}};Object(D.useEffect)((function(){return i}),[]),Object(D.useEffect)((function(){s({dateRange:x,filter:F})}),[x,F]);return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("section",{className:"mt-3",children:Object(a.jsxs)("div",{className:"row flex-md-row-reverse",children:[Object(a.jsx)("div",{className:"col-lg-7 col-xl-6",children:Object(a.jsxs)("div",{className:"d-md-flex",children:[Object(a.jsx)("div",{className:"flex-fill",children:Object(a.jsx)(ge,{disabled:H,initialDateRange:f,defaultText:"All visits",onDatesChange:p})}),Object(a.jsx)(va,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:M,selected:F,onChange:A})]})}),B.length>0&&Object(a.jsx)("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:Object(a.jsxs)("div",{className:"d-flex",children:[Object(a.jsxs)(Vr.a,{outline:!0,disabled:0===N.length,className:"btn-md-block mr-2",onClick:function(){return ce([])},children:["Clear selection ",N.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",N.length,")"]})]}),Object(a.jsxs)(Vr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j(Q)},children:[Object(a.jsx)(I.a,{icon:V.q})," Export (",Q.length,")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:W?Object(a.jsxs)(Xr.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(uc.a,{value:K,striped:100===K,className:"mt-3"})]}):H?Object(a.jsx)(Xr.a,{loading:!0}):q?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:z,fallbackMessage:"An error occurred while loading visits :("})}):Object(y.a)(B)?Object(a.jsx)(Xr.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(we.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(dc.a,{pills:!0,fill:!0,children:Object.entries(Ia).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(Fa,Object(d.a)(Object(d.a)({},n),{},{to:P(n.subPath)}),r)}))})}),Object(a.jsx)(wr.a,{children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:o,children:Object(a.jsx)("div",{className:"col-12 mt-3",children:Object(a.jsx)(qc,{title:"Visits during time",visits:Q,highlightedVisits:N,highlightedLabel:U,setSelectedVisits:ce})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Ia.byContext.subPath),children:[Object(a.jsx)("div",{className:G()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Sa,{title:"Operating systems",stats:Z})}),Object(a.jsx)("div",{className:G()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Sa,{title:"Browsers",stats:Y})}),Object(a.jsx)("div",{className:G()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(Va,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:ia(N,"referer"),highlightedLabel:U,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ae("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(Va,{title:"Visited URLs",stats:re,highlightedLabel:U,highlightedStats:ia(N,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ae("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Ia.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Va,{title:"Countries",stats:$,highlightedStats:ia(N,"country"),highlightedLabel:U,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ae("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Va,{title:"Cities",stats:ee,highlightedStats:ia(N,"city"),highlightedLabel:U,extraHeaderContent:function(e){return ne.length>0&&Object(a.jsx)(na,{modalTitle:"Cities",locations:ne,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ae("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(Ia.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(Jc,{visits:Q,selectedVisits:N,setSelectedVisits:ce,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},Ma=function(e){var t=e.exportVisits;return Ee((function(e){var r=e.history.goBack,n=e.match,c=n.params,s=n.url,i=e.location.search,o=e.shortUrlVisits,l=e.shortUrlDetail,u=e.getShortUrlVisits,j=e.getShortUrlDetail,b=e.cancelGetShortUrlVisits,h=e.settings,O=e.selectedServer,v=c.shortCode,f=Object(C.a)(i).domain;return Object(D.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(Aa,{getVisits:function(e){return u(v,Object(d.a)(Object(d.a)({},oa(e)),{},{domain:f}))},cancelGetVisits:b,visitsInfo:o,baseUrl:s,domain:f,settings:h,exportCsv:function(e){var r;return t("short-url_".concat(null===(r=l.shortUrl)||void 0===r?void 0:r.shortUrl.replace(/https?:\/\//g,""),"_visits.csv"),e)},selectedServer:O,children:Object(a.jsx)(ic,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[De.shortUrlVisits(t.params.shortCode)]}))},Ga=r(743),Pa=5e3,Ba=function(e){return e.currentPage>=e.pagesCount},Ha=function(e,t){return 100*t/e},Wa=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n,c,a){var s,i,o,l;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c({type:n.start}),s=function(){var e=Object(g.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(r.map(function(){var e=Object(g.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(r,Pa).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(Ga.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i=function(){var e=Object(g.a)(m.a.mark((function e(t){var r,o,l=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>1&&void 0!==l[1]?l[1]:0,!a()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,s(t[r]);case 5:if(o=e.sent,c({type:n.progress,progress:Ha(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,Pa);case 3:if(a=e.sent,s=a.pagination,o=a.data,s&&!Ba(s)){e.next=8;break}return e.abrupt("return",o);case 8:return l=Object(qt.a)(2,s.pagesCount+1),u=Object(zc.a)(4,l),s.pagesCount-1>4&&c({type:n.large}),e.t0=o,e.next=14,i(u);case 14:return e.t1=e.sent,e.abrupt("return",e.t0.concat.call(e.t0,e.t1));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.prev=4,e.next=7,o();case 7:l=e.sent,c(Object(d.a)(Object(d.a)({},r),{},{visits:l,type:n.finish})),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),c({type:n.error,errorData:ot(e.t0)});case 14:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",za="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",Ka="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",Qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",Ja="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",Za="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",Ya={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Xa=$e((He={},Object(u.a)(He,qa,(function(){return Object(d.a)(Object(d.a)({},Ya),{},{loading:!0})})),Object(u.a)(He,za,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ya),{},{error:!0,errorData:r})})),Object(u.a)(He,Ka,(function(e,t){var r=t.visits,n=t.shortCode,c=t.domain;return Object(d.a)(Object(d.a)({},Ya),{},{visits:r,shortCode:n,domain:c})})),Object(u.a)(He,Qa,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(He,Ja,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(He,Za,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(He,st,(function(e,t){var r=t.createdVisits,n=e.shortCode,c=e.domain,a=e.visits,s=r.filter((function(e){var t=e.shortUrl;return t&&at(t,n,c)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(Se.a)(s),Object(Se.a)(a))})})),He),Ya),$a=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getShortUrlVisits,o=function(){var e=Object(g.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().shortUrlVisits.cancelLoad},u={shortCode:t,domain:r.domain},j={start:qa,large:Qa,finish:Ka,error:za,progress:Za},n.abrupt("return",Wa(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},es=et(Ja),ts=function(e){var t=e.tagVisits,r=e.goBack,n=e.colorGenerator,c=t.visits,s=t.tag,i=Object(a.jsxs)("span",{className:"d-flex align-items-center justify-content-center",children:[Object(a.jsx)("span",{className:"mr-2",children:"Visits for"}),Object(a.jsx)(B,{text:s,colorGenerator:n})]});return Object(a.jsx)(sc,{title:i,goBack:r,visits:c})},rs=function(e,t){var r=t.exportVisits;return Ee((function(t){var n=t.history.goBack,c=t.match,s=c.params,i=c.url,o=t.getTagVisits,l=t.tagVisits,u=t.cancelGetTagVisits,d=t.settings,j=t.selectedServer,b=s.tag;return Object(a.jsx)(Aa,{getVisits:function(e){return o(b,oa(e))},cancelGetVisits:u,visitsInfo:l,baseUrl:i,settings:d,exportCsv:function(e){return r("tag_".concat(b,"_visits.csv"),e)},selectedServer:j,children:Object(a.jsx)(ts,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[De.visits]}))},ns="shlink/tagVisits/GET_TAG_VISITS_START",cs="shlink/tagVisits/GET_TAG_VISITS_ERROR",as="shlink/tagVisits/GET_TAG_VISITS",ss="shlink/tagVisits/GET_TAG_VISITS_LARGE",is="shlink/tagVisits/GET_TAG_VISITS_CANCEL",os="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",ls={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},us=$e((We={},Object(u.a)(We,ns,(function(){return Object(d.a)(Object(d.a)({},ls),{},{loading:!0})})),Object(u.a)(We,cs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ls),{},{error:!0,errorData:r})})),Object(u.a)(We,as,(function(e,t){var r=t.visits,n=t.tag;return Object(d.a)(Object(d.a)({},ls),{},{visits:r,tag:n})})),Object(u.a)(We,ss,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(We,is,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(We,os,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(We,st,(function(e,t){var r=t.createdVisits,n=e.tag,c=e.visits,a=r.filter((function(e){var t=e.shortUrl;return null===t||void 0===t?void 0:t.tags.includes(n)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(Se.a)(a),Object(Se.a)(c))})})),We),ls),ds=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getTagVisits,o=function(){var e=Object(g.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().tagVisits.cancelLoad},u={tag:t},j={start:ns,large:ss,finish:as,error:cs,progress:os},n.abrupt("return",Wa(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},js=et(is),bs=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(sc,{title:"Orphan visits",goBack:r,visits:n})},hs=function(e){var t=e.exportVisits;return Ee((function(e){var r=e.history.goBack,n=e.match.url,c=e.getOrphanVisits,s=e.orphanVisits,i=e.cancelGetOrphanVisits,o=e.settings,l=e.selectedServer;return Object(a.jsx)(Aa,{getVisits:function(e){var t;return c(oa(e),null===(t=e.filter)||void 0===t?void 0:t.orphanVisitsType)},cancelGetVisits:i,visitsInfo:s,baseUrl:n,settings:o,exportCsv:function(e){return t("orphan_visits.csv",e)},selectedServer:l,isOrphanVisits:!0,children:Object(a.jsx)(bs,{orphanVisits:s,goBack:r})})}),(function(){return[De.orphanVisits]}))},Os="shlink/orphanVisits/GET_ORPHAN_VISITS_START",vs="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",fs="shlink/orphanVisits/GET_ORPHAN_VISITS",ms="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",gs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",xs="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",ps={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ss=$e((qe={},Object(u.a)(qe,Os,(function(){return Object(d.a)(Object(d.a)({},ps),{},{loading:!0})})),Object(u.a)(qe,vs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ps),{},{error:!0,errorData:r})})),Object(u.a)(qe,fs,(function(e,t){var r=t.visits;return Object(d.a)(Object(d.a)({},ps),{},{visits:r})})),Object(u.a)(qe,ms,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(qe,gs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(qe,xs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(qe,st,(function(e,t){var r=t.createdVisits,n=e.visits,c=r.map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(Se.a)(c),Object(Se.a)(n))})})),qe),ps),ys=function(e,t){return!t||t===e.type},Cs=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getOrphanVisits,o=function(){var e=Object(g.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return aa(e)&&ys(e,r)}));return Object(d.a)(Object(d.a)({},e),{},{data:t})})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().orphanVisits.cancelLoad},u={start:Os,large:ms,finish:fs,error:vs,progress:xs},n.abrupt("return",Wa(o,{},u,c,l));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},Ns=et(gs),ws="shlink/visitsOverview/GET_OVERVIEW_START",_s="shlink/visitsOverview/GET_OVERVIEW_ERROR",ks="shlink/visitsOverview/GET_OVERVIEW",Us={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},Ts=$e((ze={},Object(u.a)(ze,ws,(function(){return Object(d.a)(Object(d.a)({},Us),{},{loading:!0})})),Object(u.a)(ze,_s,(function(){return Object(d.a)(Object(d.a)({},Us),{},{error:!0})})),Object(u.a)(ze,ks,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},Us),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(ze,st,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(jr.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=sa(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),ze),Us),Rs=function(e){return function(){return function(){var t=Object(g.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:ws}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:ks},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:_s});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Es=function e(t,r){var n=this;Object(x.a)(this,e),this.window=t,this.csvjson=r,this.exportVisits=function(e,t){if(t.length){var r=n.csvjson.toCSV(t,{headers:"key"});Object(nc.a)(n.window,r,e)}}},Ds=function(e,t){e.serviceFactory("MapModal",(function(){return ra})),e.serviceFactory("ShortUrlVisits",Ma,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",rs,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",hs,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",Es,"window","csvjson"),e.serviceFactory("getShortUrlVisits",$a,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return es})),e.serviceFactory("getTagVisits",ds,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return js})),e.serviceFactory("getOrphanVisits",Cs,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return Ns})),e.serviceFactory("createNewVisits",(function(){return it})),e.serviceFactory("loadVisitsOverview",Rs,"buildShlinkApiClient")},Ls=r(331),Vs=r.n(Ls),Is=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},Fs=function(e){return{id:e,name:e}},As=function(e){return function(t){var r,n,c=t.selectedTags,s=t.onChange,i=t.placeholder,o=t.listTags,l=t.tagsList,u=t.settings;Object(D.useEffect)((function(){o()}),[]);var d=null!==(r=null===(n=u.shortUrlCreation)||void 0===n?void 0:n.tagFilteringMode)&&void 0!==r?r:"startsWith";return Object(a.jsx)(Vs.a,{tags:c.map(Fs),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(B,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map(Fs),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Is,{tag:"".concat(r.name),colorGenerator:e}),r.name]})},allowNew:!0,addOnBlur:!0,placeholderText:null!==i&&void 0!==i?i:"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:"includes"===d?function(e,t){return t.filter((function(t){return t.name.includes(e)}))}:void 0,onDelete:function(e){var t=Object(Se.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(Se.a)(new Set([].concat(Object(Se.a)(c),Object(Se.a)(t.toLowerCase().split(","))))))}})}},Ms=r(681),Gs=function(e,t,r){return function(n){var c=n.tag,s=n.tagStats,i=n.selectedServer,l=n.displayed,u=n.toggle,d=Object(K.d)(),j=Object(E.a)(d,2),b=j[0],h=j[1],O=Object(K.d)(),f=Object(E.a)(O,2),m=f[0],g=f[1],x=Object(K.d)(),p=Object(E.a)(x,3),S=p[0],y=p[2],C=Object(D.useRef)(),N=Object(v.e)(i)?i.id:"";return Object(D.useEffect)((function(){var e;(e=C.current)&&e.scrollWidth>e.clientWidth&&y()}),[C.current]),Object(a.jsxs)(we.a,{className:"tag-card",children:[Object(a.jsxs)(Yn.a,{className:"tag-card__header",children:[Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:h,children:Object(a.jsx)(I.a,{icon:V.O})}),Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:g,children:Object(a.jsx)(I.a,{icon:V.B})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:S?c:void 0,ref:function(e){C.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(Is,{tag:c,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:u,children:c})]})]}),s&&Object(a.jsx)(Ms.a,{isOpen:l,children:Object(a.jsxs)(Xn.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/list-short-urls/1?tag=").concat(encodeURIComponent(c)),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center mb-1",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.u,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:Zt(s.shortUrlsCount)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/tag/").concat(c,"/visits"),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:Zt(s.visitsCount)})]})]})}),Object(a.jsx)(e,{tag:c,toggle:h,isOpen:b}),Object(a.jsx)(t,{tag:c,toggle:g,isOpen:m})]})}},Ps=function(e){var t=e.tag,r=e.toggle,n=e.isOpen,c=e.deleteTag,s=e.tagDelete,i=e.tagDeleted,o=s.deleting,l=s.error,u=s.errorData,d=function(){var e=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t);case 2:i(t),r();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(a.jsxs)(pr.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(Sr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(yr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(kr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",disabled:o,onClick:d,children:o?"Deleting tag...":"Delete tag"})]})]})},Bs=r(734),Hs=r(343),Ws=function(e){var t=e.getColorForKey;return function(e){var r=e.tag,n=e.editTag,c=e.toggle,s=e.tagEdited,i=e.isOpen,o=e.tagEdit,l=Object(D.useState)(r),u=Object(E.a)(l,2),d=u[0],j=u[1],b=Object(D.useState)(t(r)),h=Object(E.a)(b,2),O=h[0],v=h[1],f=Object(K.d)(),x=Object(E.a)(f,4),p=x[0],S=x[1],y=x[3],C=o.editing,N=o.error,w=o.errorData,_=Object(Ue.c)(Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n(r,d,O).then((function(){return s(r,d,O)})).then(c).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(pr.a,{isOpen:i,toggle:c,centered:!0,onClosed:y,children:Object(a.jsxs)("form",{onSubmit:_,children:[Object(a.jsx)(Sr.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("div",{className:"input-group",children:[Object(a.jsx)("div",{className:"input-group-prepend",id:"colorPickerBtn",onClick:S,children:Object(a.jsx)("div",{className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:O,borderColor:O},children:Object(a.jsx)(I.a,{icon:V.z,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(Bs.a,{isOpen:p,toggle:S,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(Hs.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(Mr.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),N&&Object(a.jsx)(kr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:w,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)(Vr.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)(Vr.a,{color:"primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},qs=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(Q,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(H.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(I.a,{icon:V.M,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(H.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(I.a,{icon:V.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},zs=function(e,t){return Ee((function(r){var n,c,s=r.filterTags,i=r.forceListTags,o=r.tagsList,l=r.selectedServer,u=r.settings,d=Object(D.useState)(null!==(n=null===(c=u.ui)||void 0===c?void 0:c.tagsMode)&&void 0!==n?n:"cards"),j=Object(E.a)(d,2),b=j[0],h=j[1];if(Object(D.useEffect)((function(){i()}),[]),o.loading)return Object(a.jsx)(Xr.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(P,{className:"mb-3",onChange:s}),Object(a.jsx)(wr.a,{className:"mb-3",children:Object(a.jsx)("div",{className:"col-lg-6 offset-lg-6",children:Object(a.jsx)(qs,{mode:b,onChange:h})})}),o.error?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:o.errorData,fallbackMessage:"Error loading tags :("})}):o.filteredTags.length<1?Object(a.jsx)(Xr.a,{children:"No tags found"}):"cards"===b?Object(a.jsx)(e,{tagsList:o,selectedServer:l}):Object(a.jsx)(t,{tagsList:o,selectedServer:l})]})}),(function(){return[De.visits]}))},Ks="shlink/deleteTag/DELETE_TAG_START",Qs="shlink/deleteTag/DELETE_TAG_ERROR",Js="shlink/deleteTag/DELETE_TAG",Zs="shlink/deleteTag/TAG_DELETED",Ys=$e((Ke={},Object(u.a)(Ke,Ks,(function(){return{deleting:!0,error:!1}})),Object(u.a)(Ke,Qs,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Ke,Js,(function(){return{deleting:!1,error:!1}})),Ke),{deleting:!1,error:!1}),Xs=function(e){return function(t){return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Ks}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:Js}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:Qs,errorData:ot(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},$s=function(e){return{type:Zs,tag:e}},ei="shlink/editTag/EDIT_TAG_START",ti="shlink/editTag/EDIT_TAG_ERROR",ri="shlink/editTag/EDIT_TAG",ni="shlink/editTag/TAG_EDITED",ci=$e((Qe={},Object(u.a)(Qe,ei,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(Qe,ti,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(Qe,ri,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),Qe),{oldName:"",newName:"",editing:!1,error:!1}),ai=function(e,t){return function(r,n,c){return function(){var a=Object(g.a)(m.a.mark((function a(s,i){var o,l;return m.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s({type:ei}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:ri,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:ti,errorData:ot(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},si=function(e,t,r){return{type:ni,oldName:e,newName:t,color:r}},ii="shlink/tagsList/LIST_TAGS_START",oi="shlink/tagsList/LIST_TAGS_ERROR",li="shlink/tagsList/LIST_TAGS",ui="shlink/tagsList/FILTER_TAGS",di={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},ji=function(e,t){return function(r){return r===e?t:r}},bi=function(e,t){return Object(p.a)((function(e){return e===t}),e)},hi=function(e){return Object.entries(e.reduce((function(e,t){var r=t.shortUrl;return null===r||void 0===r||r.tags.forEach((function(t){e[t]=(e[t]||0)+1})),e}),{}))},Oi=$e((Je={},Object(u.a)(Je,ii,(function(){return Object(d.a)(Object(d.a)({},di),{},{loading:!0})})),Object(u.a)(Je,oi,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},di),{},{error:!0,errorData:r})})),Object(u.a)(Je,li,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},di),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(Je,Zs,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:bi(e.tags,r),filteredTags:bi(e.filteredTags,r)})})),Object(u.a)(Je,ni,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(ji(r,n)).sort(),filteredTags:e.filteredTags.map(ji(r,n)).sort()})})),Object(u.a)(Je,ui,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredTags:e.tags.filter((function(e){return e.toLowerCase().match(r)}))})})),Object(u.a)(Je,st,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=hi(c),n=e.stats,r.reduce((function(e,t){var r=Object(E.a)(t,2),n=r[0],c=r[1];if(!e[n])return e;var a=e[n];return a.visitsCount=a.visitsCount+c,e[n]=a,e}),Object(d.a)({},n)))})})),Je),di),vi=function(e){return{type:ui,searchTerm:e}},fi=Math.ceil,mi=function(e){return function(t){var r=t.tagsList,n=t.selectedServer,c=Object(D.useState)(),s=Object(E.a)(c,2),i=s[0],o=s[1],l=r.filteredTags.length,u=Object(zc.a)(fi(l/4),r.filteredTags);return Object(a.jsx)(wr.a,{children:u.map((function(t,c){return Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:t.map((function(t){return Object(a.jsx)(e,{tag:t,tagStats:r.stats[t],selectedServer:n,displayed:i===t,toggle:function(){return o(i!==t?t:void 0)}},t)}))},c)}))})}},gi=function(e,t){return function(r){var n,c=r.tagsList,s=r.selectedServer,i=r.location,o=Object(D.useRef)(!0),l=Object(C.a)(i.search).page,u=void 0===l?1:l,d=Object(K.a)("page",Number(u)),j=Object(E.a)(d,2),b=j[0],h=j[1],O=c.filteredTags,v=Object(zc.a)(20,O),f=v.length>1,m=null!==(n=v[b-1])&&void 0!==n?n:[];return Object(D.useEffect)((function(){!o.current&&h(1),o.current=!1}),[c.filteredTags]),Object(D.useEffect)((function(){scrollTo(0,0)}),[b]),Object(a.jsxs)(_r.a,{bodyClassName:f?"pb-1":"",children:[Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{children:"Tag"}),Object(a.jsx)("th",{className:"text-lg-right",children:"Short URLs"}),Object(a.jsx)("th",{className:"text-lg-right",children:"Visits"}),Object(a.jsx)("th",{})]})}),Object(a.jsxs)("tbody",{children:[0===m.length&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:4,className:"text-center",children:"No results found"})}),m.map((function(r){return Object(a.jsx)(t,{tag:r,tagStats:c.stats[r],selectedServer:s,colorGenerator:e},r)}))]})]}),f&&Object(a.jsx)("div",{className:"sticky-card-paginator",children:Object(a.jsx)(Kc,{pagesCount:v.length,currentPage:b,setCurrentPage:h})})]},b)}},xi=function(e,t){return function(r){var n,c,s=r.tag,i=r.tagStats,l=r.colorGenerator,u=r.selectedServer,d=Object(K.d)(),j=Object(E.a)(d,2),b=j[0],h=j[1],O=Object(K.d)(),f=Object(E.a)(O,2),m=f[0],g=f[1],x=Object(K.d)(),p=Object(E.a)(x,2),S=p[0],y=p[1],C=Object(v.a)(u);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsxs)("th",{className:"responsive-table__cell","data-th":"Tag",children:[Object(a.jsx)(Is,{tag:s,colorGenerator:l})," ",s]}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Short URLs",children:Object(a.jsx)(o.b,{to:"/server/".concat(C,"/list-short-urls/1?tag=").concat(encodeURIComponent(s)),children:Zt(null!==(n=null===i||void 0===i?void 0:i.shortUrlsCount)&&void 0!==n?n:0)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(o.b,{to:"/server/".concat(C,"/tag/").concat(s,"/visits"),children:Zt(null!==(c=null===i||void 0===i?void 0:i.visitsCount)&&void 0!==c?c:0)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)(mr,{toggle:y,isOpen:S,children:[Object(a.jsxs)(H.a,{onClick:g,children:[Object(a.jsx)(I.a,{icon:V.B,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(H.a,{onClick:h,children:[Object(a.jsx)(I.a,{icon:V.O,fixedWidth:!0,className:"mr-1"})," Delete"]})]})}),Object(a.jsx)(t,{tag:s,toggle:g,isOpen:m}),Object(a.jsx)(e,{tag:s,toggle:h,isOpen:b})]})}},pi=function(e,t){e.serviceFactory("TagsSelector",As,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",Gs,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return Ps})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Ws,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",mi,"TagCard"),e.serviceFactory("TagsTableRow",xi,"DeleteTagConfirmModal","EditTagModal"),e.serviceFactory("TagsTable",gi,"ColorGenerator","TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",zs,"TagsCards","TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"]));var r=function(e){return function(t){return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(){return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s,i,o,l,u,d,j;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c(),s=a.tagsList,t||!s.loading&&Object(y.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:ii}),r.prev=4,i=e(c),o=i.listTags,r.next=8,o();case 8:l=r.sent,u=l.tags,d=l.stats,j=(void 0===d?[]:d).reduce((function(e,t){var r=t.tag,n=t.shortUrlsCount,c=t.visitsCount;return e[r]={shortUrlsCount:n,visitsCount:c},e}),{}),n({tags:u,stats:j,type:li}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:oi,errorData:ot(r.t0)});case 19:case"end":return r.stop()}}),r,null,[[4,16]])})));return function(e,t){return r.apply(this,arguments)}}()}}(t.buildShlinkApiClient,e)}};e.factory("listTags",r(!1)),e.factory("forceListTags",r(!0)),e.serviceFactory("filterTags",(function(){return vi})),e.serviceFactory("tagDeleted",(function(){return $s})),e.serviceFactory("tagEdited",(function(){return si})),e.serviceFactory("deleteTag",Xs,"buildShlinkApiClient"),e.serviceFactory("editTag",ai,"buildShlinkApiClient","ColorGenerator")},Si=r(336),yi="shlink/mercure/GET_MERCURE_INFO_START",Ci="shlink/mercure/GET_MERCURE_INFO_ERROR",Ni="shlink/mercure/GET_MERCURE_INFO",wi=$e((Ze={},Object(u.a)(Ze,yi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ze,Ci,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(Ze,Ni,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),Ze),{loading:!0,error:!1}),_i=function(e){return function(){return function(){var t=Object(g.a)(m.a.mark((function t(r,n){var c,a,s,i,o;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r({type:yi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:Ci}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:Ni,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:Ci});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},ki=function(e){e.serviceFactory("loadMercureInfo",_i,"buildShlinkApiClient")},Ui=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(_r.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(Rc,{checked:r.enabled,onChange:n,children:["Enable or disable real-time updates, when using Shlink v2.2.0 or newer.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["Real-time updates are currently being ",Object(a.jsx)("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{className:G()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(Mr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){var t=e.target;return c(Number(t.value))}}),r.enabled&&Object(a.jsxs)("small",{className:"form-text text-muted",children:[void 0!==r.interval&&r.interval>0&&Object(a.jsxs)("span",{children:["Updates will be reflected in the UI every ",Object(a.jsx)("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},Ti=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(wr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},Ri=function(e,t,r,n){return function(){return Object(a.jsx)(un.a,{children:Object(a.jsx)(Ti,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},Ei=r(741),Di="shlink/realTimeUpdates/SET_SETTINGS",Li=$e(Object(u.a)({},Di,(function(e,t){return Object(Ei.a)(e,Object(Rn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),Vi=function(e){return{type:Di,realTimeUpdates:{enabled:e}}},Ii=function(e){return{type:Di,realTimeUpdates:{interval:e}}},Fi=function(e){return{type:Di,shortUrlCreation:e}},Ai=function(e){return{type:Di,ui:e}},Mi=function(e){return{type:Di,visits:e}},Gi=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},Pi=function(e){var t,r,n,c=e.settings,s=e.setShortUrlCreationSettings,i=null!==(t=c.shortUrlCreation)&&void 0!==t?t:{validateUrls:!1},o=function(e){return function(){return s(Object(d.a)(Object(d.a)({},null!==i&&void 0!==i?i:{validateUrls:!1}),{},{tagFilteringMode:e}))}};return Object(a.jsxs)(_r.a,{title:"Short URLs creation",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(Rc,{checked:null!==(r=i.validateUrls)&&void 0!==r&&r,onChange:function(e){return s(Object(d.a)(Object(d.a)({},i),{},{validateUrls:e}))},children:["By default, request validation on long URLs when creating new short URLs.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Validate URL"})," checkbox will be ",Object(a.jsx)("b",{children:i.validateUrls?"checked":"unchecked"}),"."]})]})}),Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(Q,{text:Gi(i.tagFilteringMode),children:[Object(a.jsx)(H.a,{active:!i.tagFilteringMode||"startsWith"===i.tagFilteringMode,onClick:o("startsWith"),children:Gi("startsWith")}),Object(a.jsx)(H.a,{active:"includes"===i.tagFilteringMode,onClick:o("includes"),children:Gi("includes")})]}),Object(a.jsx)("small",{className:"form-text text-muted",children:(n=i.tagFilteringMode,"includes"===n?Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain existing ones ",Object(a.jsx)("b",{children:"including"})," provided input."]}):Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain existing ones ",Object(a.jsx)("b",{children:"starting with"})," provided input."]}))})]})]})},Bi=function(e){var t,r,n=e.settings.ui,c=e.setUiSettings;return Object(a.jsxs)(_r.a,{title:"User interface",className:"h-100",children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)(I.a,{icon:"dark"===(null===n||void 0===n?void 0:n.theme)?V.y:V.J,className:"user-interface__theme-icon"}),Object(a.jsx)(Rc,{checked:"dark"===(null===n||void 0===n?void 0:n.theme),onChange:function(e){var t=e?"dark":"light";c(Object(d.a)(Object(d.a)({},n),{},{theme:t})),Object(Vc.g)(t)},children:"Use dark theme."})]}),Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(qs,{mode:null!==(t=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(Ue.a)(e)},onChange:function(e){return c(Object(d.a)(Object(d.a)({},null!==n&&void 0!==n?n:{theme:"light"}),{},{tagsMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==r?r:"cards"}),"."]})]})]})},Hi=function(e){var t,r=e.onChange,n=e.active;return Object(a.jsx)(Q,{text:null!==(t=le(n))&&void 0!==t?t:"",children:Object(a.jsx)(me,{active:n,onChange:r})})},Wi=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(_r.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(Hi,{active:null!==(t=null===(r=n.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",onChange:function(e){return c({defaultInterval:e})}})]})})},qi=function(e,t){e.serviceFactory("Settings",Ri,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",Qn.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return Ui})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return Pi})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return Bi})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return Wi})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return Vi})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return Ii})),e.serviceFactory("setShortUrlCreationSettings",(function(){return Fi})),e.serviceFactory("setUiSettings",(function(){return Ai})),e.serviceFactory("setVisitsSettings",(function(){return Mi}))},zi="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Ki=function(e){return function(t,r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START"}),s=e(a),i=s.editDomainRedirects,n.prev=2,n.next=5,i(Object(d.a)({domain:t},r));case 5:o=n.sent,c({type:zi,domain:t,redirects:o}),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR",errorData:ot(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},Qi="shlink/domainsList/LIST_DOMAINS_START",Ji="shlink/domainsList/LIST_DOMAINS_ERROR",Zi="shlink/domainsList/LIST_DOMAINS",Yi="shlink/domainsList/FILTER_DOMAINS",Xi={domains:[],filteredDomains:[],loading:!1,error:!1},$i=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},eo=$e((Ye={},Object(u.a)(Ye,Qi,(function(){return Object(d.a)(Object(d.a)({},Xi),{},{loading:!0})})),Object(u.a)(Ye,Ji,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},Xi),{},{error:!0,errorData:t})})),Object(u.a)(Ye,Zi,(function(e,t){var r=t.domains;return Object(d.a)(Object(d.a)({},Xi),{},{domains:r,filteredDomains:r})})),Object(u.a)(Ye,Yi,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredDomains:e.domains.filter((function(e){return e.domain.toLowerCase().match(r)}))})})),Object(u.a)(Ye,zi,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map($i(r,n)),filteredDomains:e.filteredDomains.map($i(r,n))})})),Ye),Xi),to=function(e){return function(){return function(){var t=Object(g.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:Qi}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,r({type:Zi,domains:s}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),r({type:Ji,errorData:ot(t.t0)});case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},ro=function(e){return{type:Yi,searchTerm:e}},no=r(736),co=r(746),ao=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(K.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(y.a)(r),b=function(){return c("")};return Object(D.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(no.a,{children:[Object(a.jsx)(Mr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(co.a,{addonType:"append",children:[Object(a.jsx)(Vr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(F.a)(b,u),children:Object(a.jsx)(I.a,{icon:V.P})}),Object(a.jsx)(dr.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(Q,{text:j?"Domain":"Domain: ".concat(r),className:j?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[d.map((function(e){var t=e.domain,n=e.isDefault;return Object(a.jsxs)(H.a,{active:r===t||n&&j,onClick:function(){return c(t)},children:[t,n&&Object(a.jsx)("span",{className:"float-right text-muted",children:"default"})]},t)})),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{onClick:Object(F.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},so=function(e){var t=e.isLast,r=Object(jr.a)(e,["isLast"]);return Object(a.jsx)(dn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},io=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(D.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(D.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(E.a)(v,2),x=f[0],p=f[1],S=Object(D.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),y=Object(E.a)(S,2),C=y[0],N=y[1],w=Object(Ue.c)(Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(u.domain,{baseUrlRedirect:Object(Ue.e)(h),regular404Redirect:Object(Ue.e)(x),invalidShortUrlRedirect:Object(Ue.e)(C)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(pr.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsxs)(Sr.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)(so,{value:h,onChange:O,children:[Object(a.jsxs)(Kr,{className:"mr-2",placement:"bottom",children:["Visitors accessing the base url, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),Object(a.jsxs)(so,{value:x,onChange:p,children:[Object(a.jsxs)(Kr,{className:"mr-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),Object(a.jsxs)(so,{value:C,isLast:!0,onChange:N,children:[Object(a.jsx)(Kr,{className:"mr-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)(Vr.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)(Vr.a,{color:"primary",children:"Save"})]})]})})},oo=function(e){var t=e.fallback;return Object(a.jsxs)("span",{className:"text-muted",children:[!t&&Object(a.jsx)("small",{children:"No redirect"}),t&&Object(a.jsxs)(a.Fragment,{children:[t," ",Object(a.jsx)("small",{children:"(as fallback)"})]})]})},lo=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(dr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},uo=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=Object(K.d)(),l=Object(E.a)(o,2),u=l[0],d=l[1],j=c.domain,b=c.isDefault,h=c.redirects,O="domainEdit".concat(j.replace(".",""));return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:b?Object(a.jsx)(lo,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:j}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===h||void 0===h?void 0:h.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(oo,{fallback:null===i||void 0===i?void 0:i.baseUrlRedirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:null!==(r=null===h||void 0===h?void 0:h.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(oo,{fallback:null===i||void 0===i?void 0:i.regular404Redirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:null!==(n=null===h||void 0===h?void 0:h.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(oo,{fallback:null===i||void 0===i?void 0:i.invalidShortUrlRedirect})}),Object(a.jsxs)("td",{className:"responsive-table__cell text-right",children:[Object(a.jsx)("span",{id:O,children:Object(a.jsx)(Vr.a,{outline:!0,size:"sm",disabled:b,onClick:b?void 0:d,children:Object(a.jsx)(I.a,{icon:b?V.b:V.m})})}),b&&Object(a.jsxs)(dr.a,{target:O,placement:"left",children:["Redirects for default domain cannot be edited here.",Object(a.jsx)("br",{}),"Use config options or env vars directly on the server."]})]}),Object(a.jsx)(io,{domain:c,isOpen:u,toggle:d,editDomainRedirects:s})]})},jo=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],bo=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=n.filteredDomains,o=n.loading,l=n.error,u=n.errorData,d=null===(t=i.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(D.useEffect)((function(){r()}),[]),o)return Object(a.jsx)(Xr.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(P,{className:"mb-3",onChange:c}),l?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:u,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(_r.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsx)("tr",{children:jo.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[i.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:jo.length,className:"text-center",children:"No results found"})}),i.map((function(e){return Object(a.jsx)(uo,{domain:e,editDomainRedirects:s,defaultRedirects:d},e.domain)}))]})]})})]})},ho=function(e,t){e.serviceFactory("DomainSelector",(function(){return ao})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return bo})),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",to,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return ro})),e.serviceFactory("editDomainRedirects",Ki,"buildShlinkApiClient")},Oo="shlink/appUpdates/APP_UPDATE_AVAILABLE",vo="shlink/appUpdates/RESET_APP_UPDATE",fo=$e((Xe={},Object(u.a)(Xe,Oo,(function(){return!0})),Object(u.a)(Xe,vo,(function(){return!1})),Xe),!1),mo=et(Oo),go=et(vo),xo=r(164),po=r(737),So=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(K.d)(),s=Object(E.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(po.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:_r.a,color:"secondary",children:[Object(a.jsx)("h4",{className:"mb-4",children:"This app has just been updated!"}),Object(a.jsxs)("p",{className:"mb-0",children:["Restart it to enjoy the new features.",Object(a.jsxs)(Vr.a,{disabled:i,className:"ml-2",color:"secondary",size:"sm",onClick:function(){o(),n()},children:[!i&&Object(a.jsxs)(a.Fragment,{children:["Restart now ",Object(a.jsx)(I.a,{icon:V.K,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},yo=r(32),Co=function(){var e=Object(g.a)(m.a.mark((function e(){var t,r,n,c,a,s,i;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=navigator.serviceWorker)||void 0===r?void 0:r.getRegistrations();case 2:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=6;break}e.t0=void 0!==t;case 6:if(!e.t0){e.next=10;break}e.t2=t,e.next=11;break;case 10:e.t2=[];case 11:n=e.t2,c=Object(yo.a)(n);try{for(c.s();!(a=c.n()).done;)s=a.value,null===(i=s.waiting)||void 0===i||i.addEventListener("statechange",(function(e){var t;"activated"===(null===(t=e.target)||void 0===t?void 0:t.state)&&window.location.reload()})),null===i||void 0===i||i.postMessage({type:"SKIP_WAITING"})}catch(o){c.e(o)}finally{c.f()}case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),No=function(e,t,r,n,c,s,i){return function(o){var l=o.fetchServers,u=o.servers,d=o.settings,j=o.appUpdated,h=o.resetAppUpdate;return Object(D.useEffect)((function(){var e,t;0===Object.keys(u).length&&l(),Object(Vc.g)(null!==(e=null===(t=d.ui)||void 0===t?void 0:t.theme)&&void 0!==e?e:"light")}),[]),Object(a.jsxs)("div",{className:"container-fluid app-container",children:[Object(a.jsx)(e,{}),Object(a.jsxs)("div",{className:"app",children:[Object(a.jsx)("div",{className:"shlink-wrapper",children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:"/",component:t}),Object(a.jsx)(b.b,{exact:!0,path:"/settings",component:s}),Object(a.jsx)(b.b,{exact:!0,path:"/server/create",component:n}),Object(a.jsx)(b.b,{exact:!0,path:"/server/:serverId/edit",component:c}),Object(a.jsx)(b.b,{path:"/server/:serverId",component:r}),Object(a.jsx)(b.b,{component:xo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(i,{})})]}),Object(a.jsx)(So,{isOpen:j,toggle:h,forceUpdate:Co})]})}},wo=function(e,t){e.serviceFactory("App",No,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",(function(){return mo})),e.serviceFactory("resetAppUpdate",(function(){return go}))},_o=new j.a,ko=_o.container,Uo=function(e,t){return Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},t,function(e,t){return function(){return e[t].apply(e,arguments)}}(ko,t)))},To=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(i.b)(e?Object(h.a)(e):null,t.reduce(Uo,{}))};wo(_o,To),Object(R.a)(_o,To,b.h),T(_o),sn(_o,To),ac(_o,To,b.h),pi(_o,To),Ds(_o,To),Object(Si.a)(_o),ki(_o),qi(_o,To),ho(_o,To);var Ro=ko,Eo=r(339),Do=r(80),Lo=r(242),Vo=Object(Do.c)({servers:Fn,selectedServer:kn,shortUrlsList:Vt,shortUrlsListParams:Gt,shortUrlCreationResult:yt,shortUrlDeletion:Ot,shortUrlEdition:Tt,shortUrlVisits:Xa,tagVisits:us,orphanVisits:Ss,shortUrlDetail:cn,tagsList:Oi,tagDelete:Ys,tagEdit:ci,mercureInfo:wi,settings:Li,domainsList:eo,visitsOverview:Ts,appUpdated:fo}),Io=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Do.d,Fo={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Ao=Object(Do.e)(Vo,Object(Lo.load)(Fo),Io(Object(Do.a)(Object(Lo.save)(Fo),Eo.a))),Mo=r(63),Go=r.n(Mo),Po=r(340),Bo=r(341),Ho=r(342),Wo=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function qo(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var r=e.installing;null!=r&&(r.onstatechange=function(){"installed"===r.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}r(663),r(664);delete Go.a.Icon.Default.prototype._getIconUrl,Go.a.Icon.Default.mergeOptions({iconRetinaUrl:Po.a,iconUrl:Bo.a,shadowUrl:Ho.a});var zo=Ro.App,Ko=Ro.ScrollToTop,Qo=Ro.ErrorHandler,Jo=Ro.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:Ao,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(Qo,{children:Object(a.jsx)(Ko,{children:Object(a.jsx)(zo,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/develop")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/develop","/service-worker.js");Wo?(!function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then((function(r){var n=r.headers.get("content-type");404===r.status||null!=n&&-1===n.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):qo(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")}))):qo(t,e)}))}}({onUpdate:function(){Ao.dispatch(Jo())}})},68:function(e,t,r){"use strict";var n=r(0);t.a=function(e){var t=e.children;return Object(n.jsx)("div",{className:"no-menu-wrapper container-xl",children:t})}},69:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u}));var n=r(179),c=r(670),a=r(675),s=r(29),i=function(e,t){var r=t.maxVersion,c=t.minVersion;if(!Object(s.d)(e))return!1;var a=!c||Object(n.compare)(e,c,">=");return(!r||Object(n.compare)(e,r,"<="))&&a},o=Object(c.a)(a.a,(function(e){try{return Object(n.compare)(e,e,"=")}catch(t){return!1}})),l=function(e){return o(e)?"v".concat(e):e},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"latest";return function(t){return o(t)?t:e}}}},[[356,1,2]]]); -//# sourceMappingURL=main.89526a11.chunk.js.map \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{107:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(3),c=r(0),a=r(1);function s(e){return function(t){return Object(a.useEffect)((function(){t.resetSelectedServer()}),[]),Object(c.jsx)(e,Object(n.a)({},t))}}},108:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return c}));var n=function(e,t,r){var n=e.document,c=n.createElement("a");c.setAttribute("href",t),c.setAttribute("download",r),c.style.visibility="hidden",n.body.appendChild(c),c.click(),n.body.removeChild(c)},c=function(e,t,r){var c=new Blob([t],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(c);n(e,a,r)}},158:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/develop"}')},161:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),a=function(e){var t=e.color,r=void 0===t?c.c:t,a=e.className;return Object(n.jsx)("svg",{className:a,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsxs)("g",{fill:r,children:[Object(n.jsx)("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),Object(n.jsx)("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),Object(n.jsx)("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),Object(n.jsx)("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})})}},162:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(0),a=r(1),s=r(54),i=r(31),o=r(68);function l(e,t){return function(r){var l=r.selectServer,u=r.selectedServer,d=r.match;return Object(a.useEffect)((function(){l(d.params.serverId)}),[d.params.serverId]),u?Object(i.c)(u)?Object(c.jsx)(t,{}):Object(c.jsx)(e,Object(n.a)({},r)):Object(c.jsx)(o.a,{children:Object(c.jsx)(s.a,{loading:!0})})}}},164:function(e,t,r){"use strict";var n=r(0),c=r(25),a=r(37);t.a=function(e){var t=e.to,r=void 0===t?"/":t,s=e.children,i=void 0===s?"Home":s;return Object(n.jsx)("div",{className:"home",children:Object(n.jsxs)(a.a,{className:"p-4",children:[Object(n.jsx)("h2",{children:"Oops! We could not find requested route."}),Object(n.jsx)("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),Object(n.jsx)("br",{}),Object(n.jsx)(c.b,{to:r,className:"btn btn-outline-primary btn-lg",children:i})]})})}},176:function(e,t,r){"use strict";var n=r(0),c=r(685),a=r(686),s=r(25),i=r(8),o=r.n(i),l=r(14),u=r(11),d=function(e){var t=e.id,r=e.name;return Object(n.jsxs)(c.a,{tag:s.b,to:"/server/".concat(t),className:"servers-list__server-item",children:[r,Object(n.jsx)(l.a,{icon:u.j,className:"servers-list__server-item-icon"})]})};t.a=function(e){var t=e.servers,r=e.children,c=e.embedded,s=void 0!==c&&c;return Object(n.jsxs)(n.Fragment,{children:[r&&Object(n.jsx)("h5",{className:"mb-md-3",children:r}),t.length>0&&Object(n.jsx)(a.a,{className:o()("servers-list__list-group",{"servers-list__list-group--embedded":s}),children:t.map((function(e){var t=e.id,r=e.name;return Object(n.jsx)(d,{id:t,name:r},t)}))})]})}},27:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(9),c=r(1),a=r(317),s=r(53),i=function(e,t){return function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,s=Object(c.useState)(r),i=Object(n.a)(s,2),o=i[0],l=i[1],u=Object(c.useRef)(void 0),d=function(){l(!r),u.current&&t(u.current),u.current=e((function(){return l(r)}),a)};return[o,d]}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(c.useState)(e),r=Object(n.a)(t,2),a=r[0],s=r[1];return[a,function(){return s(!a)},function(){return s(!0)},function(){return s(!1)}]},l=function(e,t){var r=function(e){return function(t){t.event.composedPath().some((function(e){var t=e.classList;return null===t||void 0===t?void 0:t.contains("visits-table")}))||document.querySelector(".modal")||e()}};return Object(a.useSwipeable)({delta:40,onSwipedLeft:r(t),onSwipedRight:r(e)})},u=function(e,t){var r=Object(c.useState)(t),a=Object(n.a)(r,2),i=a[0],o=a[1];return[i,function(t){var r=window,n=r.location,c=r.history,a=Object(s.a)(n.search);a[e]=t,c.pushState(null,"","".concat(n.pathname,"?").concat(Object(s.b)(a))),o(t)}]}},29:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"d",(function(){return l})),r.d(t,"c",(function(){return u})),r.d(t,"e",(function(){return d})),r.d(t,"a",(function(){return j}));var n=r(674),c=r(232),a=r(355),s=r(673),i=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Object(n.a)(r,e+1).map(t)},l=function(e){return!Object(c.a)(e)&&!Object(a.a)(e)},u=function(e){return Object(s.a)((function(e){return e.preventDefault()}),e)},d=function(e){return Object(a.a)(e)?null:e},j=function(e){return"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}},31:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"e",(function(){return c})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return i}));var n=function(e){return!(null===e||void 0===e||!e.url)&&!(null===e||void 0===e||!e.apiKey)},c=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("id"))},a=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("version"))},s=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("serverNotFound"))},i=function(e){return c(e)?e.id:""}},314:function(e,t,r){"use strict";(function(e){var n=r(315),c=r.n(n),a=r(316),s=r(347),i=r(348),o=r(349),l=r(350),u=r(318),d=r(345),j=r(107),b=r(320);t.a=function(t,r,n){t.constant("window",e.window),t.constant("console",e.console),t.constant("axios",c.a),t.service("ImageDownloader",b.a,"axios","window"),t.serviceFactory("ScrollToTop",a.a),t.decorator("ScrollToTop",n),t.serviceFactory("MainHeader",s.a,"ServersDropdown"),t.decorator("MainHeader",n),t.serviceFactory("Home",(function(){return i.a})),t.decorator("Home",j.a),t.decorator("Home",r(["servers"],["resetSelectedServer"])),t.serviceFactory("MenuLayout",o.a,"TagsList","ShortUrls","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),t.decorator("MenuLayout",r(["selectedServer","shortUrlsListParams"],["selectServer"])),t.decorator("MenuLayout",n),t.serviceFactory("AsideMenu",l.a,"DeleteServerButton"),t.serviceFactory("ShlinkVersionsContainer",(function(){return d.a})),t.decorator("ShlinkVersionsContainer",r(["selectedServer"])),t.serviceFactory("ErrorHandler",u.a,"window","console")}}).call(this,r(48))},316:function(e,t,r){"use strict";var n=r(0),c=r(1);t.a=function(){return function(e){var t=e.location,r=e.children;return Object(c.useEffect)((function(){scrollTo(0,0)}),[t]),Object(n.jsx)(n.Fragment,{children:r})}}},318:function(e,t,r){"use strict";var n=r(18),c=r(24),a=r(36),s=r(35),i=r(0),o=r(1),l=r(236),u=r(37);t.a=function(e,t){var r=e.location,d=t.error;return function(e){Object(a.a)(o,e);var t=Object(s.a)(o);function o(e){var r;return Object(n.a)(this,o),(r=t.call(this,e)).state={hasError:!1},r}return Object(c.a)(o,[{key:"componentDidCatch",value:function(e){d(e)}},{key:"render",value:function(){return this.state.hasError?Object(i.jsx)("div",{className:"home",children:Object(i.jsxs)(u.a,{className:"p-4",children:[Object(i.jsx)("h1",{children:"Oops! This is awkward :S"}),Object(i.jsx)("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),Object(i.jsx)("br",{}),Object(i.jsx)(l.a,{outline:!0,color:"primary",onClick:function(){return r.reload()},children:"Take me back"})]})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),o}(o.Component)}},320:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(15),s=r(18),i=r(24),o=r(108),l=function(){function e(t,r){Object(s.a)(this,e),this.axios=t,this.window=r}return Object(i.a)(e,[{key:"saveImage",value:function(){var e=Object(a.a)(c.a.mark((function e(t,r){var n,a,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.axios.get(t,{responseType:"blob"});case 2:n=e.sent,a=n.data,s=URL.createObjectURL(a),Object(o.b)(this.window,s,r);case 6:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}()},336:function(e,t,r){"use strict";(function(e){var n=r(27),c=r(337),a=r(338);t.a=function(t){t.constant("localStorage",e.localStorage),t.service("Storage",c.a,"localStorage"),t.service("ColorGenerator",a.a,"Storage"),t.constant("setTimeout",e.setTimeout),t.constant("clearTimeout",e.clearTimeout),t.serviceFactory("useStateFlagTimeout",n.b,"setTimeout","clearTimeout")}}).call(this,r(48))},337:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(18),c=function(e){return"".concat("shlink",".").concat(e)},a=function e(t){var r=this;Object(n.a)(this,e),this.localStorage=t,this.get=function(e){var t=r.localStorage.getItem(c(e));return t?JSON.parse(t):void 0},this.set=function(e,t){return r.localStorage.setItem(c(e),JSON.stringify(t))}}},338:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(18),c=r(29),a=Math.floor,s=Math.random,i="0123456789ABCDEF",o=function(e){return e.toLowerCase().trim()},l=function e(t){var r,l=this;Object(n.a)(this,e),this.storage=t,this.colors=void 0,this.getColorForKey=function(e){var t=o(e),r=l.colors[t];return r||l.setColorForKey(t,"#".concat(Object(c.f)(6,(function(){return i[a(s()*i.length)]})).join("")))},this.setColorForKey=function(e,t){var r=o(e);return l.colors[r]=t,l.storage.set("colors",l.colors),t},this.colors=null!==(r=this.storage.get("colors"))&&void 0!==r?r:{}}},345:function(e,t,r){"use strict";var n=r(0),c=r(8),a=r.n(c),s=r(31),i=r(673),o=r(51),l=r(69),u=Object(i.a)(Object(l.c)(),l.b),d=function(e){var t=e.project,r=e.version;return Object(n.jsx)(o.a,{href:"https://github.com/shlinkio/".concat(t,"/releases/").concat(r),className:"text-muted",children:Object(n.jsx)("b",{children:r})})},j=function(e){var t=e.selectedServer,r=e.clientVersion,c=u(void 0===r?"%_VERSION_%":r);return Object(n.jsxs)("small",{className:"text-muted",children:[Object(s.d)(t)&&Object(n.jsxs)(n.Fragment,{children:["Server: ",Object(n.jsx)(d,{project:"shlink",version:t.printableVersion})," - "]}),"Client: ",Object(n.jsx)(d,{project:"shlink-web-client",version:c})]})};t.a=function(e){var t=e.selectedServer,r=a()("text-center",{"shlink-versions-container--with-server":Object(s.d)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},347:function(e,t,r){"use strict";var n=r(9),c=r(0),a=r(11),s=r(14),i=r(1),o=r(25),l=r(678),u=r(679),d=r(680),j=r(681),b=r(682),h=r(683),O=r(684),v=r(8),f=r.n(v),m=r(27),g=r(161);t.a=function(e){return function(t){var r=t.location,v=Object(m.d)(),x=Object(n.a)(v,4),p=x[0],S=x[1],y=x[3],C=r.pathname;Object(i.useEffect)(y,[r]);var N="/settings",w=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":p});return Object(c.jsxs)(l.a,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[Object(c.jsxs)(u.a,{tag:o.b,to:"/",children:[Object(c.jsx)(g.a,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),Object(c.jsx)(d.a,{onClick:S,children:Object(c.jsx)(s.a,{icon:a.i,className:w})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:p,children:Object(c.jsxs)(b.a,{navbar:!0,className:"ml-auto",children:[Object(c.jsx)(h.a,{children:Object(c.jsxs)(O.a,{tag:o.b,to:N,active:C===N,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},348:function(e,t,r){"use strict";var n=r(0),c=r(687),a=r(355),s=r(25),i=r(353),o=r(669),l=r(51),u=r(14),d=r(11),j=r(176),b=r(161);t.a=function(e){var t=e.servers,r=Object(c.a)(t),h=!Object(a.a)(r);return Object(n.jsx)("div",{className:"home",children:Object(n.jsx)(i.a,{className:"home__main-card",children:Object(n.jsxs)(o.a,{noGutters:!0,children:[Object(n.jsx)("div",{className:"col-md-5 d-none d-md-block",children:Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)(b.a,{})})}),Object(n.jsxs)("div",{className:"col-md-7 home__servers-container",children:[Object(n.jsx)("div",{className:"p-4",children:Object(n.jsx)("h1",{className:"home__title",children:"Welcome!"})}),Object(n.jsx)(j.a,{embedded:!0,servers:r,children:!h&&Object(n.jsxs)("div",{className:"p-4 text-center",children:[Object(n.jsx)("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),Object(n.jsx)("p",{children:Object(n.jsxs)(s.b,{to:"/server/create",className:"btn btn-outline-primary btn-lg mr-2",children:[Object(n.jsx)(u.a,{icon:d.C})," ",Object(n.jsx)("span",{className:"ml-1",children:"Add a server"})]})}),Object(n.jsx)("p",{className:"mb-0 mt-5",children:Object(n.jsx)(l.a,{href:"https://shlink.io/documentation",children:Object(n.jsxs)("small",{children:[Object(n.jsx)("span",{className:"mr-1",children:"Learn more about Shlink"})," ",Object(n.jsx)(u.a,{icon:d.o})]})})})]})})]})]})})})}},349:function(e,t,r){"use strict";var n=r(3),c=r(9),a=r(0),s=r(1),i=r(41),o=r(11),l=r(14),u=r(8),d=r.n(u),j=r(162),b=r(27),h=r(43),O=r(31),v=r(164);t.a=function(e,t,r,u,f,m,g,x,p,S,y){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,w=Object(b.d)(),_=Object(c.a)(w,4),k=_[0],U=_[1],T=_[2],R=_[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.d)(N))return Object(a.jsx)(x,{});var E=Object(h.d)(N),D=Object(h.c)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":k}),V=Object(b.c)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:L,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},V),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:k}),Object(a.jsx)("div",{className:"menu-layout__container",onClick:function(){return R()},children:Object(a.jsx)("div",{className:"container-xl",children:Object(a.jsxs)(i.d,{children:[Object(a.jsx)(i.a,{exact:!0,from:"/server/:serverId",to:"/server/:serverId/overview"}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/overview",component:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/list-short-urls/:page",component:t}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/create-short-url",component:u}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/visits",component:f}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/edit",component:S}),Object(a.jsx)(i.b,{path:"/server/:serverId/tag/:tag/visits",component:m}),E&&Object(a.jsx)(i.b,{path:"/server/:serverId/orphan-visits",component:g}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),D&&Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-domains",component:y}),Object(a.jsx)(i.b,{render:function(){return Object(a.jsx)(v.a,{to:"/server/".concat(N.id,"/list-short-urls/1"),children:"List short URLs"})}})]})})})]})}))]})}),x)}},350:function(e,t,r){"use strict";var n=r(3),c=r(42),a=r(0),s=r(11),i=r(14),o=r(25),l=r(8),u=r.n(l),d=r(31),j=r(43),b=function(e){var t=e.children,r=e.to,s=e.className,i=Object(c.a)(e,["children","to","className"]);return Object(a.jsx)(o.c,Object(n.a)(Object(n.a)({className:u()("aside-menu__item",s),activeClassName:"aside-menu__item--selected",to:r},i),{},{children:t}))};t.a=function(e){return function(t){var r=t.selectedServer,n=t.showOnMobile,c=void 0!==n&&n,o=Object(d.e)(r)?r.id:"",l=Object(j.c)(r),h=u()("aside-menu",{"aside-menu--hidden":!c}),O=function(e){return"/server/".concat(o).concat(e)};return Object(a.jsx)("aside",{className:h,children:Object(a.jsxs)("nav",{className:"nav flex-column aside-menu__nav",children:[Object(a.jsxs)(b,{to:O("/overview"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.s}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Overview"})]}),Object(a.jsxs)(b,{to:O("/list-short-urls/1"),isActive:function(e,t){return null!==t.pathname.match("/list-short-urls")},children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.v}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),Object(a.jsxs)(b,{to:O("/create-short-url"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.u,flip:"horizontal"}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),Object(a.jsxs)(b,{to:O("/manage-tags"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.L}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),l&&Object(a.jsxs)(b,{to:O("/manage-domains"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.r}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),Object(a.jsxs)(b,{to:O("/edit"),className:"aside-menu__item--push",children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.A}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),Object(d.e)(r)&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},356:function(e,t,r){e.exports=r(665)},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(42),a=r(0),s=r(353),i=r(671),o=r(672),l=function(e){var t=e.title,r=e.children,l=e.bodyClassName,u=Object(c.a)(e,["title","children","bodyClassName"]);return Object(a.jsxs)(s.a,Object(n.a)(Object(n.a)({},u),{},{children:[t&&Object(a.jsx)(i.a,{children:t}),Object(a.jsx)(o.a,{className:l,children:r})]}))}},43:function(e,t,r){"use strict";r.d(t,"f",(function(){return s})),r.d(t,"h",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return l})),r.d(t,"i",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"g",(function(){return b})),r.d(t,"c",(function(){return h}));var n=r(31),c=r(69),a=function(e){return function(t){return Object(n.d)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.5.0"}),i=a({minVersion:"2.6.0"}),o=i,l=i,u=i,d=a({minVersion:"2.7.0"}),j=d,b=a({minVersion:"2.8.0"}),h=b},441:function(e,t){},443:function(e,t){},46:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return u}));var n="#4696e5",c="rgba(70, 150, 229, 0.4)",a="#f77f28",s="rgba(247, 127, 40, 0.4)",i="white",o="#161b22",l=function(e){var t,r=document.getElementsByTagName("html");null===r||void 0===r||null===(t=r[0])||void 0===t||t.setAttribute("data-theme",e)},u=function(){var e,t=document.getElementsByTagName("html");return"dark"===(null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.getAttribute("data-theme"))}},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(231),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},54:function(e,t,r){"use strict";var n=r(0),c=r(669),a=r(353),s=r(8),i=r.n(s),o=r(11),l=r(14),u=function(e){return{error:"border-danger",default:""}[e]},d=function(e){return{error:"text-danger",default:"text-muted"}[e]};t.a=function(e){var t=e.className,r=e.children,s=e.loading,j=void 0!==s&&s,b=e.type,h=void 0===b?"default":b,O=e.fullWidth,v=void 0!==O&&O,f=i()({"col-md-12":v,"col-md-10 offset-md-1":!v});return Object(n.jsx)(c.a,{noGutters:!0,className:t,children:Object(n.jsx)("div",{className:f,children:Object(n.jsx)(a.a,{className:u(h),body:!0,children:Object(n.jsxs)("h3",{className:i()("text-center mb-0",d(h)),children:[j&&Object(n.jsx)(l.a,{icon:o.k,spin:!0}),j&&Object(n.jsx)("span",{className:"ml-2",children:null!==r&&void 0!==r?r:"Loading..."}),!j&&r]})})})})}},665:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return ha})),r.d(n,"normalizeVisits",(function(){return Oa}));var c,a=r(0),s=r(49),i=r(174),o=r(25),l=r(158),u=r(10),d=r(3),j=r(313),b=r(41),h=r(735),O=r(740),v=r(31),f=r(6),m=r.n(f),g=r(15),x=r(18),p=r(346),S=r(232),y=r(355),C=r(53),N=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(p.a)(S.a),_=function e(t,r,n){var c=this;Object(x.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(g.a)(m.a.mark((function e(){var t,r=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.abrupt("return",c.performRequest("/short-urls","GET",t).then((function(e){return e.data.shortUrls})));case 2:case"end":return e.stop()}}),e)}))),this.createShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(p.a)((function(e){return Object(y.a)(e)||Object(S.a)(e)}),t),e.abrupt("return",c.performRequest("/short-urls","POST",{},r).then((function(e){return e.data})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getShortUrlVisits=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getTagVisits=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags/".concat(t,"/visits"),"GET",r).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.getOrphanVisits=function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits/orphan","GET",t).then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getVisitsOverview=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/visits","GET").then((function(e){return e.data.visits})));case 1:case"end":return e.stop()}}),e)}))),this.getShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"GET",{domain:r}).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.deleteShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"DELETE",{domain:r}).then((function(){})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.updateShortUrlTags=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t,"/tags"),"PUT",{domain:r},{tags:n}).then((function(e){return e.data.tags})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.updateShortUrl=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/short-urls/".concat(t),"PATCH",{domain:r},n).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),this.listTags=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","GET",{withStats:"true"}).then((function(e){return e.data.tags})).then((function(e){return{tags:e.data,stats:e.stats}})));case 1:case"end":return e.stop()}}),e)}))),this.deleteTags=function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","DELETE",{tags:t}).then((function(){return{tags:t}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.editTag=function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/tags","PUT",{},{oldName:t,newName:r}).then((function(){return{oldName:t,newName:r}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.health=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/health","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.mercureInfo=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/mercure-info","GET").then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)}))),this.listDomains=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains","GET").then((function(e){return e.data.domains.data})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.performRequest("/domains/redirects","PATCH",{},t).then((function(e){return e.data})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.performRequest=function(){var e=Object(g.a)(m.a.mark((function e(t){var r,n,a,s,i=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:"GET",n=i.length>2&&void 0!==i[2]?i[2]:{},a=i.length>3&&void 0!==i[3]?i[3]:{},e.prev=3,e.next=6,c.axios({method:r,url:"".concat(N(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:C.b});case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),s=e.t0.response,!s&&2!==c.apiVersion){e.next=15;break}throw e.t0;case 15:return c.apiVersion=c.apiVersion-1,e.next=18,c.performRequest(t,r,n,a);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),this.apiVersion=2},k={},U=function(e){return function(t){var r,n=function(e){return"function"===typeof e}(t)?(r=t,Object(O.a)("selectedServer",r())):t;if(!Object(v.b)(n))throw new Error("There's no selected server or it is not found");var c=n.url,a=n.apiKey,s="".concat(c,"_").concat(a);return k[s]||(k[s]=new _(e,c,a)),k[s]}},T=function(e){e.serviceFactory("buildShlinkApiClient",U,"axios")},R=r(314),E=r(9),D=r(1),L=function(e,t){return function(r){var n,c=r.match,s=null!==(n=null===c||void 0===c?void 0:c.params)&&void 0!==n?n:{},i=s.page,o=void 0===i?"1":i,l=s.serverId,u=void 0===l?"":l,j=Object(D.useState)("".concat(u,"_").concat(o)),b=Object(E.a)(j,2),h=b[0],O=b[1];return Object(D.useEffect)((function(){O("".concat(u,"_").concat(o))}),[u,o]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"form-group",children:Object(a.jsx)(e,{})}),Object(D.createElement)(t,Object(d.a)(Object(d.a)({},r),{},{key:h}))]})}},V=r(11),I=r(14),F=r(673),A=r(431),M=r(8),G=r.n(M),P=function(e){var t=e.onChange,r=e.className,n=e.large,s=void 0===n||n,i=e.noBorder,o=void 0!==i&&i,l=Object(D.useState)(""),u=Object(E.a)(l,2),d=u[0],j=u[1],b=function(){c&&clearTimeout(c),c=null},h=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;j(e),b(),c=setTimeout((function(){t(e),b()}),r)};return Object(a.jsxs)("div",{className:G()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:G()("form-control search-field__input",{"form-control-lg":s,"search-field__input--no-border":o}),placeholder:"Search...",value:d,onChange:function(e){return h(e.target.value)}}),Object(a.jsx)(I.a,{icon:V.F,className:"search-field__icon"}),Object(a.jsx)("div",{className:"close search-field__close",hidden:""===d,id:"search-field__close",onClick:function(){return h("",0)},children:"\xd7"})]})},B=function(e){var t=e.text,r=e.children,n=e.clearable,c=e.className,s=void 0===c?"":c,i=e.colorGenerator,o=e.onClick,l=e.onClose;return Object(a.jsxs)("span",{className:"badge tag ".concat(s),style:{backgroundColor:i.getColorForKey(t),cursor:n||!o?"auto":"pointer"},onClick:o,children:[null!==r&&void 0!==r?r:t,n&&Object(a.jsx)("span",{className:"close tag__close-selected-tag",onClick:l,children:"\xd7"})]})},H=r(691),W=r(135),q=r(688),z=r(689),K=r(27),Q=function(e){var t=e.text,r=e.disabled,n=void 0!==r&&r,c=e.className,s=void 0===c?"":c,i=e.children,o=e.dropdownClassName,l=e.right,u=void 0!==l&&l,d=e.minWidth,j=Object(K.d)(),b=Object(E.a)(j,2),h=b[0],O=b[1],v="dropdown-btn__toggle btn-block ".concat(s),f={minWidth:d&&"".concat(d,"px")};return Object(a.jsxs)(W.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(q.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(z.a,{className:"w-100",right:u,style:f,children:i})]})},J=r(92),Z=r(397),Y=r(219),X=r(344),$=r(667),ee=r(690),te=(r(666),function(e){return"string"!==typeof e}),re=function(e,t){return e&&te(e)?t?Object($.default)(e,t):Object(ee.a)(e):e},ne=function(e){return re(e,void 0)},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return re(t,e)}}(),ae=function(e){return void 0===e||Object(y.a)(Object(X.a)(Boolean,e))},se=function(e){return"string"===typeof e},ie={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180days:"Last 180 days",last365Days:"Last 365 days"},oe=Object.keys(ie),le=function(e){if(e)return se(e)?ie[e]:function(e){if(e&&!ae(e))return e.startDate&&!e.endDate?"Since ".concat(ce(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ce(e.endDate)):"".concat(ce(e.startDate)," - ").concat(ce(e.endDate))}(e)},ue=function(e){return Object(J.default)(Object(Z.default)(new Date,e))},de=function(e){return{startDate:e,endDate:Object(Y.default)(new Date)}},je=function(e){if(!e)return{};switch(e){case"today":return de(Object(J.default)(new Date));case"yesterday":return{startDate:ue(1),endDate:Object(Y.default)(Object(Z.default)(new Date,1))};case"last7Days":return de(ue(7));case"last30Days":return de(ue(30));case"last90Days":return de(ue(90));case"last180days":return de(ue(180));case"last365Days":return de(ue(365))}return{}},be=r(322),he=r.n(be),Oe=r(113),ve=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(S.a)(n),s=Object(D.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(he.a,Object(d.a)(Object(d.a)({},e),{},{dateFormat:"yyyy-MM-dd",className:G()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(I.a,{icon:Oe.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},fe=function(e){var t=e.startDate,r=void 0===t?null:t,n=e.endDate,c=void 0===n?null:n,s=e.disabled,i=void 0!==s&&s,o=e.onStartDateChange,l=e.onEndDateChange;return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ve,{selected:r,placeholderText:"Since...",isClearable:!0,maxDate:null!==c&&void 0!==c?c:void 0,disabled:i,onChange:o})}),Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(ve,{className:"mt-2 mt-md-0",selected:c,placeholderText:"Until...",isClearable:!0,minDate:null!==r&&void 0!==r?r:void 0,disabled:i,onChange:l})})]})},me=function(e){var t=e.active,r=e.onChange;return Object(a.jsx)(a.Fragment,{children:oe.map((function(e){return Object(a.jsx)(H.a,{active:t===e,onClick:function(){return r(e)},children:le(e)},e)}))})},ge=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=Object(D.useState)(se(n)?n:void 0),o=Object(E.a)(i,2),l=o[0],u=o[1],j=Object(D.useState)(se(n)?void 0:n),b=Object(E.a)(j,2),h=b[0],O=b[1],v=function(e){u(void 0),O(e),r(e)},f=function(e){return function(){u(e),O(void 0),r(je(e))}};return Object(a.jsxs)(Q,{disabled:s,text:null!==(t=le(null!==l&&void 0!==l?l:h))&&void 0!==t?t:c,children:[Object(a.jsx)(H.a,{active:void 0===l&&ae(h),onClick:f(void 0),children:c}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(me,{active:l,onChange:function(e){return f(e)()}}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{header:!0,children:"Custom:"}),Object(a.jsx)(H.a,{text:!0,children:Object(a.jsx)(fe,Object(d.a)(Object(d.a)({},h),{},{onStartDateChange:function(e){return v(Object(d.a)(Object(d.a)({},h),{},{startDate:e}))},onEndDateChange:function(e){return v(Object(d.a)(Object(d.a)({},h),{},{endDate:e}))}}))})]})},xe=function(e){return e?Object(A.default)(e):null},pe=function(e){return function(t){var r,n=t.listShortUrls,c=t.shortUrlsListParams,s=null!==(r=c.tags)&&void 0!==r?r:[],i=Object(F.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=ne(n))&&void 0!==t?t:void 0,endDate:null!==(r=ne(c))&&void 0!==r?r:void 0}}),(function(e){return n(Object(d.a)(Object(d.a)({},c),e))}));return Object(a.jsxs)("div",{className:"search-bar-container",children:[Object(a.jsx)(P,{onChange:function(e){return n(Object(d.a)(Object(d.a)({},c),{},{searchTerm:e}))}}),Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)("div",{className:"row",children:Object(a.jsx)("div",{className:"col-lg-8 offset-lg-4 col-xl-6 offset-xl-6",children:Object(a.jsx)(ge,{defaultText:"All short URLs",initialDateRange:{startDate:xe(c.startDate),endDate:xe(c.endDate)},onDatesChange:i})})})}),!Object(y.a)(s)&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(I.a,{icon:V.L,className:"search-bar__tags-icon"}),"\xa0",s.map((function(t){return Object(a.jsx)(B,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return n(Object(d.a)(Object(d.a)({},c),{},{tags:s.filter((function(e){return e!==t}))}))}},t)}))]})]})}},Se=r(26),ye=r(701),Ce=r(59),Ne=r(687),we=r(353),_e=r(692),ke=r(693),Ue=r(29);function Te(e){var t=e.items,r=e.orderField,n=e.orderDir,c=e.onChange,s=e.isButton,i=void 0===s||s,o=e.right,l=void 0!==o&&o,u=function(e){return function(){var t=Object(Ue.b)(e,r,n);c(t?e:void 0,t)}};return Object(a.jsxs)(_e.a,{children:[Object(a.jsxs)(q.a,{caret:!0,color:i?"primary":"link",className:G()({"dropdown-btn__toggle btn-block":i,"btn-sm p-0":!i}),children:[!i&&Object(a.jsx)(a.Fragment,{children:"Order by"}),i&&!r&&Object(a.jsx)(a.Fragment,{children:"Order by..."}),i&&r&&'Order by: "'.concat(t[r],'" - "').concat(null!==n&&void 0!==n?n:"DESC",'"')]}),Object(a.jsxs)(z.a,{right:l,className:G()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(ke.a)(t).map((function(e){var t=Object(E.a)(e,2),c=t[0],s=t[1];return Object(a.jsxs)(H.a,{active:r===c,onClick:u(c),children:[s,r===c&&Object(a.jsx)(I.a,{icon:"ASC"===n?V.I:V.H,className:"sorting-dropdown__sort-icon"})]},c)})),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{disabled:!r,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Re=r(323);function Ee(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(D.useEffect)((function(){var e=function(e,t,r,n){var c=e.mercureHubUrl,a=e.token,s=e.loading,i=e.error;if(!s&&!i&&c){var o=function(e){var t=e.data;return r(JSON.parse(t))},l=function(e){return 401===e.status&&n()},u=t.map((function(e){var t=new URL(c);t.searchParams.append("topic",e);var r=new Re.EventSourcePolyfill(t,{headers:{Authorization:"Bearer ".concat(a)}});return r.onmessage=o,r.onerror=l,r}));return function(){return u.forEach((function(e){return e.close()}))}}}(i,t(n),(function(e){return o?r.add(e):c([e])}),s);if(!o)return e;var a=setInterval((function(){c(Object(Se.a)(r)),r.clear()}),1e3*o*60);return Object(F.a)((function(){return clearInterval(a)}),(function(){return null===e||void 0===e?void 0:e()}))}),[i]),Object(a.jsx)(e,Object(d.a)({},n))}}var De=function e(){Object(x.a)(this,e)};De.visits="https://shlink.io/new-visit",De.orphanVisits="https://shlink.io/new-orphan-visit",De.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Le,Ve,Ie,Fe,Ae,Me,Ge,Pe,Be,He,We,qe,ze,Ke,Qe,Je,Ze,Ye,Xe,$e=function(e,t){return function(r,n){var c=n.type,a=e[c],s=null!==r&&void 0!==r?r:t;return a?a(s,n):s}},et=function(e){return function(){return{type:e}}},tt=r(694),rt=r(695),nt=r(324),ct=r(696),at=function(e,t,r){return Object(S.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},st="shlink/visitCreation/CREATE_VISITS",it=function(e){return{type:st,createdVisits:e}},ot=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},lt=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},ut="shlink/deleteShortUrl/DELETE_SHORT_URL_START",dt="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",jt="shlink/deleteShortUrl/SHORT_URL_DELETED",bt="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",ht={shortCode:"",loading:!1,error:!1},Ot=$e((Le={},Object(u.a)(Le,ut,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Le,dt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Le,jt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Le,bt,(function(){return ht})),Le),ht),vt=function(e){return function(t,r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:ut}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:jt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:dt,errorData:ot(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},ft=et(bt),mt="shlink/createShortUrl/CREATE_SHORT_URL_START",gt="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",xt="shlink/createShortUrl/CREATE_SHORT_URL",pt="shlink/createShortUrl/RESET_CREATE_SHORT_URL",St={result:null,saving:!1,error:!1},yt=$e((Ve={},Object(u.a)(Ve,mt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ve,gt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Ve,xt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Ve,pt,(function(){return St})),Ve),St),Ct=function(e){return function(t){return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:mt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:xt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:gt,errorData:ot(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Nt=et(pt),wt=r(43),_t="shlink/shortUrlEdition/EDIT_SHORT_URL_START",kt="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Ut="shlink/shortUrlEdition/SHORT_URL_EDITED",Tt=$e((Ie={},Object(u.a)(Ie,_t,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ie,kt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Ie,Ut,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),Ie),{saving:!1,error:!1}),Rt=function(e){return function(t,r,n){return function(){var c=Object(g.a)(m.a.mark((function c(a,s){var i,o,l,u,d,j,b,h,O;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return a({type:_t}),i=s(),o=i.selectedServer,l=!Object(wt.i)(o),u=e(s),d=u.updateShortUrl,j=u.updateShortUrlTags,c.prev=4,c.next=7,Promise.all([d(t,r,n),l&&n.tags?j(t,r,n.tags):void 0]);case 7:b=c.sent,h=Object(E.a)(b,1),O=h[0],a({shortUrl:O,type:Ut}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:kt,errorData:ot(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},Et="shlink/shortUrlsList/LIST_SHORT_URLS_START",Dt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Lt="shlink/shortUrlsList/LIST_SHORT_URLS",Vt=$e((Fe={},Object(u.a)(Fe,Et,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Fe,Dt,(function(){return{loading:!1,error:!0}})),Object(u.a)(Fe,Lt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Fe,jt,Object(F.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(tt.a)(["shortUrls","data"],Object(p.a)((function(e){return at(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(tt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Fe,st,(function(e,t){var r,n,c=t.createdVisits;return Object(tt.a)(["shortUrls","data"],null===(r=e.shortUrls)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.map((function(e){var t=Object(rt.a)(c.filter((function(t){var r=t.shortUrl;return r&&at(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(nt.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Fe,xt,Object(F.a)((function(e,t){var r=t.result;return e.shortUrls?Object(tt.a)(["shortUrls","data"],[r].concat(Object(Se.a)(Object(ct.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(tt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Fe,Ut,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(tt.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return at(e,t,n)?r:e})),e):e})),Fe),{loading:!0,error:!1}),It=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s,i;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Et}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Lt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Dt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Ft="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",At={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Mt={page:"1",orderBy:{dateCreated:"DESC"}},Gt=$e((Ae={},Object(u.a)(Ae,Lt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ae,Ft,(function(){return Mt})),Ae),Mt),Pt=et(Ft),Bt=r(698),Ht=r(699),Wt=r(700),qt=r(674),zt=r(325),Kt=r(697),Qt=Math.ceil,Jt=new Intl.NumberFormat("en-US"),Zt=function(e){return Jt.format(Number(e))},Yt="...",Xt=function(e,t){var r=Object(qt.a)(Object(zt.a)(2,e-2),Object(Kt.a)(t-1,e+2)+1);return e-2>2&&r.unshift(Yt),e+2=l,children:Object(a.jsx)(Ht.a,{next:!0,tag:o.b,to:"/server/".concat(r,"/list-short-urls/").concat(s+1)})})]})},nr=function(e){return Ee((function(t){var r,n=t.listShortUrls,c=t.resetShortUrlParams,s=t.shortUrlsListParams,i=t.match,o=t.location,l=t.shortUrlsList,j=t.selectedServer,b=s.orderBy,h=Object(D.useState)({orderField:b&&Object(ye.a)(Object(Ce.a)(b)),orderDir:b&&Object(ye.a)(Object(Ne.a)(b))}),O=Object(E.a)(h,2),f=O[0],m=O[1],g=(null!==(r=null===l||void 0===l?void 0:l.shortUrls)&&void 0!==r?r:{}).pagination,x=function(e){return n(Object(d.a)(Object(d.a)({},s),e))},p=function(e,t){m({orderField:e,orderDir:t}),x({orderBy:e?Object(u.a)({},e,t):void 0})};return Object(D.useEffect)((function(){var e=Object(C.a)(o.search).tag,t=e?[decodeURIComponent(e)]:s.tags;return x({page:i.params.page,tags:t,itemsPerPage:void 0}),c}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"d-block d-lg-none mb-3",children:Object(a.jsx)(Te,{items:At,orderField:f.orderField,orderDir:f.orderDir,onChange:p})}),Object(a.jsxs)(we.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{orderByColumn:function(e){return function(){return p(e,Object(Ue.b)(e,f.orderField,f.orderDir))}},renderOrderIcon:function(e){return f.orderField!==e?null:f.orderDir?Object(a.jsx)(I.a,{icon:"ASC"===f.orderDir?V.f:V.e,className:"short-urls-list__header-icon"}):null},selectedServer:j,shortUrlsList:l,onTagClick:function(e){var t;return x({tags:[].concat(Object(Se.a)(null!==(t=s.tags)&&void 0!==t?t:[]),[e])})}}),Object(a.jsx)(rr,{paginator:g,serverId:Object(v.d)(j)?j.id:""})]})]})}),(function(){return[De.visits]}))},cr=r(51),ar=r(170),sr=r.n(ar),ir=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(sr.a,{text:t,onCopy:r,children:Object(a.jsx)(I.a,{icon:Oe.b,className:"ml-2 copy-to-clipboard-icon"})})},or=r(702),lr=r(742),ur=function(e){var t=e.date,r=e.format,n=void 0===r?"yyyy-MM-dd HH:mm":r,c=e.relative,s=void 0!==c&&c,i=te(t)?t:Object(A.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(or.a)(i),"000"),children:s?"".concat(Object(lr.a)(new Date,i)," ago"):Object($.default)(i,n)})},dr=r(703),jr=r(42),br=function(e,t,r){var n=e.id,c=t.shortCode,a=t.domain,s=a?"?domain=".concat(a):"";return"/server/".concat(n,"/short-code/").concat(c,"/").concat(r).concat(s)},hr=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(jr.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.e)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:br(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},Or=function(e){var t,r=e.visitsCount,n=e.shortUrl,c=e.selectedServer,s=e.active,i=void 0!==s&&s,o=null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.maxVisits,l=Object(a.jsx)(hr,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:G()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:Zt(r)})});if(!o)return l;var u=Zt(o),d=Object(D.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:"indivisible",children:[l,Object(a.jsxs)("small",{className:"short-urls-visits-count__max-visits-control",ref:function(e){d.current=e},children:[" ","/ ",u," ",Object(a.jsx)("sup",{children:Object(a.jsx)(I.a,{icon:V.t})})]})]}),Object(a.jsxs)(dr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},vr=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(D.useRef)(!0);return Object(D.useEffect)((function(){m.current?m.current=!1:f()}),[i.visitsCount]),Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:Object(a.jsx)(ur,{date:i.dateCreated})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:Object(a.jsxs)("span",{className:"indivisible short-urls-row__cell--relative",children:[Object(a.jsx)(cr.a,{href:i.shortUrl}),Object(a.jsx)(ir,{text:i.shortUrl,onCopy:b}),Object(a.jsx)("span",{className:"badge badge-warning short-urls-row__copy-hint",hidden:!j,children:"Copied short URL!"})]})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":"".concat(i.title?"Title":"Long URL"),children:Object(a.jsx)(cr.a,{href:i.longUrl,children:null!==(c=i.title)&&void 0!==c?c:i.longUrl})}),i.title&&Object(a.jsx)("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:Object(a.jsx)(cr.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(y.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(B,{colorGenerator:t,text:e,onClick:function(){return null===l||void 0===l?void 0:l(e)}},e)})))}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(Or,{visitsCount:i.visitsCount,shortUrl:i,selectedServer:o,active:v})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell",children:Object(a.jsx)(e,{selectedServer:o,shortUrl:i})})]})}},fr=r(704),mr=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(fr.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(q.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(I.a,{icon:V.n}),"\xa0"]}),Object(a.jsx)(z.a,{right:s,children:n})]})},gr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(K.d)(),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(K.d)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(K.d)(),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(mr,{toggle:l,isOpen:o,children:[Object(a.jsxs)(H.a,{tag:hr,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(I.a,{icon:V.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(H.a,{tag:hr,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(H.a,{onClick:b,children:[Object(a.jsx)(I.a,{icon:V.D,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsxs)(H.a,{className:"short-urls-row-menu__dropdown-item--danger",onClick:f,children:[Object(a.jsx)(I.a,{icon:V.x,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},xr=function(e,t){return function(r){var n=r.createShortUrl,c=r.shortUrlCreationResult,s=r.resetCreateShortUrl,i=r.selectedServer,o=r.basicMode,l=void 0!==o&&o,u=r.settings.shortUrlCreation,j=Object(D.useMemo)((function(){return function(e){var t;return{longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:null!==(t=null===e||void 0===e?void 0:e.validateUrls)&&void 0!==t&&t}}(u)}),[u]);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(e,{initialState:j,saving:c.saving,selectedServer:i,mode:l?"create-basic":"create",onSave:function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(),e.abrupt("return",n(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),Object(a.jsx)(t,Object(d.a)(Object(d.a)({},c),{},{resetCreateShortUrl:s,canBeClosed:l}))]})}},pr=r(744),Sr=r(705),yr=r(706),Cr=r(707),Nr=r(675),wr=r(669),_r=r(37),kr=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(wr.a,{className:n,children:Object(a.jsx)("div",{className:G()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(_r.a,{className:G()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:G()({"p-2":s}),children:t})})})},Ur=function(e){var t,r,n=e.errorData,c=e.fallbackMessage;return Object(a.jsxs)(a.Fragment,{children:[null!==(t=null===n||void 0===n?void 0:n.detail)&&void 0!==t?t:c,(r=n,"INVALID_ARGUMENT"===(null===r||void 0===r?void 0:r.type)&&Object(a.jsxs)("p",{className:"mb-0",children:["Invalid elements: [",n.invalidElements.join(", "),"]"]}))]})},Tr=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(D.useState)(""),l=Object(E.a)(o,2),u=l[0],d=l[1];Object(D.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(F.a)(s,r),O=Object(Ue.c)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Nr.a)}));return Object(a.jsx)(pr.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(Sr.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("p",{children:[Object(a.jsx)("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),Object(a.jsx)("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),Object(a.jsxs)("p",{children:["Write ",Object(a.jsx)("b",{children:t.shortCode})," to confirm deletion."]}),Object(a.jsx)("input",{type:"text",className:"form-control",placeholder:"Insert the short code (".concat(t.shortCode,")"),value:u,onChange:function(e){return d(e.target.value)}}),j&&Object(a.jsx)(kr,{type:lt(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-link",onClick:h,children:"Cancel"}),Object(a.jsx)("button",{type:"submit",className:"btn btn-danger",disabled:u!==t.shortCode||c.loading,children:c.loading?"Deleting...":"Delete"})]})]})})},Rr=r(239),Er=function(e){return function(t){var r=t.error,n=t.errorData,c=t.result,s=t.resetCreateShortUrl,i=t.canBeClosed,o=void 0!==i&&i,l=e(),u=Object(E.a)(l,2),d=u[0],j=u[1];if(Object(D.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(kr,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.N,className:"float-right pointer",onClick:s}),Object(a.jsx)(Ur,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(S.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(kr,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.N,className:"float-right pointer",onClick:s}),Object(a.jsx)("b",{children:"Great!"})," The short URL is ",Object(a.jsx)("b",{children:b}),Object(a.jsx)(sr.a,{text:b,onCopy:j,children:Object(a.jsxs)("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[Object(a.jsx)(I.a,{icon:Oe.b})," Copy"]})}),Object(a.jsx)(Rr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},Dr=function(e){return function(t){var r=t.orderByColumn,n=t.renderOrderIcon,c=t.shortUrlsList,s=t.onTagClick,i=t.selectedServer,o=t.className,l=c.error,u=c.loading,d=c.shortUrls,j=G()({"short-urls-table__header-cell--with-action":!!r}),b=G()("short-urls-table__header-cell",j),h=G()("table table-hover",o),O=Object(wt.h)(i);return Object(a.jsxs)("table",{className:h,children:[Object(a.jsx)("thead",{className:"responsive-table__header short-urls-table__header",children:Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("dateCreated"),children:["Created at",null===n||void 0===n?void 0:n("dateCreated")]}),Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("shortCode"),children:["Short URL",null===n||void 0===n?void 0:n("shortCode")]}),!O&&Object(a.jsxs)("th",{className:b,onClick:null===r||void 0===r?void 0:r("longUrl"),children:["Long URL",null===n||void 0===n?void 0:n("longUrl")]})||Object(a.jsxs)("th",{className:"short-urls-table__header-cell",children:[Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("title"),children:["Title",null===n||void 0===n?void 0:n("title")]}),"\xa0\xa0/\xa0\xa0",Object(a.jsxs)("span",{className:j,onClick:null===r||void 0===r?void 0:r("longUrl"),children:[Object(a.jsx)("span",{className:"indivisible",children:"Long URL"}),null===n||void 0===n?void 0:n("longUrl")]})]}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"Tags"}),Object(a.jsx)("th",{className:b,onClick:null===r||void 0===r?void 0:r("visits"),children:Object(a.jsxs)("span",{className:"indivisible",children:["Visits",null===n||void 0===n?void 0:n("visits")]})}),Object(a.jsx)("th",{className:"short-urls-table__header-cell",children:"\xa0"})]})}),Object(a.jsx)("tbody",{children:l?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center table-danger",children:"Something went wrong while loading short URLs :("})}):u?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!u&&Object(y.a)(null===d||void 0===d?void 0:d.data)?Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:6,className:"text-center",children:"No results found"})}):null===d||void 0===d?void 0:d.data.map((function(t){return Object(a.jsx)(e,{shortUrl:t,selectedServer:i,onTagClick:s},t.shortUrl)}))})]})}},Lr=r(708),Vr=r(236),Ir=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(Q,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(H.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(H.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},Fr=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(Q,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(H.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(H.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(H.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(H.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},Ar=function(e,t){return function(r){var n=r.shortUrl,c=n.shortUrl,s=n.shortCode,i=r.toggle,o=r.isOpen,l=r.selectedServer,u=Object(D.useState)(300),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(D.useState)(0),O=Object(E.a)(h,2),v=O[0],f=O[1],x=Object(D.useState)("png"),p=Object(E.a)(x,2),S=p[0],N=p[1],w=Object(D.useState)("L"),_=Object(E.a)(w,2),k=_[0],U=_[1],T=Object(D.useMemo)((function(){return{useSizeInPath:!Object(wt.f)(l),marginIsSupported:Object(wt.e)(l),errorCorrectionIsSupported:Object(wt.g)(l)}}),[l]),R=T.marginIsSupported!==T.errorCorrectionIsSupported,L=Object(D.useMemo)((function(){return function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.marginIsSupported,l=r.errorCorrectionIsSupported,u="".concat(e,"/qr-code").concat(i?"/".concat(n):""),d=Object(C.b)({size:i?void 0:n,format:c,margin:o&&a>0?a:void 0,errorCorrection:l?s:void 0});return"".concat(u).concat(Object(y.a)(d)?"":"?".concat(d))}(c,{size:j,format:S,margin:v,errorCorrection:k},T)}),[c,j,S,v,k,T]),F=Object(D.useMemo)((function(){return j+v}),[j,v]),A=Object(D.useMemo)((function(){if(!(F<500))return F<800?"lg":"xl"}),[F]);return Object(a.jsxs)(pr.a,{isOpen:o,toggle:i,centered:!0,size:A,children:[Object(a.jsxs)(Sr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(cr.a,{href:c,children:c})]}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)(wr.a,{children:[Object(a.jsxs)(Lr.a,{className:G()({"col-md-4":R,"col-md-6":!R}),children:[Object(a.jsxs)("label",{className:"mb-0",children:["Size: ",j,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:j,step:10,min:50,max:1e3,onChange:function(e){return b(Number(e.target.value))}})]}),T.marginIsSupported&&Object(a.jsxs)(Lr.a,{className:R?"col-md-4":"col-md-6",children:[Object(a.jsxs)("label",{className:"mb-0",children:["Margin: ",v,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:v,step:1,min:0,max:100,onChange:function(e){return f(Number(e.target.value))}})]}),Object(a.jsx)(Lr.a,{className:R?"col-md-4":"col-md-6",children:Object(a.jsx)(Ir,{format:S,setFormat:N})}),T.errorCorrectionIsSupported&&Object(a.jsx)(Lr.a,{className:"col-md-6",children:Object(a.jsx)(Fr,{errorCorrection:k,setErrorCorrection:U})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(cr.a,{href:L}),Object(a.jsx)(ir,{text:L})]}),Object(a.jsx)("img",{src:L,className:"qr-code-modal__img",alt:"QR code"}),Object(a.jsx)(t,{minVersion:"2.9.0",children:Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Vr.a,{block:!0,color:"primary",onClick:Object(g.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.saveImage(L,"".concat(s,"-qr-code.").concat(S)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(I.a,{icon:V.q,className:"ml-1"})]})})})]})]})]})}},Mr=r(711),Gr=r(709),Pr=r(710),Br=r(739),Hr=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?Nr.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(D.useRef)(Object(Br.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:G()("custom-control",j,s),style:b,children:[Object(a.jsx)("input",{type:"checkbox",className:"custom-control-input",id:d,checked:r,onChange:function(e){return c(e.target.checked,e)}}),Object(a.jsx)("label",{className:"custom-control-label",htmlFor:d,children:i})]})},Wr=function(e){return Object(a.jsx)(Hr,Object(d.a)({type:"checkbox"},e))},qr=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(pr.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(Sr.a,{toggle:r,children:"Info"}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("p",{children:["When the\xa0",Object(a.jsx)("b",{children:Object(a.jsx)("i",{children:'"Use existing URL if found"'})}),"\xa0checkbox is checked, the server will return an existing short URL if it matches provided params."]}),Object(a.jsx)("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),Object(a.jsxs)("ul",{children:[Object(a.jsx)("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),Object(a.jsxs)("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",Object(a.jsx)("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),Object(a.jsx)("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]})},zr=function(){var e=Object(K.d)(),t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{title:"What does this mean?",children:Object(a.jsx)(I.a,{icon:V.t,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(qr,{isOpen:r,toggle:n})]})},Kr=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(D.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(I.a,{icon:V.t})}),Object(a.jsx)(dr.a,{target:function(){return s.current},placement:n,children:c})]})},Qr=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(Wr,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(Kr,{placement:"right",children:r})]})},Jr=Object(F.a)(Gr.a,Object(Pr.a)(/ /g,"-")),Zr=function(e){return"string"===typeof e?Object(A.default)(e):e},Yr=function(e,t){return function(r){var n,c=r.mode,s=r.saving,i=r.onSave,o=r.initialState,l=r.selectedServer,j=Object(D.useState)(o),b=Object(E.a)(j,2),h=b[0],O=b[1],v="edit"===c,f=Object(Ue.c)(Object(g.a)(m.a.mark((function e(){var t,r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},h),{},{validSince:null!==(t=ne(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=ne(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Ue.d)(h.maxVisits)?Number(h.maxVisits):null,title:Object(Ue.d)(h.title)?h.title:void 0})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(D.useEffect)((function(){O(o)}),[o]);var x=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.jsx)(Lr.a,{children:Object(a.jsx)(Mr.a,Object(d.a)({id:e,type:n,placeholder:t,value:null!==(r=h[e])&&void 0!==r?r:"",onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t.target.value)))}},c))})},p=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(a.jsx)("div",{className:"form-group",children:Object(a.jsx)(ve,Object(d.a)({selected:h[e]?Zr(h[e]):null,placeholderText:t,isClearable:!0,onChange:function(t){return O(Object(d.a)(Object(d.a)({},h),{},Object(u.a)({},e,t)))}},r))})},S=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Lr.a,{children:Object(a.jsx)(Mr.a,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:h.longUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{longUrl:e.target.value}))}})}),Object(a.jsx)(Lr.a,{children:Object(a.jsx)(e,{selectedTags:null!==(n=h.tags)&&void 0!==n?n:[],onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{tags:e.map(Jr)}))}})})]}),C=Object(wt.h)(l),N=C||!v,w=G()("mb-3",{"col-sm-6":N,"col-sm-12":!N}),_=Object(wt.b)(l);return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:f,children:["create-basic"===c&&S,"create-basic"!==c&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(_r.a,{title:"Basic options",className:"mb-3",children:S}),Object(a.jsxs)(wr.a,{children:[N&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(_r.a,{title:"Customize the short URL",children:[C&&x("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(wr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:Object(Ue.d)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",{min:4,disabled:Object(Ue.d)(h.customSlug)})})]}),Object(a.jsx)(Lr.a,{children:Object(a.jsx)(t,{value:h.domain,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{domain:e}))}})})]})]})}),Object(a.jsx)("div",{className:w,children:Object(a.jsxs)(_r.a,{title:"Limit access to the short URL",children:[x("maxVisits","Maximum number of visits allowed","number",{min:1}),p("validSince","Enabled since...",{maxDate:h.validUntil?Zr(h.validUntil):void 0}),p("validUntil","Enabled until...",{minDate:h.validSince?Zr(h.validSince):void 0})]})})]}),Object(a.jsxs)(_r.a,{title:"Extra checks",className:"mb-3",children:[Object(a.jsx)(Qr,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:h.validateUrl,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{validateUrl:e}))},children:"Validate URL"}),_&&Object(a.jsx)(Qr,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:h.crawlable,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{crawlable:e}))},children:"Make it crawlable"}),!v&&Object(a.jsxs)("p",{children:[Object(a.jsx)(Wr,{inline:!0,className:"mr-2",checked:h.findIfExists,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{findIfExists:e}))},children:"Use existing URL if found"}),Object(a.jsx)(zr,{})]})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Vr.a,{outline:!0,color:"primary",disabled:s||Object(y.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},Xr=r(54),$r=function(e){return function(t){var r,n=t.history.goBack,c=t.match.params,s=t.location.search,i=t.settings.shortUrlCreation,o=t.selectedServer,l=t.shortUrlDetail,u=t.getShortUrlDetail,d=t.shortUrlEdition,j=t.editShortUrl,b=l.loading,h=l.error,O=l.errorData,v=l.shortUrl,f=d.saving,x=d.error,p=d.errorData,S=Object(C.a)(s).domain,y=Object(D.useMemo)((function(){return function(e,t){var r,n,c,a,s,i,o=null!==(r=null===t||void 0===t?void 0:t.validateUrls)&&void 0!==r&&r;return e?{longUrl:e.longUrl,tags:e.tags,title:null!==(n=e.title)&&void 0!==n?n:void 0,domain:null!==(c=e.domain)&&void 0!==c?c:void 0,validSince:null!==(a=e.meta.validSince)&&void 0!==a?a:void 0,validUntil:null!==(s=e.meta.validUntil)&&void 0!==s?s:void 0,maxVisits:null!==(i=e.meta.maxVisits)&&void 0!==i?i:void 0,crawlable:e.crawlable,validateUrl:o}:{longUrl:"",validateUrl:o}}(v,i)}),[v,i]),N=Object(K.d)(),w=Object(E.a)(N,4),_=w[0],k=w[2],U=w[3];return Object(D.useEffect)((function(){u(c.shortCode,S)}),[]),b?Object(a.jsx)(Xr.a,{loading:!0}):h?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:O,fallbackMessage:"An error occurred while loading short URL detail :("})}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("header",{className:"mb-3",children:Object(a.jsx)(we.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Vr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(cr.a,{href:null!==(r=null===v||void 0===v?void 0:v.shortUrl)&&void 0!==r?r:""})]})}),Object(a.jsx)("span",{})]})})}),Object(a.jsx)(e,{initialState:y,saving:f,selectedServer:o,mode:"edit",onSave:function(){var e=Object(g.a)(m.a.mark((function e(t){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=2;break}return e.abrupt("return");case 2:U(),j(v.shortCode,v.domain,t).then(k).catch(U);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),x&&Object(a.jsx)(kr,{type:"error",className:"mt-3",children:Object(a.jsx)(Ur,{errorData:p,fallbackMessage:"An error occurred while updating short URL :("})}),_&&Object(a.jsx)(kr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},en="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",tn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",rn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",nn={loading:!1,error:!1},cn=$e((Me={},Object(u.a)(Me,en,(function(){return{loading:!0,error:!1}})),Object(u.a)(Me,tn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Me,rn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},nn)})),Me),nn),an=function(e){return function(t,r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c({type:en}),n.prev=1,o=a(),l=o.shortUrlsList,null===(s=null===l||void 0===l||null===(i=l.shortUrls)||void 0===i?void 0:i.data.find((function(e){return at(e,t,r)})))||void 0===s){n.next=7;break}n.t0=s,n.next=10;break;case 7:return n.next=9,e(a).getShortUrl(t,r);case 9:n.t0=n.sent;case 10:u=n.t0,c({shortUrl:u,type:rn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:tn,errorData:ot(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},sn=function(e,t){e.serviceFactory("ShortUrls",L,"SearchBar","ShortUrlsList"),e.decorator("ShortUrls",t(["shortUrlsList"])),e.serviceFactory("ShortUrlsList",nr,"ShortUrlsTable"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Dr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",vr,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",gr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Er,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",Yr,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",xr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",$r,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return Tr})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",Ar,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",pe,"ColorGenerator"),e.decorator("SearchBar",t(["shortUrlsListParams"],["listShortUrls"])),e.serviceFactory("listShortUrls",It,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return Pt})),e.serviceFactory("createShortUrl",Ct,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return Nt})),e.serviceFactory("deleteShortUrl",vt,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return ft})),e.serviceFactory("getShortUrlDetail",an,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",Rt,"buildShlinkApiClient")},on=r(326),ln=r.n(on),un=r(68),dn=function(e){var t=e.children,r=e.value,n=e.onChange,c=e.id,s=e.type,i=e.required,o=e.placeholder,l=e.className,u=e.labelClassName,d=Object(D.useRef)(null!==c&&void 0!==c?c:Object(Br.a)());return Object(a.jsxs)("div",{className:"form-group ".concat(null!==l&&void 0!==l?l:""),children:[Object(a.jsxs)("label",{htmlFor:d.current,className:null!==u&&void 0!==u?u:"",children:[t,":"]}),Object(a.jsx)("input",{className:"form-control",type:null!==s&&void 0!==s?s:"text",id:d.current,value:r,required:null===i||void 0===i||i,placeholder:o,onChange:function(e){return n(e.target.value)}})]})},jn=function(e){return Object(a.jsx)(dn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},bn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(D.useState)(""),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(D.useState)(""),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(D.useState)(""),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(Ue.c)((function(){return t({name:o,url:j,apiKey:v})}));return Object(D.useEffect)((function(){r&&l(r.name),r&&b(r.url),r&&f(r.apiKey)}),[r]),Object(a.jsxs)("form",{className:"server-form",onSubmit:m,children:[Object(a.jsxs)(_r.a,{className:"mb-3",title:c,children:[Object(a.jsx)(jn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(jn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(jn,{value:v,onChange:f,children:"APIkey"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},hn=function(e){var t=e.type;return Object(a.jsxs)(kr,{type:t,children:["success"===t&&"Servers properly imported. You can now select one from the list :)","error"===t&&"The servers could not be imported. Make sure the format is correct."]})},On=function(e,t){return function(r){var n=r.createServer,c=r.history.push,s=t(!1,4e3),i=Object(E.a)(s,2),o=i[0],l=i[1],u=t(!1,4e3),j=Object(E.a)(u,2),b=j[0],h=j[1];return Object(a.jsxs)(un.a,{children:[Object(a.jsxs)(bn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(Br.a)();n(Object(d.a)(Object(d.a)({},e),{},{id:t})),c("/server/".concat(t))},children:[Object(a.jsx)(e,{onImport:l,onImportError:h}),Object(a.jsx)("button",{className:"btn btn-outline-primary",children:"Create server"})]}),(o||b)&&Object(a.jsxs)("div",{className:"mt-3",children:[o&&Object(a.jsx)(hn,{type:"success"}),b&&Object(a.jsx)(hn,{type:"error"})]})]})}},vn=function(e){return function(t){var r=t.servers,n=t.selectedServer,c=Object(Ne.a)(r),s=Object(a.jsxs)(H.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.C})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]});return Object(a.jsxs)(_e.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(q.a,{nav:!0,caret:!0,children:[Object(a.jsx)(I.a,{icon:V.G})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(z.a,{right:!0,children:Object(y.a)(c)?s:Object(a.jsxs)(a.Fragment,{children:[c.map((function(e){var t=e.name,r=e.id;return Object(a.jsx)(H.a,{tag:o.b,to:"/server/".concat(r),active:Object(v.e)(n)&&n.id===r,children:t},r)})),Object(a.jsx)(H.a,{divider:!0}),s,Object(a.jsxs)(H.a,{className:"servers-dropdown__export-item",onClick:Object(g.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.exportServers());case 1:case"end":return t.stop()}}),t)}))),children:[Object(a.jsx)(I.a,{icon:V.q})," ",Object(a.jsx)("span",{className:"ml-1",children:"Export servers"})]})]})})]})}},fn=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history;return Object(a.jsxs)(pr.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(Sr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("p",{children:["Are you sure you want to remove ",Object(a.jsx)("b",{children:t?t.name:""}),"?"]}),Object(a.jsx)("p",{children:Object(a.jsx)("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",onClick:function(){return c(t),r(),void s.push("/")},children:"Delete"})]})]})},mn=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(K.d)(),o=Object(E.a)(i,4),l=o[0],u=o[2],d=o[3];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:n,onClick:u,children:[!c&&Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.x}),Object(a.jsx)("span",{className:s,children:null!==c&&void 0!==c?c:"Remove this server"})]}),Object(a.jsx)(e,{server:r,isOpen:l,toggle:d})]})}},gn=r(162),xn=function(e){return Object(gn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history,c=n.push,s=n.goBack;if(!Object(v.e)(r))return null;return Object(a.jsx)(un.a,{children:Object(a.jsxs)(bn,{title:Object(a.jsxs)("h5",{className:"mb-0",children:['Edit "',r.name,'"']}),initialValues:r,onSubmit:function(e){t(r.id,e),c("/server/".concat(r.id))},children:[Object(a.jsx)(Vr.a,{outline:!0,className:"mr-2",onClick:s,children:"Cancel"}),Object(a.jsx)(Vr.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},pn=function(e){var t=e.importServersFromFile;return function(e){var r=e.createServers,n=e.fileRef,c=e.onImport,s=void 0===c?function(){}:c,i=e.onImportError,o=void 0===i?function(){}:i,l=null!==n&&void 0!==n?n:Object(D.useRef)(),u=function(){var e=Object(g.a)(m.a.mark((function e(n){var c,a;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.target,e.abrupt("return",t(null===(c=a.files)||void 0===c?void 0:c[0]).then(r).then(s).then((function(){a.value=null})).catch(o));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-outline-secondary mr-2",id:"importBtn",onClick:function(){var e;return null===(e=l.current)||void 0===e?void 0:e.click()},children:"Import from file"}),Object(a.jsxs)(dr.a,{placement:"top",target:"importBtn",children:["You can create servers by importing a CSV file with columns ",Object(a.jsx)("b",{children:"name"}),", ",Object(a.jsx)("b",{children:"apiKey"})," and ",Object(a.jsx)("b",{children:"url"}),"."]}),Object(a.jsx)("input",{type:"file",accept:"text/csv",className:"create-server__csv-select",ref:l,onChange:u})]})}},Sn=r(670),yn=r(69),Cn="shlink/selectedServer/SELECT_SERVER",Nn="shlink/selectedServer/RESET_SELECTED_SERVER",wn=Object(F.a)((function(e){return"latest"===e?"999.999.999":e}),Object(yn.c)("1.0.0")),_n=Object(Sn.a)(Nr.a,function(){var e=Object(g.a)(m.a.mark((function e(t,r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r().then((function(e){var t=e.version;return{version:wn(t),printableVersion:Object(yn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),kn=$e((Ge={},Object(u.a)(Ge,Nn,(function(){return null})),Object(u.a)(Ge,Cn,(function(e,t){return t.selectedServer})),Ge),null),Un=et(Nn),Tn=function(e,t){return function(r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j,b,h;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(c(Un()),c(Pt()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:Cn,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 7:return n.prev=7,l=e(o),u=l.health,n.next=11,_n(r,u);case 11:j=n.sent,b=j.version,h=j.printableVersion,c({type:Cn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{version:b,printableVersion:h})}),c(t()),n.next=21;break;case 18:n.prev=18,n.t0=n.catch(7),c({type:Cn,selectedServer:Object(d.a)(Object(d.a)({},o),{},{serverNotReachable:!0})});case 21:case"end":return n.stop()}}),n,null,[[7,18]])})));return function(e,t){return n.apply(this,arguments)}}()}},Rn=r(712),En=r(163),Dn=r(351),Ln="shlink/servers/EDIT_SERVER",Vn="shlink/servers/DELETE_SERVER",In="shlink/servers/CREATE_SERVERS",Fn=$e((Pe={},Object(u.a)(Pe,In,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Pe,Vn,(function(e,t){var r=t.serverId;return Object(Rn.a)(r,e)})),Object(u.a)(Pe,Ln,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(nt.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Pe),{}),An=Object(En.a)((function(e,t){return Object(nt.a)(t.id,t,e)}),{}),Mn=Object(F.a)(Object(Dn.a)((function(e){return e.id?e:Object(nt.a)("id",Object(Br.a)(),e)})),An,(function(e){return{type:In,newServers:e}})),Gn=function(e){return Mn([e])},Pn=function(e,t){return{type:Ln,serverId:e,serverData:t}},Bn=function(e){var t=e.id;return{type:Vn,serverId:t}},Hn=Object(F.a)(Object(O.a)("data"),(function(e){if(!Array.isArray(e))throw new Error("Value is not an array");return e})),Wn=function(e){var t=e.get;return function(){return function(){var e=Object(g.a)(m.a.mark((function e(r){var n;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("".concat(l.a,"/servers.json")).then(Hn).catch((function(){return[]}));case 2:n=e.sent,r(Mn(n));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},qn=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.d)(n))return null;var s=n.version;return Object(yn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},zn=r(176),Kn=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(un.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(Xr.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.e)(n)&&"Could not find this Shlink server.",Object(v.e)(n)&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),Object(a.jsxs)(zn.a,{servers:Object.values(r),children:["These are the Shlink servers currently configured. Choose one of them or ",Object(a.jsx)(o.b,{to:"/server/create",children:"add a new one"}),"."]}),Object(v.e)(n)&&Object(a.jsx)("div",{className:"container mt-3 mt-md-5",children:Object(a.jsxs)("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",Object(a.jsx)(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or\xa0",Object(a.jsx)(o.b,{to:"/server/".concat(n.id,"/edit"),children:"edit it"}),"."]})})]})})}},Qn=r(107),Jn=r(713),Zn=r(714),Yn=r(671),Xn=r(672),$n=function(e,t,r){return Ee((function(n){var c,s=n.shortUrlsList,i=n.listShortUrls,l=n.listTags,u=n.tagsList,d=n.selectedServer,j=n.loadVisitsOverview,h=n.visitsOverview,O=s.loading,f=s.shortUrls,m=u.loading,g=h.loading,x=h.visitsCount,p=h.orphanVisitsCount,S=Object(v.e)(d)?d.id:"",y=Object(b.g)();return Object(D.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(wr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(Zn.a,{tag:"h2",children:g?"Loading...":Zt(x)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/orphan-visits"),children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(Zn.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:g?"Loading...":Zt(null!==p&&void 0!==p?p:0)}),Object(a.jsx)(r,{maxVersion:"2.5.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.6 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/list-short-urls/1"),children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(Zn.a,{tag:"h2",children:O?"Loading...":Zt(null!==(c=null===f||void 0===f?void 0:f.pagination.totalItems)&&void 0!==c?c:0)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(we.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/manage-tags"),children:[Object(a.jsx)(Jn.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(Zn.a,{tag:"h2",children:m?"Loading...":Zt(u.tags.length)})]})})]}),Object(a.jsxs)(we.a,{className:"mb-3",children:[Object(a.jsxs)(Yn.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Create a short URL"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(S,"/create-short-url"),children:"Advanced options \xbb"})]}),Object(a.jsx)(Xn.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(we.a,{children:[Object(a.jsxs)(Yn.a,{children:[Object(a.jsx)("span",{className:"d-sm-none",children:"Recently created URLs"}),Object(a.jsx)("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),Object(a.jsx)(o.b,{className:"float-right",to:"/server/".concat(S,"/list-short-urls/1"),children:"See all \xbb"})]}),Object(a.jsx)(Xn.a,{children:Object(a.jsx)(e,{shortUrlsList:s,selectedServer:d,className:"mb-0",onTagClick:function(e){return y.push("/server/".concat(S,"/list-short-urls/1?tag=").concat(e))}})})]})]})}),(function(){return[De.visits,De.orphanVisits]}))},ec=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},tc=function(e){return Array.isArray(e)&&e.every(ec)},rc=function e(t,r){var n=this;Object(x.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(g.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("No file provided");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e,c){r.addEventListener("loadend",(function(t){try{var r,a,s,i=null!==(r=null===(a=t.target)||void 0===a||null===(s=a.result)||void 0===s?void 0:s.toString())&&void 0!==r?r:"",o=n.csvJson.toObject(i);if(!tc(o))throw new Error("Provided file does not have the right format.");e(o)}catch(t){c(t)}})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},nc=r(108),cc=function e(t,r,n){var c=this;Object(x.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(g.a)(m.a.mark((function e(){var t,r,n;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Ne.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(Object(Rn.a)("id"));try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(nc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},ac=function(e,t,r){e.serviceFactory("CreateServer",On,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",Qn.a),e.decorator("CreateServer",t(["selectedServer"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",xn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",vn,"ServersExporter"),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return fn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",mn,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",pn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return qn})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",Kn,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",$n,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",ln.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",rc,"csvjson","fileReaderFactory"),e.service("ServersExporter",cc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Tn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return Gn})),e.serviceFactory("createServers",(function(){return Mn})),e.serviceFactory("deleteServer",(function(){return Bn})),e.serviceFactory("editServer",(function(){return Pn})),e.serviceFactory("fetchServers",Wn,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Un}))},sc=function(e){var t=e.visits,r=e.goBack,n=e.shortUrl,c=e.children,s=e.title;return Object(a.jsx)("header",{children:Object(a.jsxs)(we.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Vr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center d-none d-sm-block",children:Object(a.jsx)("small",{children:s})}),Object(a.jsxs)("span",{className:"badge badge-main ml-3",children:["Visits:"," ",Object(a.jsx)(Or,{visitsCount:t.length,shortUrl:n})]})]}),Object(a.jsx)("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:Object(a.jsx)("small",{children:s})}),c&&Object(a.jsx)("div",{className:"mt-md-2",children:c})]})})},ic=function(e){var t,r,n=e.shortUrlDetail,c=e.shortUrlVisits,s=e.goBack,i=n.shortUrl,o=n.loading,l=c.visits,u=null!==(t=null===i||void 0===i?void 0:i.shortUrl)&&void 0!==t?t:"",d=null!==(r=null===i||void 0===i?void 0:i.longUrl)&&void 0!==r?r:"",j=null===i||void 0===i?void 0:i.title,b=Object(a.jsxs)(a.Fragment,{children:["Visits for ",Object(a.jsx)(cr.a,{href:u})]});return Object(a.jsxs)(sc,{title:b,goBack:s,visits:l,shortUrl:i,children:[Object(a.jsx)("hr",{}),Object(a.jsxs)("div",{children:["Created: ",i?Object(a.jsxs)("span",{children:[Object(a.jsx)("b",{id:"created",className:"short-url-visits-header__created-at",children:Object(a.jsx)(ur,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(dr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(ur,{date:i.dateCreated})})]}):Object(a.jsx)("small",{children:"Loading..."})]}),Object(a.jsxs)("div",{children:["".concat(j?"Title":"Long URL",": "),o&&Object(a.jsx)("small",{children:"Loading..."}),!o&&Object(a.jsx)(cr.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},oc=r(732),lc=r(684),uc=r(733),dc=r(682),jc=r(118),bc=r(719),hc=r(720),Oc=r(721),vc=r(723),fc=r(716),mc=r(330),gc=r(717),xc=r(352),pc=r(93),Sc=r(718),yc=r(722),Cc=r(329),Nc=r.n(Cc),wc=r(715),_c="Others",kc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Uc=function(e){var t,r;return Object(Ue.d)(e)?null!==(t=null===(r=e.split("/")[e.includes("://")?2:0])||void 0===r?void 0:r.split(":")[0])&&void 0!==t?t:"":"Direct"},Tc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(wc.a)(t,t.map((function(){return 0})))),e))},Rc=function(e){return Object(a.jsx)(Hr,Object(d.a)({type:"switch"},e))},Ec=function(e,t){var r=e.native,n=Object(E.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},Dc=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(Zt(r))},Lc=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(Zt(r))},Vc=r(46),Ic={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Fc={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},Ac={hourly:fc.a,daily:mc.a,weekly:gc.a,monthly:xc.a},Mc={hourly:function(e){return Object($.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object($.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object($.default)(Object(pc.a)(e),"yyyy-MM-dd"),r=Object($.default)(Object(Sc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object($.default)(e,"yyyy-MM")}},Gc=function(e,t){return Object(Oc.a)((function(t){return Mc[e](Object(A.default)(t.date))}),t)},Pc=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=Ac[e],n=Mc[e],c=Object(A.default)(t[0].date),a=Object(A.default)(t[t.length-1].date),s=r(c,a),i=Fc[e];return[n(a)].concat(Object(Se.a)(Object(Ue.f)(s,(function(e){return n(Object(yc.a)(a,i(e)))}))))}(r,e);return[c,Tc(t,c)]},Bc=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},Hc=null,Wc=function(e,t,r){return function(n){var c=Object(E.a)(n,1)[0];if(r&&c){var a,s=c.index;if(Hc===e[s])r([]),Hc=null;else r(e[s]&&t[e[s]]||[]),Hc=null!==(a=e[s])&&void 0!==a?a:null}}},qc=function(e){var t=e.title,r=e.visits,n=e.highlightedVisits,c=e.highlightedLabel,s=void 0===c?"Selected":c,i=e.setSelectedVisits,o=Object(D.useState)(r.length>0?function(e){var t,r=new Date,n=Object(A.default)(e);return null!==(t=Object(bc.a)([[function(){return Object(mc.a)(r,n)<=2},Object(hc.a)("hourly")],[function(){return Object(xc.a)(r,n)<=1},Object(hc.a)("daily")],[function(){return Object(xc.a)(r,n)<=6},Object(hc.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(E.a)(o,2),u=l[0],d=l[1],j=Object(K.d)(!0),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(D.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=Mc[e](Object(A.default)(r.date));return t[c]=null!==(n=t[c])&&void 0!==n?n:[],t[c].push(r),t}),{})}(u,r)}),[u,r]),f=Object(D.useMemo)((function(){return Gc(u,Object(vc.a)(r))}),[u,r]),m=Object(D.useMemo)((function(){return Pc(r,f,u,h)}),[r,u,h]),g=Object(E.a)(m,2),x=g[0],p=g[1],S=Object(D.useMemo)((function(){return Tc(Gc(u,Object(vc.a)(n)),x)}),[n,u,x]),y=function(){var e=Bc(p,"Visits",Vc.c);return 0===n.length?[e]:[e,Bc(S,s,Vc.a)]},C={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:Dc}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:Zt}},x:{title:{display:!0,text:Ic[u]}}},onHover:Ec},N=function(){return Object(a.jsx)(jc.c,{data:{labels:x,datasets:y()},options:C,getElementAtEvent:Wc(x,v,i)})};return Object(a.jsxs)(we.a,{children:[Object(a.jsxs)(Yn.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(_e.a,{children:[Object(a.jsx)(q.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(z.a,{right:!0,children:Object.entries(Ic).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(H.a,{active:u===r,onClick:function(){return d(r)},children:n},r)}))})]})}),Object(a.jsx)("div",{className:"float-right mr-2",children:Object(a.jsx)(Rc,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(Xn.a,{className:"line-chart-card__body",children:[n.length>0&&N(),0===n.length&&N()]})]})},zc=r(724),Kc=function(e){var t=e.pagesCount,r=e.currentPage,n=e.setCurrentPage,c=e.centered,s=void 0===c||c;if(t<2)return null;var i=function(e){return function(){return!$t(e)&&n(e)}};return Object(a.jsxs)(Wt.a,{listClassName:G()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(Bt.a,{disabled:r<=1,children:Object(a.jsx)(Ht.a,{previous:!0,tag:"span",onClick:i(r-1)})}),Xt(r,t).map((function(e,t){return Object(a.jsx)(Bt.a,{disabled:$t(e),active:r===e,children:Object(a.jsx)(Ht.a,{tag:"span",onClick:i(e),children:er(e)})},tr(e,t))})),Object(a.jsx)(Bt.a,{disabled:r>=t,children:Object(a.jsx)(Ht.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},Qc=function(e,t){return t.filter((function(t){return function(e,t){var r=e.browser,n=e.os,c=e.referer,a=e.country,s=e.city,i=Object(jr.a)(e,["browser","os","referer","country","city"]);return"".concat(r," ").concat(n," ").concat(c," ").concat(a," ").concat(s," ").concat(i.visitedUrl).toLowerCase().includes(t.toLowerCase())}(t,e)}))},Jc=function(e){var t,r,n=e.visits,c=e.selectedVisits,s=void 0===c?[]:c,i=e.setSelectedVisits,o=e.selectedServer,l=e.matchMedia,u=void 0===l?window.matchMedia:l,d=e.isOrphanVisits,j=void 0!==d&&d,b="visits-table__header-cell visits-table__sticky",h=function(){return u("(max-width: 767px)").matches},O=Object(D.useState)(h()),v=Object(E.a)(O,2),f=v[0],m=v[1],g=Object(D.useState)(void 0),x=Object(E.a)(g,2),p=x[0],S=x[1],y=Object(D.useState)({field:void 0,dir:void 0}),C=Object(E.a)(y,2),N=C[0],w=C[1],_=Object(D.useMemo)((function(){return function(e,t,r){var n=function(e,t){var r=e.field,n=e.dir;return r&&n?t.sort((function(e,t){var c="ASC"===n?1:-1,a="ASC"===n?-1:1;return e[r]>t[r]?c:a})):t}(r,t?Qc(t,e):Object(Se.a)(e)),c=n.length;return{visitsGroups:Object(zc.a)(20,n),total:c}}(n,p,N)}),[p,N]),k=Object(D.useRef)(!0),U=Object(D.useState)(1),T=Object(E.a)(U,2),R=T[0],L=T[1],F=20*R,A=F-20,M=Object(wt.a)(o),B=7+Number(M)+Number(j),H=function(e){return function(){return w({field:e,dir:Object(Ue.b)(e,N.field,N.dir)})}},W=function(e){return N.dir&&N.field===e&&Object(a.jsx)(I.a,{icon:"ASC"===N.dir?V.f:V.e,className:"visits-table__header-icon"})};return Object(D.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(D.useEffect)((function(){L(1),!k.current&&i([]),k.current=!1}),[p]),Object(a.jsxs)("table",{className:"table table-bordered table-hover table-sm table-responsive-sm visits-table",children:[Object(a.jsxs)("thead",{className:"visits-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{className:"".concat(b," text-center"),onClick:function(){return i(s.length<_.total?_.visitsGroups.flat():[])},children:Object(a.jsx)(I.a,{icon:V.h,className:G()({"text-primary":s.length>0})})}),M&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(I.a,{icon:V.E}),W("potentialBot")]}),Object(a.jsxs)("th",{className:b,onClick:H("date"),children:["Date",W("date")]}),Object(a.jsxs)("th",{className:b,onClick:H("country"),children:["Country",W("country")]}),Object(a.jsxs)("th",{className:b,onClick:H("city"),children:["City",W("city")]}),Object(a.jsxs)("th",{className:b,onClick:H("browser"),children:["Browser",W("browser")]}),Object(a.jsxs)("th",{className:b,onClick:H("os"),children:["OS",W("os")]}),Object(a.jsxs)("th",{className:b,onClick:H("referer"),children:["Referrer",W("referer")]}),j&&Object(a.jsxs)("th",{className:b,onClick:H("visitedUrl"),children:["Visited URL",W("visitedUrl")]})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"p-0",children:Object(a.jsx)(P,{noBorder:!0,large:!1,onChange:S})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=_.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"text-center",children:"No visits found with current filtering"})}),null===(r=_.visitsGroups[R-1])||void 0===r?void 0:r.map((function(e,t){var r=s.includes(e);return Object(a.jsxs)("tr",{style:{cursor:"pointer"},className:G()({"table-active":r}),onClick:function(){return i(r?s.filter((function(t){return t!==e})):[].concat(Object(Se.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(I.a,{icon:V.h,className:"text-primary"})}),M&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.E,id:"botIcon".concat(t)}),Object(a.jsx)(dr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(ur,{date:e.date})}),Object(a.jsx)("td",{children:e.country}),Object(a.jsx)("td",{children:e.city}),Object(a.jsx)("td",{children:e.browser}),Object(a.jsx)("td",{children:e.os}),Object(a.jsx)("td",{children:e.referer}),j&&Object(a.jsx)("td",{children:e.visitedUrl})]},t)}))]}),_.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:B,className:"visits-table__footer-cell visits-table__sticky",children:Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-md-6",children:Object(a.jsx)(Kc,{pagesCount:Math.ceil(_.total/20),currentPage:R,setCurrentPage:L,centered:f})}),Object(a.jsx)("div",{className:G()("col-md-6",{"d-flex align-items-center flex-row-reverse":!f,"text-center mt-3":f}),children:Object(a.jsxs)("div",{children:["Visits ",Object(a.jsx)("b",{children:Zt(A+1)})," to"," ",Object(a.jsx)("b",{children:Zt(Object(Kt.a)(F,_.total))})," of"," ",Object(a.jsx)("b",{children:Zt(_.total)})]})})]})})})})]})},Zc=r(745),Yc=r(725),Xc=r(726),$c=r(727),ea=function(){return Object(a.jsx)(Zc.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ta=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(E.a)(e,1)[0].latLong}},ra=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(pr.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(yr.a,{className:"map-modal__modal-body",children:[Object(a.jsxs)("h3",{className:"map-modal__modal-title",children:[n,Object(a.jsx)("button",{type:"button",className:"close",onClick:t,children:"\xd7"})]}),Object(a.jsxs)(Yc.a,Object(d.a)(Object(d.a)({},ta(s)),{},{children:[Object(a.jsx)(ea,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Xc.a,{position:n,children:Object(a.jsxs)($c.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},na=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(K.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(K.d)(),j=Object(E.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(D.useState)([]),f=Object(E.a)(v,2),m=f[0],g=f[1],x=Object(D.useRef)(),p=function(e){return function(){g(e?c.filter((function(e){var t=e.cityName;return r.includes(t)})):c),l()}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("button",{className:"btn btn-link open-map-modal-btn__btn",ref:x,onClick:function(){if(!r)return g(c),void l();O()},children:Object(a.jsx)(I.a,{icon:V.w})}),Object(a.jsx)(dr.a,{placement:"left",target:function(){return x.current},children:"Show in map"}),Object(a.jsx)(W.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(z.a,{right:!0,children:[Object(a.jsx)(H.a,{onClick:p(!1),children:"Show all locations"}),Object(a.jsx)(H.a,{onClick:p(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(ra,{toggle:u,isOpen:o,title:t,locations:m})]})},ca=r(728),aa=function(e){return e.hasOwnProperty("visitedUrl")},sa=Object(F.a)(Object(ca.a)((function(e){return aa(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),ia=function(e,t){return Object(Oc.a)(Object(O.a)(t),e)},oa=function(e){var t,r,n=e.page,c=e.itemsPerPage,a=e.filter,s=e.dateRange;return{page:n,itemsPerPage:c,startDate:null!==(t=(null===s||void 0===s?void 0:s.startDate)&&ne(null===s||void 0===s?void 0:s.startDate))&&void 0!==t?t:void 0,endDate:null!==(r=(null===s||void 0===s?void 0:s.endDate)&&ne(null===s||void 0===s?void 0:s.endDate))&&void 0!==r?r:void 0,excludeBots:(null===a||void 0===a?void 0:a.excludeBots)||void 0}},la=function(e,t){return!Object(S.a)(e)&&Object(Ue.d)(e[t])},ua=function(e){return"number"===typeof e?e:e?parseFloat(e):0},da=function(e){return function(t,r){var n=la(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},ja=da("country"),ba=da("city"),ha=function(e){return e.reduce((function(e,t){return function(e,t){var r=t.os;e[r]=(e[r]||0)+1}(e.os,t),function(e,t){var r=t.browser;e[r]=(e[r]||0)+1}(e.browsers,t),function(e,t){var r=t.referer;e[r]=(e[r]||0)+1}(e.referrers,t),ja(e.countries,t),ba(e.cities,t),function(e,t){if(la(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[ua(n),ua(c)]};a.count++,e[r]=a}}(e.citiesForMap,t),function(e,t){if(function(e){return e.hasOwnProperty("visitedUrl")}(t)){var r=t.visitedUrl;e[r]=(e[r]||0)+1}}(e.visitedUrls,t),e}),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}})},Oa=Object(Dn.a)((function(e){var t=e.userAgent,r=e.date,n=e.referer,c=e.visitLocation,a=e.potentialBot,s=void 0!==a&&a,i=Object(d.a)(Object(d.a)({date:r,potentialBot:s},function(e){if(!Object(Ue.d)(e))return{browser:_c,os:_c};var t=Nc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:_c,browser:r&&kc.includes(r)?r:_c}}(t)),{},{referer:Uc(n),country:(null===c||void 0===c?void 0:c.countryName)||"Unknown",city:(null===c||void 0===c?void 0:c.cityName)||"Unknown",latitude:null===c||void 0===c?void 0:c.latitude,longitude:null===c||void 0===c?void 0:c.longitude});return aa(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),va=function(e){var t=e.onChange,r=e.selected,n=void 0===r?{}:r,c=e.className,s=e.isOrphanVisits,i=e.botsSupported;if(!i&&!s)return null;var o=n.orphanVisitsType,l=n.excludeBots,u=void 0!==l&&l,j=function(e){return{active:o===e,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{orphanVisitsType:e===(null===n||void 0===n?void 0:n.orphanVisitsType)?void 0:e}))}}};return Object(a.jsxs)(Q,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(H.a,{header:!0,children:"Bots:"}),Object(a.jsx)(H.a,{active:u,onClick:function(){return t(Object(d.a)(Object(d.a)({},n),{},{excludeBots:!(null!==n&&void 0!==n&&n.excludeBots)}))},children:"Exclude potential bots"})]}),i&&s&&Object(a.jsx)(H.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(H.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(H.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(H.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(H.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{disabled:!Object(Ue.d)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},fa=function(e){var t,r,n=e.chart.config,c=null!==(t=n.data)&&void 0!==t?t:{},s=c.labels,i=void 0===s?[]:s,o=c.datasets,l=void 0===o?[]:o,u=Object(E.a)(l,1)[0].backgroundColor,d=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor;return Object(a.jsx)("ul",{className:"doughnut-chart-legend",children:i.map((function(e,t){var r;return Object(a.jsxs)("li",{className:"doughnut-chart-legend__item d-flex",children:[Object(a.jsx)("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:null!==(r=u[t])&&void 0!==r?r:d}}),Object(a.jsx)("small",{className:"doughnut-chart-legend__item-text flex-fill",children:e})]},e)}))})},ma=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(Vc.h)()?Vc.e:Vc.f,borderWidth:2}]},ga=Object(D.memo)((function(e){var t=e.stats,r=Object(D.useState)(),n=Object(E.a)(r,2),c=n[0],s=n[1],i=Object(Ce.a)(t),o=Object(Ne.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:Lc}}}},u=function(e,t){return{labels:e,datasets:ma(t)}}(i,o);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-sm-12 col-md-7",children:Object(a.jsx)(jc.b,{height:300,data:u,options:l,ref:function(e){s(null!==e&&void 0!==e?e:void 0)}})}),Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:c&&Object(a.jsx)(fa,{chart:c})})]})})),xa=r(729),pa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(we.a,{children:[Object(a.jsx)(Yn.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(Xn.a,{children:n}),r&&Object(a.jsx)(xa.a,{className:"chart-card__footer--sticky",children:r})]})},Sa=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(pa,{title:t,children:Object(a.jsx)(ga,{stats:r})})},ya=r(132),Ca=r(738),Na=r(730),wa=r(731),_a=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(_e.a,{children:[Object(a.jsx)(q.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(z.a,{right:!0,children:[r.map((function(e){return Object(a.jsxs)(H.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},ka=function(e){return e.startsWith("hidden")?"":e},Ua=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:Vc.d,borderColor:Vc.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:Vc.b,borderColor:Vc.a,borderWidth:2}]},Ta=function(e,t){return function(r){var n=Object(E.a)(r,1)[0];t&&n&&t(e[n.index])}},Ra=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ce.a)(t).map(ka),o=Object(Ne.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ce.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=Tc(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:Dc}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:Zt}},y:{stacked:!0}},onHover:Ec,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:Ua(t,r,n)}}(i,o,l,n),b=function(e){return e.length>20?10*e.length:void 0}(i),h=function(e){return Object(a.jsx)(jc.a,{data:j,options:u,height:b,getElementAtEvent:Ta(i,c)},"".concat(b,"_").concat(e))};return Object(a.jsxs)(a.Fragment,{children:[void 0!==r&&h("with_stats"),void 0===r&&h("without_stats")]})},Ea=function(e){return"String"===Object(ya.a)(e)?Object(Ca.a)(e):e},Da=function(e){return Object(E.a)(e,1)[0]},La=function(e){return Object(E.a)(e,2)[1]},Va=function(e){var t=e.stats,r=e.highlightedStats,n=e.title,c=e.sortingItems,s=e.extraHeaderContent,i=e.withPagination,o=void 0===i||i,l=Object(jr.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(D.useState)({orderField:void 0,orderDir:void 0}),j=Object(E.a)(u,2),b=j[0],h=j[1],O=Object(D.useState)(1),v=Object(E.a)(O,2),f=v[0],m=v[1],g=Object(D.useState)(50),x=Object(E.a)(g,2),p=x[0],S=x[1],y=function(e){var t=e[f-1];if(f0?r:void 0,c),N=C.currentPageStats,w=C.currentPageHighlightedStats,_=C.pagination,k=C.max,U=Object.keys(N);return Object(a.jsx)(pa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Te,{isButton:!1,right:!0,items:c,orderField:b.orderField,orderDir:b.orderDir,onChange:function(e,t){h({orderField:e,orderDir:t}),m(1)}})}),o&&Object.keys(t).length>50&&Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(_a,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:p,setValue:function(e){S(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(_?U:void 0)})]})},footer:_,children:Object(a.jsx)(Ra,Object(d.a)({stats:N,highlightedStats:w,max:k},l))})},Ia={byTime:{title:"By time",subPath:"",icon:V.d},byContext:{title:"By context",subPath:"/by-context",icon:V.g},byLocation:{title:"By location",subPath:"/by-location",icon:V.w},list:{title:"List",subPath:"/list",icon:V.v}},Fa=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(lc.a,{tag:o.c,className:"visits-stats__nav-link",to:c,isActive:function(e,r){return r.pathname.endsWith("visits".concat(t))},replace:!0,children:[Object(a.jsx)(I.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},Aa=function(e){var t,r,n=e.children,c=e.visitsInfo,s=e.getVisits,i=e.cancelGetVisits,o=e.baseUrl,l=e.domain,u=e.settings,j=e.exportCsv,h=e.selectedServer,O=e.isOrphanVisits,v=void 0!==O&&O,f=null!==(t=null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",m=Object(D.useState)(je(f)),g=Object(E.a)(m,2),x=g[0],p=g[1],S=Object(D.useState)([]),C=Object(E.a)(S,2),N=C[0],w=C[1],_=Object(D.useState)(),k=Object(E.a)(_,2),U=k[0],T=k[1],R=Object(D.useState)({}),L=Object(E.a)(R,2),F=L[0],A=L[1],M=Object(wt.a)(h),P=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},B=c.visits,H=c.loading,W=c.loadingLarge,q=c.error,z=c.errorData,K=c.progress,Q=Object(D.useMemo)((function(){return Oa(B)}),[B]),J=Object(D.useMemo)((function(){return ha(Q)}),[Q]),Z=J.os,Y=J.browsers,X=J.referrers,$=J.countries,ee=J.cities,te=J.citiesForMap,re=J.visitedUrls,ne=Object(Ne.a)(te),ce=function(e){Be=void 0,w(e)},ae=function(e){return function(t){var r="".concat(e,"_").concat(t);Be===r?(w([]),T(void 0),Be=void 0):(w(Q.filter(Object(oc.a)(e,t))),T(t),Be=r)}};Object(D.useEffect)((function(){return i}),[]),Object(D.useEffect)((function(){s({dateRange:x,filter:F})}),[x,F]);return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("section",{className:"mt-3",children:Object(a.jsxs)("div",{className:"row flex-md-row-reverse",children:[Object(a.jsx)("div",{className:"col-lg-7 col-xl-6",children:Object(a.jsxs)("div",{className:"d-md-flex",children:[Object(a.jsx)("div",{className:"flex-fill",children:Object(a.jsx)(ge,{disabled:H,initialDateRange:f,defaultText:"All visits",onDatesChange:p})}),Object(a.jsx)(va,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:M,selected:F,onChange:A})]})}),B.length>0&&Object(a.jsx)("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:Object(a.jsxs)("div",{className:"d-flex",children:[Object(a.jsxs)(Vr.a,{outline:!0,disabled:0===N.length,className:"btn-md-block mr-2",onClick:function(){return ce([])},children:["Clear selection ",N.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",N.length,")"]})]}),Object(a.jsxs)(Vr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j(Q)},children:[Object(a.jsx)(I.a,{icon:V.q})," Export (",Q.length,")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:W?Object(a.jsxs)(Xr.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(uc.a,{value:K,striped:100===K,className:"mt-3"})]}):H?Object(a.jsx)(Xr.a,{loading:!0}):q?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:z,fallbackMessage:"An error occurred while loading visits :("})}):Object(y.a)(B)?Object(a.jsx)(Xr.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(we.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(dc.a,{pills:!0,fill:!0,children:Object.entries(Ia).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(Fa,Object(d.a)(Object(d.a)({},n),{},{to:P(n.subPath)}),r)}))})}),Object(a.jsx)(wr.a,{children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:o,children:Object(a.jsx)("div",{className:"col-12 mt-3",children:Object(a.jsx)(qc,{title:"Visits during time",visits:Q,highlightedVisits:N,highlightedLabel:U,setSelectedVisits:ce})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Ia.byContext.subPath),children:[Object(a.jsx)("div",{className:G()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Sa,{title:"Operating systems",stats:Z})}),Object(a.jsx)("div",{className:G()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Sa,{title:"Browsers",stats:Y})}),Object(a.jsx)("div",{className:G()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(Va,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:ia(N,"referer"),highlightedLabel:U,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ae("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(Va,{title:"Visited URLs",stats:re,highlightedLabel:U,highlightedStats:ia(N,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ae("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(Ia.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Va,{title:"Countries",stats:$,highlightedStats:ia(N,"country"),highlightedLabel:U,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ae("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Va,{title:"Cities",stats:ee,highlightedStats:ia(N,"city"),highlightedLabel:U,extraHeaderContent:function(e){return ne.length>0&&Object(a.jsx)(na,{modalTitle:"Cities",locations:ne,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ae("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(Ia.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(Jc,{visits:Q,selectedVisits:N,setSelectedVisits:ce,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},Ma=function(e){var t=e.exportVisits;return Ee((function(e){var r=e.history.goBack,n=e.match,c=n.params,s=n.url,i=e.location.search,o=e.shortUrlVisits,l=e.shortUrlDetail,u=e.getShortUrlVisits,j=e.getShortUrlDetail,b=e.cancelGetShortUrlVisits,h=e.settings,O=e.selectedServer,v=c.shortCode,f=Object(C.a)(i).domain;return Object(D.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(Aa,{getVisits:function(e){return u(v,Object(d.a)(Object(d.a)({},oa(e)),{},{domain:f}))},cancelGetVisits:b,visitsInfo:o,baseUrl:s,domain:f,settings:h,exportCsv:function(e){var r;return t("short-url_".concat(null===(r=l.shortUrl)||void 0===r?void 0:r.shortUrl.replace(/https?:\/\//g,""),"_visits.csv"),e)},selectedServer:O,children:Object(a.jsx)(ic,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[De.shortUrlVisits(t.params.shortCode)]}))},Ga=r(743),Pa=5e3,Ba=function(e){return e.currentPage>=e.pagesCount},Ha=function(e,t){return 100*t/e},Wa=function(){var e=Object(g.a)(m.a.mark((function e(t,r,n,c,a){var s,i,o,l;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c({type:n.start}),s=function(){var e=Object(g.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(r.map(function(){var e=Object(g.a)(m.a.mark((function e(r){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(r,Pa).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(Ga.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i=function(){var e=Object(g.a)(m.a.mark((function e(t){var r,o,l=arguments;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>1&&void 0!==l[1]?l[1]:0,!a()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,s(t[r]);case 5:if(o=e.sent,c({type:n.progress,progress:Ha(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,Pa);case 3:if(a=e.sent,s=a.pagination,o=a.data,s&&!Ba(s)){e.next=8;break}return e.abrupt("return",o);case 8:return l=Object(qt.a)(2,s.pagesCount+1),u=Object(zc.a)(4,l),s.pagesCount-1>4&&c({type:n.large}),e.t0=o,e.next=14,i(u);case 14:return e.t1=e.sent,e.abrupt("return",e.t0.concat.call(e.t0,e.t1));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.prev=4,e.next=7,o();case 7:l=e.sent,c(Object(d.a)(Object(d.a)({},r),{},{visits:l,type:n.finish})),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),c({type:n.error,errorData:ot(e.t0)});case 14:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",za="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",Ka="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",Qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",Ja="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",Za="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",Ya={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Xa=$e((He={},Object(u.a)(He,qa,(function(){return Object(d.a)(Object(d.a)({},Ya),{},{loading:!0})})),Object(u.a)(He,za,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ya),{},{error:!0,errorData:r})})),Object(u.a)(He,Ka,(function(e,t){var r=t.visits,n=t.shortCode,c=t.domain;return Object(d.a)(Object(d.a)({},Ya),{},{visits:r,shortCode:n,domain:c})})),Object(u.a)(He,Qa,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(He,Ja,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(He,Za,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(He,st,(function(e,t){var r=t.createdVisits,n=e.shortCode,c=e.domain,a=e.visits,s=r.filter((function(e){var t=e.shortUrl;return t&&at(t,n,c)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(Se.a)(s),Object(Se.a)(a))})})),He),Ya),$a=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getShortUrlVisits,o=function(){var e=Object(g.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().shortUrlVisits.cancelLoad},u={shortCode:t,domain:r.domain},j={start:qa,large:Qa,finish:Ka,error:za,progress:Za},n.abrupt("return",Wa(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},es=et(Ja),ts=function(e){var t=e.tagVisits,r=e.goBack,n=e.colorGenerator,c=t.visits,s=t.tag,i=Object(a.jsxs)("span",{className:"d-flex align-items-center justify-content-center",children:[Object(a.jsx)("span",{className:"mr-2",children:"Visits for"}),Object(a.jsx)(B,{text:s,colorGenerator:n})]});return Object(a.jsx)(sc,{title:i,goBack:r,visits:c})},rs=function(e,t){var r=t.exportVisits;return Ee((function(t){var n=t.history.goBack,c=t.match,s=c.params,i=c.url,o=t.getTagVisits,l=t.tagVisits,u=t.cancelGetTagVisits,d=t.settings,j=t.selectedServer,b=s.tag;return Object(a.jsx)(Aa,{getVisits:function(e){return o(b,oa(e))},cancelGetVisits:u,visitsInfo:l,baseUrl:i,settings:d,exportCsv:function(e){return r("tag_".concat(b,"_visits.csv"),e)},selectedServer:j,children:Object(a.jsx)(ts,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[De.visits]}))},ns="shlink/tagVisits/GET_TAG_VISITS_START",cs="shlink/tagVisits/GET_TAG_VISITS_ERROR",as="shlink/tagVisits/GET_TAG_VISITS",ss="shlink/tagVisits/GET_TAG_VISITS_LARGE",is="shlink/tagVisits/GET_TAG_VISITS_CANCEL",os="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",ls={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},us=$e((We={},Object(u.a)(We,ns,(function(){return Object(d.a)(Object(d.a)({},ls),{},{loading:!0})})),Object(u.a)(We,cs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ls),{},{error:!0,errorData:r})})),Object(u.a)(We,as,(function(e,t){var r=t.visits,n=t.tag;return Object(d.a)(Object(d.a)({},ls),{},{visits:r,tag:n})})),Object(u.a)(We,ss,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(We,is,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(We,os,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(We,st,(function(e,t){var r=t.createdVisits,n=e.tag,c=e.visits,a=r.filter((function(e){var t=e.shortUrl;return null===t||void 0===t?void 0:t.tags.includes(n)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(Se.a)(a),Object(Se.a)(c))})})),We),ls),ds=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u,j;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getTagVisits,o=function(){var e=Object(g.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(t,Object(d.a)(Object(d.a)({},r),{},{page:n,itemsPerPage:c})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().tagVisits.cancelLoad},u={tag:t},j={start:ns,large:ss,finish:as,error:cs,progress:os},n.abrupt("return",Wa(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},js=et(is),bs=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(sc,{title:"Orphan visits",goBack:r,visits:n})},hs=function(e){var t=e.exportVisits;return Ee((function(e){var r=e.history.goBack,n=e.match.url,c=e.getOrphanVisits,s=e.orphanVisits,i=e.cancelGetOrphanVisits,o=e.settings,l=e.selectedServer;return Object(a.jsx)(Aa,{getVisits:function(e){var t;return c(oa(e),null===(t=e.filter)||void 0===t?void 0:t.orphanVisitsType)},cancelGetVisits:i,visitsInfo:s,baseUrl:n,settings:o,exportCsv:function(e){return t("orphan_visits.csv",e)},selectedServer:l,isOrphanVisits:!0,children:Object(a.jsx)(bs,{orphanVisits:s,goBack:r})})}),(function(){return[De.orphanVisits]}))},Os="shlink/orphanVisits/GET_ORPHAN_VISITS_START",vs="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",fs="shlink/orphanVisits/GET_ORPHAN_VISITS",ms="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",gs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",xs="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",ps={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ss=$e((qe={},Object(u.a)(qe,Os,(function(){return Object(d.a)(Object(d.a)({},ps),{},{loading:!0})})),Object(u.a)(qe,vs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ps),{},{error:!0,errorData:r})})),Object(u.a)(qe,fs,(function(e,t){var r=t.visits;return Object(d.a)(Object(d.a)({},ps),{},{visits:r})})),Object(u.a)(qe,ms,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(qe,gs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(qe,xs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(qe,st,(function(e,t){var r=t.createdVisits,n=e.visits,c=r.map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(Se.a)(c),Object(Se.a)(n))})})),qe),ps),ys=function(e,t){return!t||t===e.type},Cs=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o,l,u;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=e(a),i=s.getOrphanVisits,o=function(){var e=Object(g.a)(m.a.mark((function e(n,c){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return aa(e)&&ys(e,r)}));return Object(d.a)(Object(d.a)({},e),{},{data:t})})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),l=function(){return a().orphanVisits.cancelLoad},u={start:Os,large:ms,finish:fs,error:vs,progress:xs},n.abrupt("return",Wa(o,{},u,c,l));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},Ns=et(gs),ws="shlink/visitsOverview/GET_OVERVIEW_START",_s="shlink/visitsOverview/GET_OVERVIEW_ERROR",ks="shlink/visitsOverview/GET_OVERVIEW",Us={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},Ts=$e((ze={},Object(u.a)(ze,ws,(function(){return Object(d.a)(Object(d.a)({},Us),{},{loading:!0})})),Object(u.a)(ze,_s,(function(){return Object(d.a)(Object(d.a)({},Us),{},{error:!0})})),Object(u.a)(ze,ks,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},Us),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(ze,st,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(jr.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=sa(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),ze),Us),Rs=function(e){return function(){return function(){var t=Object(g.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:ws}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:ks},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:_s});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Es=function e(t,r){var n=this;Object(x.a)(this,e),this.window=t,this.csvjson=r,this.exportVisits=function(e,t){if(t.length){var r=n.csvjson.toCSV(t,{headers:"key"});Object(nc.a)(n.window,r,e)}}},Ds=function(e,t){e.serviceFactory("MapModal",(function(){return ra})),e.serviceFactory("ShortUrlVisits",Ma,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",rs,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",hs,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",Es,"window","csvjson"),e.serviceFactory("getShortUrlVisits",$a,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return es})),e.serviceFactory("getTagVisits",ds,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return js})),e.serviceFactory("getOrphanVisits",Cs,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return Ns})),e.serviceFactory("createNewVisits",(function(){return it})),e.serviceFactory("loadVisitsOverview",Rs,"buildShlinkApiClient")},Ls=r(331),Vs=r.n(Ls),Is=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},Fs=function(e){return{id:e,name:e}},As=function(e){return function(t){var r,n,c=t.selectedTags,s=t.onChange,i=t.placeholder,o=t.listTags,l=t.tagsList,u=t.settings;Object(D.useEffect)((function(){o()}),[]);var d=null!==(r=null===(n=u.shortUrlCreation)||void 0===n?void 0:n.tagFilteringMode)&&void 0!==r?r:"startsWith";return Object(a.jsx)(Vs.a,{tags:c.map(Fs),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(B,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map(Fs),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Is,{tag:"".concat(r.name),colorGenerator:e}),r.name]})},allowNew:!0,addOnBlur:!0,placeholderText:null!==i&&void 0!==i?i:"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:"includes"===d?function(e,t){return t.filter((function(t){return t.name.includes(e)}))}:void 0,onDelete:function(e){var t=Object(Se.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(Se.a)(new Set([].concat(Object(Se.a)(c),Object(Se.a)(t.toLowerCase().split(","))))))}})}},Ms=r(681),Gs=function(e,t,r){return function(n){var c=n.tag,s=n.tagStats,i=n.selectedServer,l=n.displayed,u=n.toggle,d=Object(K.d)(),j=Object(E.a)(d,2),b=j[0],h=j[1],O=Object(K.d)(),f=Object(E.a)(O,2),m=f[0],g=f[1],x=Object(K.d)(),p=Object(E.a)(x,3),S=p[0],y=p[2],C=Object(D.useRef)(),N=Object(v.e)(i)?i.id:"";return Object(D.useEffect)((function(){var e;(e=C.current)&&e.scrollWidth>e.clientWidth&&y()}),[C.current]),Object(a.jsxs)(we.a,{className:"tag-card",children:[Object(a.jsxs)(Yn.a,{className:"tag-card__header",children:[Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:h,children:Object(a.jsx)(I.a,{icon:V.O})}),Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:g,children:Object(a.jsx)(I.a,{icon:V.B})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:S?c:void 0,ref:function(e){C.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(Is,{tag:c,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:u,children:c})]})]}),s&&Object(a.jsx)(Ms.a,{isOpen:l,children:Object(a.jsxs)(Xn.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/list-short-urls/1?tag=").concat(encodeURIComponent(c)),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center mb-1",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.u,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:Zt(s.shortUrlsCount)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/tag/").concat(c,"/visits"),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:Zt(s.visitsCount)})]})]})}),Object(a.jsx)(e,{tag:c,toggle:h,isOpen:b}),Object(a.jsx)(t,{tag:c,toggle:g,isOpen:m})]})}},Ps=function(e){var t=e.tag,r=e.toggle,n=e.isOpen,c=e.deleteTag,s=e.tagDelete,i=e.tagDeleted,o=s.deleting,l=s.error,u=s.errorData,d=function(){var e=Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t);case 2:i(t),r();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(a.jsxs)(pr.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(Sr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(yr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(kr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{className:"btn btn-link",onClick:r,children:"Cancel"}),Object(a.jsx)("button",{className:"btn btn-danger",disabled:o,onClick:d,children:o?"Deleting tag...":"Delete tag"})]})]})},Bs=r(734),Hs=r(343),Ws=function(e){var t=e.getColorForKey;return function(e){var r=e.tag,n=e.editTag,c=e.toggle,s=e.tagEdited,i=e.isOpen,o=e.tagEdit,l=Object(D.useState)(r),u=Object(E.a)(l,2),d=u[0],j=u[1],b=Object(D.useState)(t(r)),h=Object(E.a)(b,2),O=h[0],v=h[1],f=Object(K.d)(),x=Object(E.a)(f,4),p=x[0],S=x[1],y=x[3],C=o.editing,N=o.error,w=o.errorData,_=Object(Ue.c)(Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n(r,d,O).then((function(){return s(r,d,O)})).then(c).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(pr.a,{isOpen:i,toggle:c,centered:!0,onClosed:y,children:Object(a.jsxs)("form",{onSubmit:_,children:[Object(a.jsx)(Sr.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)("div",{className:"input-group",children:[Object(a.jsx)("div",{className:"input-group-prepend",id:"colorPickerBtn",onClick:S,children:Object(a.jsx)("div",{className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:O,borderColor:O},children:Object(a.jsx)(I.a,{icon:V.z,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(Bs.a,{isOpen:p,toggle:S,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(Hs.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(Mr.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),N&&Object(a.jsx)(kr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:w,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)(Vr.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)(Vr.a,{color:"primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},qs=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(Q,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(H.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(I.a,{icon:V.M,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(H.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(I.a,{icon:V.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},zs=function(e,t){return Ee((function(r){var n,c,s=r.filterTags,i=r.forceListTags,o=r.tagsList,l=r.selectedServer,u=r.settings,d=Object(D.useState)(null!==(n=null===(c=u.ui)||void 0===c?void 0:c.tagsMode)&&void 0!==n?n:"cards"),j=Object(E.a)(d,2),b=j[0],h=j[1];if(Object(D.useEffect)((function(){i()}),[]),o.loading)return Object(a.jsx)(Xr.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(P,{className:"mb-3",onChange:s}),Object(a.jsx)(wr.a,{className:"mb-3",children:Object(a.jsx)("div",{className:"col-lg-6 offset-lg-6",children:Object(a.jsx)(qs,{mode:b,onChange:h})})}),o.error?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:o.errorData,fallbackMessage:"Error loading tags :("})}):o.filteredTags.length<1?Object(a.jsx)(Xr.a,{children:"No tags found"}):"cards"===b?Object(a.jsx)(e,{tagsList:o,selectedServer:l}):Object(a.jsx)(t,{tagsList:o,selectedServer:l})]})}),(function(){return[De.visits]}))},Ks="shlink/deleteTag/DELETE_TAG_START",Qs="shlink/deleteTag/DELETE_TAG_ERROR",Js="shlink/deleteTag/DELETE_TAG",Zs="shlink/deleteTag/TAG_DELETED",Ys=$e((Ke={},Object(u.a)(Ke,Ks,(function(){return{deleting:!0,error:!1}})),Object(u.a)(Ke,Qs,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Ke,Js,(function(){return{deleting:!1,error:!1}})),Ke),{deleting:!1,error:!1}),Xs=function(e){return function(t){return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:Ks}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:Js}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:Qs,errorData:ot(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},$s=function(e){return{type:Zs,tag:e}},ei="shlink/editTag/EDIT_TAG_START",ti="shlink/editTag/EDIT_TAG_ERROR",ri="shlink/editTag/EDIT_TAG",ni="shlink/editTag/TAG_EDITED",ci=$e((Qe={},Object(u.a)(Qe,ei,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(Qe,ti,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(Qe,ri,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),Qe),{oldName:"",newName:"",editing:!1,error:!1}),ai=function(e,t){return function(r,n,c){return function(){var a=Object(g.a)(m.a.mark((function a(s,i){var o,l;return m.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s({type:ei}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:ri,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:ti,errorData:ot(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},si=function(e,t,r){return{type:ni,oldName:e,newName:t,color:r}},ii="shlink/tagsList/LIST_TAGS_START",oi="shlink/tagsList/LIST_TAGS_ERROR",li="shlink/tagsList/LIST_TAGS",ui="shlink/tagsList/FILTER_TAGS",di={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},ji=function(e,t){return function(r){return r===e?t:r}},bi=function(e,t){return Object(p.a)((function(e){return e===t}),e)},hi=function(e){return Object.entries(e.reduce((function(e,t){var r=t.shortUrl;return null===r||void 0===r||r.tags.forEach((function(t){e[t]=(e[t]||0)+1})),e}),{}))},Oi=$e((Je={},Object(u.a)(Je,ii,(function(){return Object(d.a)(Object(d.a)({},di),{},{loading:!0})})),Object(u.a)(Je,oi,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},di),{},{error:!0,errorData:r})})),Object(u.a)(Je,li,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},di),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(Je,Zs,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:bi(e.tags,r),filteredTags:bi(e.filteredTags,r)})})),Object(u.a)(Je,ni,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(ji(r,n)).sort(),filteredTags:e.filteredTags.map(ji(r,n)).sort()})})),Object(u.a)(Je,ui,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredTags:e.tags.filter((function(e){return e.toLowerCase().match(r)}))})})),Object(u.a)(Je,st,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=hi(c),n=e.stats,r.reduce((function(e,t){var r=Object(E.a)(t,2),n=r[0],c=r[1];if(!e[n])return e;var a=e[n];return a.visitsCount=a.visitsCount+c,e[n]=a,e}),Object(d.a)({},n)))})})),Je),di),vi=function(e){return{type:ui,searchTerm:e}},fi=Math.ceil,mi=function(e){return function(t){var r=t.tagsList,n=t.selectedServer,c=Object(D.useState)(),s=Object(E.a)(c,2),i=s[0],o=s[1],l=r.filteredTags.length,u=Object(zc.a)(fi(l/4),r.filteredTags);return Object(a.jsx)(wr.a,{children:u.map((function(t,c){return Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:t.map((function(t){return Object(a.jsx)(e,{tag:t,tagStats:r.stats[t],selectedServer:n,displayed:i===t,toggle:function(){return o(i!==t?t:void 0)}},t)}))},c)}))})}},gi=function(e,t){return function(r){var n,c=r.tagsList,s=r.selectedServer,i=r.location,o=Object(D.useRef)(!0),l=Object(C.a)(i.search).page,u=void 0===l?1:l,d=Object(K.a)("page",Number(u)),j=Object(E.a)(d,2),b=j[0],h=j[1],O=c.filteredTags,v=Object(zc.a)(20,O),f=v.length>1,m=null!==(n=v[b-1])&&void 0!==n?n:[];return Object(D.useEffect)((function(){!o.current&&h(1),o.current=!1}),[c.filteredTags]),Object(D.useEffect)((function(){scrollTo(0,0)}),[b]),Object(a.jsxs)(_r.a,{bodyClassName:f?"pb-1":"",children:[Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{children:"Tag"}),Object(a.jsx)("th",{className:"text-lg-right",children:"Short URLs"}),Object(a.jsx)("th",{className:"text-lg-right",children:"Visits"}),Object(a.jsx)("th",{})]})}),Object(a.jsxs)("tbody",{children:[0===m.length&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:4,className:"text-center",children:"No results found"})}),m.map((function(r){return Object(a.jsx)(t,{tag:r,tagStats:c.stats[r],selectedServer:s,colorGenerator:e},r)}))]})]}),f&&Object(a.jsx)("div",{className:"sticky-card-paginator",children:Object(a.jsx)(Kc,{pagesCount:v.length,currentPage:b,setCurrentPage:h})})]},b)}},xi=function(e,t){return function(r){var n,c,s=r.tag,i=r.tagStats,l=r.colorGenerator,u=r.selectedServer,d=Object(K.d)(),j=Object(E.a)(d,2),b=j[0],h=j[1],O=Object(K.d)(),f=Object(E.a)(O,2),m=f[0],g=f[1],x=Object(K.d)(),p=Object(E.a)(x,2),S=p[0],y=p[1],C=Object(v.a)(u);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsxs)("th",{className:"responsive-table__cell","data-th":"Tag",children:[Object(a.jsx)(Is,{tag:s,colorGenerator:l})," ",s]}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Short URLs",children:Object(a.jsx)(o.b,{to:"/server/".concat(C,"/list-short-urls/1?tag=").concat(encodeURIComponent(s)),children:Zt(null!==(n=null===i||void 0===i?void 0:i.shortUrlsCount)&&void 0!==n?n:0)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(o.b,{to:"/server/".concat(C,"/tag/").concat(s,"/visits"),children:Zt(null!==(c=null===i||void 0===i?void 0:i.visitsCount)&&void 0!==c?c:0)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)(mr,{toggle:y,isOpen:S,children:[Object(a.jsxs)(H.a,{onClick:g,children:[Object(a.jsx)(I.a,{icon:V.B,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(H.a,{onClick:h,children:[Object(a.jsx)(I.a,{icon:V.O,fixedWidth:!0,className:"mr-1"})," Delete"]})]})}),Object(a.jsx)(t,{tag:s,toggle:g,isOpen:m}),Object(a.jsx)(e,{tag:s,toggle:h,isOpen:b})]})}},pi=function(e,t){e.serviceFactory("TagsSelector",As,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",Gs,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return Ps})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Ws,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",mi,"TagCard"),e.serviceFactory("TagsTableRow",xi,"DeleteTagConfirmModal","EditTagModal"),e.serviceFactory("TagsTable",gi,"ColorGenerator","TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",zs,"TagsCards","TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"]));var r=function(e){return function(t){return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(){return function(){var r=Object(g.a)(m.a.mark((function r(n,c){var a,s,i,o,l,u,d,j;return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c(),s=a.tagsList,t||!s.loading&&Object(y.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:ii}),r.prev=4,i=e(c),o=i.listTags,r.next=8,o();case 8:l=r.sent,u=l.tags,d=l.stats,j=(void 0===d?[]:d).reduce((function(e,t){var r=t.tag,n=t.shortUrlsCount,c=t.visitsCount;return e[r]={shortUrlsCount:n,visitsCount:c},e}),{}),n({tags:u,stats:j,type:li}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:oi,errorData:ot(r.t0)});case 19:case"end":return r.stop()}}),r,null,[[4,16]])})));return function(e,t){return r.apply(this,arguments)}}()}}(t.buildShlinkApiClient,e)}};e.factory("listTags",r(!1)),e.factory("forceListTags",r(!0)),e.serviceFactory("filterTags",(function(){return vi})),e.serviceFactory("tagDeleted",(function(){return $s})),e.serviceFactory("tagEdited",(function(){return si})),e.serviceFactory("deleteTag",Xs,"buildShlinkApiClient"),e.serviceFactory("editTag",ai,"buildShlinkApiClient","ColorGenerator")},Si=r(336),yi="shlink/mercure/GET_MERCURE_INFO_START",Ci="shlink/mercure/GET_MERCURE_INFO_ERROR",Ni="shlink/mercure/GET_MERCURE_INFO",wi=$e((Ze={},Object(u.a)(Ze,yi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ze,Ci,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(Ze,Ni,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),Ze),{loading:!0,error:!1}),_i=function(e){return function(){return function(){var t=Object(g.a)(m.a.mark((function t(r,n){var c,a,s,i,o;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r({type:yi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:Ci}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:Ni,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:Ci});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},ki=function(e){e.serviceFactory("loadMercureInfo",_i,"buildShlinkApiClient")},Ui=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(_r.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(Rc,{checked:r.enabled,onChange:n,children:["Enable or disable real-time updates, when using Shlink v2.2.0 or newer.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["Real-time updates are currently being ",Object(a.jsx)("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{className:G()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(Mr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){var t=e.target;return c(Number(t.value))}}),r.enabled&&Object(a.jsxs)("small",{className:"form-text text-muted",children:[void 0!==r.interval&&r.interval>0&&Object(a.jsxs)("span",{children:["Updates will be reflected in the UI every ",Object(a.jsx)("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},Ti=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(wr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},Ri=function(e,t,r,n){return function(){return Object(a.jsx)(un.a,{children:Object(a.jsx)(Ti,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},Ei=r(741),Di="shlink/realTimeUpdates/SET_SETTINGS",Li=$e(Object(u.a)({},Di,(function(e,t){return Object(Ei.a)(e,Object(Rn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),Vi=function(e){return{type:Di,realTimeUpdates:{enabled:e}}},Ii=function(e){return{type:Di,realTimeUpdates:{interval:e}}},Fi=function(e){return{type:Di,shortUrlCreation:e}},Ai=function(e){return{type:Di,ui:e}},Mi=function(e){return{type:Di,visits:e}},Gi=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},Pi=function(e){var t,r,n,c=e.settings,s=e.setShortUrlCreationSettings,i=null!==(t=c.shortUrlCreation)&&void 0!==t?t:{validateUrls:!1},o=function(e){return function(){return s(Object(d.a)(Object(d.a)({},null!==i&&void 0!==i?i:{validateUrls:!1}),{},{tagFilteringMode:e}))}};return Object(a.jsxs)(_r.a,{title:"Short URLs creation",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(Rc,{checked:null!==(r=i.validateUrls)&&void 0!==r&&r,onChange:function(e){return s(Object(d.a)(Object(d.a)({},i),{},{validateUrls:e}))},children:["By default, request validation on long URLs when creating new short URLs.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Validate URL"})," checkbox will be ",Object(a.jsx)("b",{children:i.validateUrls?"checked":"unchecked"}),"."]})]})}),Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(Q,{text:Gi(i.tagFilteringMode),children:[Object(a.jsx)(H.a,{active:!i.tagFilteringMode||"startsWith"===i.tagFilteringMode,onClick:o("startsWith"),children:Gi("startsWith")}),Object(a.jsx)(H.a,{active:"includes"===i.tagFilteringMode,onClick:o("includes"),children:Gi("includes")})]}),Object(a.jsx)("small",{className:"form-text text-muted",children:(n=i.tagFilteringMode,"includes"===n?Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain existing ones ",Object(a.jsx)("b",{children:"including"})," provided input."]}):Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain existing ones ",Object(a.jsx)("b",{children:"starting with"})," provided input."]}))})]})]})},Bi=function(e){var t,r,n=e.settings.ui,c=e.setUiSettings;return Object(a.jsxs)(_r.a,{title:"User interface",className:"h-100",children:[Object(a.jsxs)(Lr.a,{children:[Object(a.jsx)(I.a,{icon:"dark"===(null===n||void 0===n?void 0:n.theme)?V.y:V.J,className:"user-interface__theme-icon"}),Object(a.jsx)(Rc,{checked:"dark"===(null===n||void 0===n?void 0:n.theme),onChange:function(e){var t=e?"dark":"light";c(Object(d.a)(Object(d.a)({},n),{},{theme:t})),Object(Vc.g)(t)},children:"Use dark theme."})]}),Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(qs,{mode:null!==(t=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(Ue.a)(e)},onChange:function(e){return c(Object(d.a)(Object(d.a)({},null!==n&&void 0!==n?n:{theme:"light"}),{},{tagsMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==r?r:"cards"}),"."]})]})]})},Hi=function(e){var t,r=e.onChange,n=e.active;return Object(a.jsx)(Q,{text:null!==(t=le(n))&&void 0!==t?t:"",children:Object(a.jsx)(me,{active:n,onChange:r})})},Wi=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(_r.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Lr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(Hi,{active:null!==(t=null===(r=n.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days",onChange:function(e){return c({defaultInterval:e})}})]})})},qi=function(e,t){e.serviceFactory("Settings",Ri,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",Qn.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return Ui})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return Pi})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return Bi})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return Wi})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return Vi})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return Ii})),e.serviceFactory("setShortUrlCreationSettings",(function(){return Fi})),e.serviceFactory("setUiSettings",(function(){return Ai})),e.serviceFactory("setVisitsSettings",(function(){return Mi}))},zi="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Ki=function(e){return function(t,r){return function(){var n=Object(g.a)(m.a.mark((function n(c,a){var s,i,o;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START"}),s=e(a),i=s.editDomainRedirects,n.prev=2,n.next=5,i(Object(d.a)({domain:t},r));case 5:o=n.sent,c({type:zi,domain:t,redirects:o}),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),c({type:"shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR",errorData:ot(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},Qi="shlink/domainsList/LIST_DOMAINS_START",Ji="shlink/domainsList/LIST_DOMAINS_ERROR",Zi="shlink/domainsList/LIST_DOMAINS",Yi="shlink/domainsList/FILTER_DOMAINS",Xi={domains:[],filteredDomains:[],loading:!1,error:!1},$i=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},eo=$e((Ye={},Object(u.a)(Ye,Qi,(function(){return Object(d.a)(Object(d.a)({},Xi),{},{loading:!0})})),Object(u.a)(Ye,Ji,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},Xi),{},{error:!0,errorData:t})})),Object(u.a)(Ye,Zi,(function(e,t){var r=t.domains;return Object(d.a)(Object(d.a)({},Xi),{},{domains:r,filteredDomains:r})})),Object(u.a)(Ye,Yi,(function(e,t){var r=t.searchTerm;return Object(d.a)(Object(d.a)({},e),{},{filteredDomains:e.domains.filter((function(e){return e.domain.toLowerCase().match(r)}))})})),Object(u.a)(Ye,zi,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map($i(r,n)),filteredDomains:e.filteredDomains.map($i(r,n))})})),Ye),Xi),to=function(e){return function(){return function(){var t=Object(g.a)(m.a.mark((function t(r,n){var c,a,s;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:Qi}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,r({type:Zi,domains:s}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),r({type:Ji,errorData:ot(t.t0)});case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},ro=function(e){return{type:Yi,searchTerm:e}},no=r(736),co=r(746),ao=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(K.d)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(y.a)(r),b=function(){return c("")};return Object(D.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(no.a,{children:[Object(a.jsx)(Mr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(co.a,{addonType:"append",children:[Object(a.jsx)(Vr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(F.a)(b,u),children:Object(a.jsx)(I.a,{icon:V.P})}),Object(a.jsx)(dr.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(Q,{text:j?"Domain":"Domain: ".concat(r),className:j?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[d.map((function(e){var t=e.domain,n=e.isDefault;return Object(a.jsxs)(H.a,{active:r===t||n&&j,onClick:function(){return c(t)},children:[t,n&&Object(a.jsx)("span",{className:"float-right text-muted",children:"default"})]},t)})),Object(a.jsx)(H.a,{divider:!0}),Object(a.jsx)(H.a,{onClick:Object(F.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},so=function(e){var t=e.isLast,r=Object(jr.a)(e,["isLast"]);return Object(a.jsx)(dn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},io=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(D.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(D.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(E.a)(v,2),x=f[0],p=f[1],S=Object(D.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),y=Object(E.a)(S,2),C=y[0],N=y[1],w=Object(Ue.c)(Object(g.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(u.domain,{baseUrlRedirect:Object(Ue.e)(h),regular404Redirect:Object(Ue.e)(x),invalidShortUrlRedirect:Object(Ue.e)(C)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(pr.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsxs)(Sr.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)(so,{value:h,onChange:O,children:[Object(a.jsxs)(Kr,{className:"mr-2",placement:"bottom",children:["Visitors accessing the base url, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),Object(a.jsxs)(so,{value:x,onChange:p,children:[Object(a.jsxs)(Kr,{className:"mr-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",Object(a.jsxs)("b",{children:["https://",u.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),Object(a.jsxs)(so,{value:C,isLast:!0,onChange:N,children:[Object(a.jsx)(Kr,{className:"mr-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)(Vr.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)(Vr.a,{color:"primary",children:"Save"})]})]})})},oo=function(e){var t=e.fallback;return Object(a.jsxs)("span",{className:"text-muted",children:[!t&&Object(a.jsx)("small",{children:"No redirect"}),t&&Object(a.jsxs)(a.Fragment,{children:[t," ",Object(a.jsx)("small",{children:"(as fallback)"})]})]})},lo=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(dr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},uo=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=Object(K.d)(),l=Object(E.a)(o,2),u=l[0],d=l[1],j=c.domain,b=c.isDefault,h=c.redirects,O="domainEdit".concat(j.replace(/\./g,""));return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:b?Object(a.jsx)(lo,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:j}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===h||void 0===h?void 0:h.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(oo,{fallback:null===i||void 0===i?void 0:i.baseUrlRedirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:null!==(r=null===h||void 0===h?void 0:h.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(oo,{fallback:null===i||void 0===i?void 0:i.regular404Redirect})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:null!==(n=null===h||void 0===h?void 0:h.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(oo,{fallback:null===i||void 0===i?void 0:i.invalidShortUrlRedirect})}),Object(a.jsxs)("td",{className:"responsive-table__cell text-right",children:[Object(a.jsx)("span",{id:O,children:Object(a.jsx)(Vr.a,{outline:!0,size:"sm",disabled:b,onClick:b?void 0:d,children:Object(a.jsx)(I.a,{icon:b?V.b:V.m})})}),b&&Object(a.jsxs)(dr.a,{target:O,placement:"left",children:["Redirects for default domain cannot be edited here.",Object(a.jsx)("br",{}),"Use config options or env vars directly on the server."]})]}),Object(a.jsx)(io,{domain:c,isOpen:u,toggle:d,editDomainRedirects:s})]})},jo=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],bo=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=n.filteredDomains,o=n.loading,l=n.error,u=n.errorData,d=null===(t=i.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(D.useEffect)((function(){r()}),[]),o)return Object(a.jsx)(Xr.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(P,{className:"mb-3",onChange:c}),l?Object(a.jsx)(kr,{type:"error",children:Object(a.jsx)(Ur,{errorData:u,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(_r.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsx)("tr",{children:jo.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[i.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:jo.length,className:"text-center",children:"No results found"})}),i.map((function(e){return Object(a.jsx)(uo,{domain:e,editDomainRedirects:s,defaultRedirects:d},e.domain)}))]})]})})]})},ho=function(e,t){e.serviceFactory("DomainSelector",(function(){return ao})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return bo})),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",to,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return ro})),e.serviceFactory("editDomainRedirects",Ki,"buildShlinkApiClient")},Oo="shlink/appUpdates/APP_UPDATE_AVAILABLE",vo="shlink/appUpdates/RESET_APP_UPDATE",fo=$e((Xe={},Object(u.a)(Xe,Oo,(function(){return!0})),Object(u.a)(Xe,vo,(function(){return!1})),Xe),!1),mo=et(Oo),go=et(vo),xo=r(164),po=r(737),So=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(K.d)(),s=Object(E.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(po.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:_r.a,color:"secondary",children:[Object(a.jsx)("h4",{className:"mb-4",children:"This app has just been updated!"}),Object(a.jsxs)("p",{className:"mb-0",children:["Restart it to enjoy the new features.",Object(a.jsxs)(Vr.a,{disabled:i,className:"ml-2",color:"secondary",size:"sm",onClick:function(){o(),n()},children:[!i&&Object(a.jsxs)(a.Fragment,{children:["Restart now ",Object(a.jsx)(I.a,{icon:V.K,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},yo=r(32),Co=function(){var e=Object(g.a)(m.a.mark((function e(){var t,r,n,c,a,s,i;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=navigator.serviceWorker)||void 0===r?void 0:r.getRegistrations();case 2:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=6;break}e.t0=void 0!==t;case 6:if(!e.t0){e.next=10;break}e.t2=t,e.next=11;break;case 10:e.t2=[];case 11:n=e.t2,c=Object(yo.a)(n);try{for(c.s();!(a=c.n()).done;)s=a.value,null===(i=s.waiting)||void 0===i||i.addEventListener("statechange",(function(e){var t;"activated"===(null===(t=e.target)||void 0===t?void 0:t.state)&&window.location.reload()})),null===i||void 0===i||i.postMessage({type:"SKIP_WAITING"})}catch(o){c.e(o)}finally{c.f()}case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),No=function(e,t,r,n,c,s,i){return function(o){var l=o.fetchServers,u=o.servers,d=o.settings,j=o.appUpdated,h=o.resetAppUpdate;return Object(D.useEffect)((function(){var e,t;0===Object.keys(u).length&&l(),Object(Vc.g)(null!==(e=null===(t=d.ui)||void 0===t?void 0:t.theme)&&void 0!==e?e:"light")}),[]),Object(a.jsxs)("div",{className:"container-fluid app-container",children:[Object(a.jsx)(e,{}),Object(a.jsxs)("div",{className:"app",children:[Object(a.jsx)("div",{className:"shlink-wrapper",children:Object(a.jsxs)(b.d,{children:[Object(a.jsx)(b.b,{exact:!0,path:"/",component:t}),Object(a.jsx)(b.b,{exact:!0,path:"/settings",component:s}),Object(a.jsx)(b.b,{exact:!0,path:"/server/create",component:n}),Object(a.jsx)(b.b,{exact:!0,path:"/server/:serverId/edit",component:c}),Object(a.jsx)(b.b,{path:"/server/:serverId",component:r}),Object(a.jsx)(b.b,{component:xo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(i,{})})]}),Object(a.jsx)(So,{isOpen:j,toggle:h,forceUpdate:Co})]})}},wo=function(e,t){e.serviceFactory("App",No,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",(function(){return mo})),e.serviceFactory("resetAppUpdate",(function(){return go}))},_o=new j.a,ko=_o.container,Uo=function(e,t){return Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},t,function(e,t){return function(){return e[t].apply(e,arguments)}}(ko,t)))},To=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(i.b)(e?Object(h.a)(e):null,t.reduce(Uo,{}))};wo(_o,To),Object(R.a)(_o,To,b.h),T(_o),sn(_o,To),ac(_o,To,b.h),pi(_o,To),Ds(_o,To),Object(Si.a)(_o),ki(_o),qi(_o,To),ho(_o,To);var Ro=ko,Eo=r(339),Do=r(80),Lo=r(242),Vo=Object(Do.c)({servers:Fn,selectedServer:kn,shortUrlsList:Vt,shortUrlsListParams:Gt,shortUrlCreationResult:yt,shortUrlDeletion:Ot,shortUrlEdition:Tt,shortUrlVisits:Xa,tagVisits:us,orphanVisits:Ss,shortUrlDetail:cn,tagsList:Oi,tagDelete:Ys,tagEdit:ci,mercureInfo:wi,settings:Li,domainsList:eo,visitsOverview:Ts,appUpdated:fo}),Io=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Do.d,Fo={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Ao=Object(Do.e)(Vo,Object(Lo.load)(Fo),Io(Object(Do.a)(Object(Lo.save)(Fo),Eo.a))),Mo=r(63),Go=r.n(Mo),Po=r(340),Bo=r(341),Ho=r(342),Wo=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function qo(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var r=e.installing;null!=r&&(r.onstatechange=function(){"installed"===r.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}r(663),r(664);delete Go.a.Icon.Default.prototype._getIconUrl,Go.a.Icon.Default.mergeOptions({iconRetinaUrl:Po.a,iconUrl:Bo.a,shadowUrl:Ho.a});var zo=Ro.App,Ko=Ro.ScrollToTop,Qo=Ro.ErrorHandler,Jo=Ro.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:Ao,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(Qo,{children:Object(a.jsx)(Ko,{children:Object(a.jsx)(zo,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/develop")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/develop","/service-worker.js");Wo?(!function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then((function(r){var n=r.headers.get("content-type");404===r.status||null!=n&&-1===n.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):qo(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")}))):qo(t,e)}))}}({onUpdate:function(){Ao.dispatch(Jo())}})},68:function(e,t,r){"use strict";var n=r(0);t.a=function(e){var t=e.children;return Object(n.jsx)("div",{className:"no-menu-wrapper container-xl",children:t})}},69:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u}));var n=r(179),c=r(670),a=r(675),s=r(29),i=function(e,t){var r=t.maxVersion,c=t.minVersion;if(!Object(s.d)(e))return!1;var a=!c||Object(n.compare)(e,c,">=");return(!r||Object(n.compare)(e,r,"<="))&&a},o=Object(c.a)(a.a,(function(e){try{return Object(n.compare)(e,e,"=")}catch(t){return!1}})),l=function(e){return o(e)?"v".concat(e):e},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"latest";return function(t){return o(t)?t:e}}}},[[356,1,2]]]); +//# sourceMappingURL=main.65b3888f.chunk.js.map \ No newline at end of file diff --git a/develop/static/js/main.89526a11.chunk.js.map b/develop/static/js/main.65b3888f.chunk.js.map similarity index 95% rename from develop/static/js/main.89526a11.chunk.js.map rename to develop/static/js/main.65b3888f.chunk.js.map index 04a4eb9b..f91c42bd 100644 --- a/develop/static/js/main.89526a11.chunk.js.map +++ b/develop/static/js/main.65b3888f.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["servers/helpers/withoutSelectedServer.tsx","utils/helpers/files.ts","common/img/ShlinkLogo.tsx","servers/helpers/withSelectedServer.tsx","common/NotFound.tsx","servers/ServersListGroup.tsx","utils/helpers/hooks.ts","utils/utils.ts","servers/data/index.ts","common/services/provideServices.ts","common/ScrollToTop.tsx","common/ErrorHandler.tsx","common/services/ImageDownloader.ts","utils/services/provideServices.ts","utils/services/LocalStorage.ts","utils/services/ColorGenerator.ts","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","common/MainHeader.tsx","common/Home.tsx","common/MenuLayout.tsx","common/AsideMenu.tsx","utils/SimpleCard.tsx","utils/helpers/features.ts","utils/theme/index.ts","utils/helpers/query.ts","utils/Message.tsx","utils/SearchField.tsx","api/services/ShlinkApiClient.ts","api/services/ShlinkApiClientBuilder.ts","api/services/provideServices.ts","short-urls/ShortUrls.tsx","tags/helpers/Tag.tsx","utils/DropdownBtn.tsx","utils/helpers/date.ts","utils/dates/types/index.ts","utils/DateInput.tsx","utils/dates/DateRangeRow.tsx","utils/dates/DateIntervalDropdownItems.tsx","utils/dates/DateRangeSelector.tsx","short-urls/SearchBar.tsx","utils/SortingDropdown.tsx","mercure/helpers/boundToMercureHub.tsx","mercure/helpers/index.ts","mercure/helpers/Topics.ts","utils/helpers/redux.ts","visits/VisitsStats.tsx","short-urls/helpers/index.ts","visits/reducers/visitCreation.ts","api/utils/index.ts","short-urls/reducers/shortUrlDeletion.ts","short-urls/reducers/shortUrlCreation.ts","short-urls/reducers/shortUrlEdition.ts","short-urls/reducers/shortUrlsList.ts","short-urls/reducers/shortUrlsListParams.ts","utils/helpers/numbers.ts","utils/helpers/pagination.ts","short-urls/Paginator.tsx","short-urls/ShortUrlsList.tsx","utils/CopyToClipboardIcon.tsx","utils/Time.tsx","short-urls/helpers/ShortUrlDetailLink.tsx","short-urls/helpers/ShortUrlVisitsCount.tsx","short-urls/helpers/ShortUrlsRow.tsx","utils/DropdownBtnMenu.tsx","short-urls/helpers/ShortUrlsRowMenu.tsx","short-urls/CreateShortUrl.tsx","utils/Result.tsx","api/ShlinkApiError.tsx","short-urls/helpers/DeleteShortUrlModal.tsx","short-urls/helpers/CreateShortUrlResult.tsx","short-urls/ShortUrlsTable.tsx","short-urls/helpers/qr-codes/QrFormatDropdown.tsx","short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.tsx","short-urls/helpers/QrCodeModal.tsx","utils/helpers/qrCodes.ts","utils/BooleanControl.tsx","utils/Checkbox.tsx","short-urls/UseExistingIfFoundInfoIcon.tsx","utils/InfoTooltip.tsx","short-urls/helpers/ShortUrlFormCheckboxGroup.tsx","short-urls/ShortUrlForm.tsx","short-urls/EditShortUrl.tsx","short-urls/reducers/shortUrlDetail.ts","short-urls/services/provideServices.ts","utils/FormGroupContainer.tsx","servers/helpers/ServerForm.tsx","servers/CreateServer.tsx","servers/ServersDropdown.tsx","servers/DeleteServerModal.tsx","servers/DeleteServerButton.tsx","servers/EditServer.tsx","servers/helpers/ImportServersBtn.tsx","servers/reducers/selectedServer.ts","servers/reducers/servers.ts","servers/reducers/remoteServers.ts","servers/helpers/ForServerVersion.tsx","servers/helpers/ServerError.tsx","servers/Overview.tsx","servers/services/ServersImporter.ts","servers/services/ServersExporter.ts","servers/services/provideServices.ts","visits/VisitsHeader.tsx","visits/ShortUrlVisitsHeader.tsx","utils/helpers/visits.ts","utils/ToggleSwitch.tsx","utils/helpers/charts.ts","visits/charts/LineChartCard.tsx","common/SimplePaginator.tsx","visits/VisitsTable.tsx","visits/helpers/MapModal.tsx","visits/helpers/OpenMapModalBtn.tsx","visits/types/helpers.ts","visits/services/VisitsParser.ts","visits/helpers/VisitsFilterDropdown.tsx","visits/charts/DoughnutChartLegend.tsx","visits/charts/DoughnutChart.tsx","visits/charts/ChartCard.tsx","visits/charts/DoughnutChartCard.tsx","utils/PaginationDropdown.tsx","visits/charts/HorizontalBarChart.tsx","visits/charts/SortableBarChartCard.tsx","visits/ShortUrlVisits.tsx","visits/reducers/common.ts","visits/reducers/shortUrlVisits.ts","visits/TagVisitsHeader.tsx","visits/TagVisits.tsx","visits/reducers/tagVisits.ts","visits/OrphanVisitsHeader.tsx","visits/OrphanVisits.tsx","visits/reducers/orphanVisits.ts","visits/reducers/visitsOverview.ts","visits/services/VisitsExporter.ts","visits/services/provideServices.ts","tags/helpers/TagBullet.tsx","tags/helpers/TagsSelector.tsx","tags/TagCard.tsx","tags/helpers/DeleteTagConfirmModal.tsx","tags/helpers/EditTagModal.tsx","tags/TagsModeDropdown.tsx","tags/TagsList.tsx","tags/reducers/tagDelete.ts","tags/reducers/tagEdit.ts","tags/reducers/tagsList.ts","tags/TagsCards.tsx","tags/TagsTable.tsx","tags/TagsTableRow.tsx","tags/services/provideServices.ts","mercure/reducers/mercureInfo.ts","mercure/services/provideServices.ts","settings/RealTimeUpdates.tsx","settings/Settings.tsx","settings/reducers/settings.ts","settings/ShortUrlCreation.tsx","settings/UserInterface.tsx","utils/dates/DateIntervalSelector.tsx","settings/Visits.tsx","settings/services/provideServices.ts","domains/reducers/domainRedirects.ts","domains/reducers/domainsList.ts","domains/DomainSelector.tsx","domains/helpers/EditDomainRedirectsModal.tsx","domains/DomainRow.tsx","domains/ManageDomains.tsx","domains/services/provideServices.ts","app/reducers/appUpdates.ts","common/AppUpdateBanner.tsx","utils/helpers/sw.ts","app/App.tsx","app/services/provideServices.ts","container/index.ts","reducers/index.ts","container/store.ts","serviceWorkerRegistration.ts","utils/helpers/leaflet.ts","index.tsx","common/NoMenuLayout.tsx","utils/helpers/version.ts"],"names":["withoutSelectedServer","WrappedComponent","props","useEffect","resetSelectedServer","saveUrl","url","filename","document","link","createElement","setAttribute","style","visibility","body","appendChild","click","removeChild","saveCsv","window","csv","blob","Blob","type","URL","createObjectURL","ShlinkLogo","color","MAIN_COLOR","className","viewBox","version","xmlns","fill","d","withSelectedServer","ServerError","selectServer","selectedServer","match","params","serverId","isNotFoundServer","loading","NotFound","to","children","ServerListItem","id","name","ListGroupItem","tag","Link","icon","chevronIcon","ServersListGroup","servers","embedded","length","ListGroup","classNames","map","useStateFlagTimeout","setTimeout","clearTimeout","initialValue","delay","useState","flag","setFlag","timeout","useRef","undefined","callback","current","useToggle","useSwipeable","showSidebar","hideSidebar","swipeMenuIfNoModalExists","e","event","composedPath","some","classList","contains","querySelector","useReactSwipeable","delta","onSwipedLeft","onSwipedRight","useQueryState","paramName","initialState","value","setValue","location","history","query","parseQuery","search","pushState","pathname","stringifyQuery","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","rangeOf","size","mappingFn","startAt","range","hasValue","isNil","isEmpty","handleEventPreventingDefault","handler","pipe","preventDefault","nonEmptyValueOrNull","capitalize","charAt","toUpperCase","slice","hasServerData","server","apiKey","isServerWithId","hasOwnProperty","isReachableServer","getServerId","provideServices","bottle","connect","withRouter","constant","global","console","axios","service","ImageDownloader","serviceFactory","ScrollToTop","decorator","MainHeader","Home","MenuLayout","AsideMenu","ShlinkVersionsContainer","ErrorHandler","scrollTo","error","state","hasError","this","outline","onClick","reload","Component","imgUrl","get","responseType","data","localStorage","LocalStorage","ColorGenerator","buildPath","path","key","item","getItem","JSON","parse","set","setItem","stringify","floor","Math","random","letters","normalizeKey","toLowerCase","trim","storage","colors","getColorForKey","normalizedKey","setColorForKey","join","normalizeVersion","versionToSemVer","versionToPrintable","VersionLink","project","href","ShlinkVersions","clientVersion","normalizedClientVersion","printableVersion","classes","ServersDropdown","isOpen","toggleOpen","close","settingsPath","toggleClass","Navbar","dark","fixed","expand","NavbarBrand","NavbarToggler","arrowIcon","Collapse","navbar","Nav","NavItem","NavLink","active","cogsIcon","serversList","values","hasServers","Card","Row","noGutters","faPlus","faExternalLinkAlt","TagsList","ShortUrls","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","Overview","EditShortUrl","ManageDomains","sidebarVisible","toggleSidebar","addOrphanVisitsRoute","supportsOrphanVisits","addManageDomainsRoute","supportsDomainRedirects","burgerClasses","swipeableProps","burgerIcon","showOnMobile","exact","from","component","render","AsideMenuItem","rest","activeClassName","DeleteServerButton","addManageDomainsLink","asideClass","suffix","fixedWidth","overviewIcon","isActive","_","listIcon","createIcon","flip","tagsIcon","domainsIcon","editIcon","textClassName","SimpleCard","title","bodyClassName","serverMatchesVersions","versions","versionMatch","supportsQrCodeSizeInQuery","minVersion","supportsShortUrlTitle","supportsQrCodeMargin","supportsTagsInPatch","supportsBotVisits","supportsCrawlableVisits","supportsQrErrorCorrection","MAIN_COLOR_ALPHA","HIGHLIGHTED_COLOR","HIGHLIGHTED_COLOR_ALPHA","PRIMARY_LIGHT_COLOR","PRIMARY_DARK_COLOR","changeThemeInMarkup","theme","html","getElementsByTagName","isDarkThemeEnabled","getAttribute","qs","ignoreQueryPrefix","arrayFormat","getClassForType","default","getTextClassForType","Message","fullWidth","preloader","spin","timer","buildShlinkBaseUrl","apiVersion","rejectNilProps","reject","ShlinkApiClient","baseUrl","listShortUrls","a","performRequest","then","shortUrls","createShortUrl","options","filteredOptions","resp","getShortUrlVisits","shortCode","visits","getTagVisits","getOrphanVisits","getVisitsOverview","getShortUrl","domain","deleteShortUrl","updateShortUrlTags","tags","updateShortUrl","listTags","withStats","stats","deleteTags","editTag","oldName","newName","health","mercureInfo","listDomains","domains","editDomainRedirects","domainRedirects","method","headers","paramsSerializer","response","apiClients","buildShlinkApiClient","getStateOrSelectedServer","getState","isGetState","prop","Error","clientKey","SearchBar","ShortUrlsList","page","urlsListKey","setUrlsListKey","SearchField","onChange","large","noBorder","searchTerm","setSearchTerm","resetTimer","searchTermChanged","newSearchTerm","placeholder","target","searchIcon","hidden","Tag","text","clearable","colorGenerator","onClose","backgroundColor","cursor","DropdownBtn","disabled","dropdownClassName","right","minWidth","toggle","toggleClasses","Dropdown","DropdownToggle","caret","DropdownMenu","isDateObject","date","formatDateFromFormat","theFormat","format","formatISO","formatIsoDate","formatInternational","formatDate","dateRangeIsEmpty","dateRange","filter","Boolean","rangeIsInterval","INTERVAL_TO_STRING_MAP","today","yesterday","last7Days","last30Days","last90Days","last180days","last365Days","DATE_INTERVALS","Object","keys","rangeOrIntervalToString","startDate","endDate","dateRangeToString","startOfDaysAgo","daysAgo","startOfDay","subDays","Date","endingToday","endOfDay","intervalToDateRange","dateInterval","DateInput","isClearable","selected","showCalendarIcon","ref","dateFormat","calendarIcon","input","focus","DateRangeRow","onStartDateChange","onEndDateChange","placeholderText","maxDate","minDate","DateIntervalDropdownItems","interval","DropdownItem","DateRangeSelector","onDatesChange","initialDateRange","defaultText","activeInterval","setActiveInterval","activeDateRange","setActiveDateRange","updateDateRange","updateInterval","divider","header","dateOrNull","parseISO","shortUrlsListParams","selectedTags","setDates","dates","selectedTag","SortingDropdown","items","orderField","orderDir","isButton","handleItemClick","fieldKey","newOrderDir","UncontrolledDropdown","toPairs","fieldValue","sortAscIcon","sortDescIcon","boundToMercureHub","getTopicsForProps","pendingUpdates","Set","createNewVisits","loadMercureInfo","closeEventSource","topics","onMessage","onTokenExpired","mercureHubUrl","token","onEventSourceMessage","onEventSourceError","status","subscriptions","topic","hubUrl","searchParams","append","es","EventSource","Authorization","onmessage","onerror","forEach","bindToMercureTopic","visit","add","setInterval","clear","clearInterval","Topics","orphanVisits","shortUrlVisits","selectedBar","buildReducer","action","actionHandler","currentState","buildActionCreator","shortUrlMatches","shortUrl","CREATE_VISITS","createdVisits","parseApiError","isInvalidDeletionError","DELETE_SHORT_URL_START","DELETE_SHORT_URL_ERROR","SHORT_URL_DELETED","RESET_DELETE_SHORT_URL","errorData","dispatch","resetDeleteShortUrl","CREATE_SHORT_URL_START","CREATE_SHORT_URL_ERROR","CREATE_SHORT_URL","RESET_CREATE_SHORT_URL","result","saving","resetCreateShortUrl","EDIT_SHORT_URL_START","EDIT_SHORT_URL_ERROR","SHORT_URL_EDITED","editShortUrl","sendTagsSeparately","Promise","all","LIST_SHORT_URLS_START","LIST_SHORT_URLS_ERROR","LIST_SHORT_URLS","assocPath","pagination","totalItems","currentShortUrl","lastVisit","last","assoc","visitsCount","init","editedShortUrl","RESET_SHORT_URL_PARAMS","SORTABLE_FIELDS","dateCreated","longUrl","orderBy","resetShortUrlParams","ceil","formatter","Intl","NumberFormat","prettify","number","Number","ELLIPSIS","progressivePagination","currentPage","pageCount","pages","max","min","unshift","push","pageIsEllipsis","pageNumber","prettifyPageNumber","keyForPage","index","Paginator","paginator","pagesCount","Pagination","listClassName","PaginationItem","PaginationLink","previous","next","ShortUrlsTable","shortUrlsList","head","order","setOrder","refreshList","extraParams","handleOrderBy","decodeURIComponent","itemsPerPage","orderByColumn","field","renderOrderIcon","caretUpIcon","caretDownIcon","onTagClick","CopyToClipboardIcon","onCopy","copyIcon","Time","relative","dateObject","dateTime","getUnixTime","formatDistance","buildUrl","ShortUrlDetailLink","ShortUrlVisitsCount","maxVisits","meta","visitsLink","prettifiedMaxVisits","tooltipRef","el","infoIcon","UncontrolledTooltip","placement","ShortUrlsRow","ShortUrlsRowMenu","copiedToClipboard","setCopiedToClipboard","setActive","isFirstRun","data-th","DropdownBtnMenu","ButtonDropdown","menuIcon","DeleteShortUrlModal","QrCodeModal","isQrModalOpen","toggleQrCode","isDeleteModalOpen","toggleDelete","pieChartIcon","qrIcon","deleteIcon","ShortUrlForm","CreateShortUrlResult","shortUrlCreationResult","basicMode","shortUrlCreationSettings","settings","shortUrlCreation","useMemo","customSlug","shortCodeLength","validSince","validUntil","findIfExists","validateUrl","validateUrls","getInitialState","mode","onSave","canBeClosed","Result","small","ShlinkApiError","fallbackMessage","detail","invalidElements","shortUrlDeletion","inputValue","setInputValue","handleDeleteUrl","catch","identity","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","actionableFieldClasses","orderableColumnsClasses","tableClasses","supportsTitle","colSpan","QrFormatDropdown","setFormat","QrErrorCorrectionDropdown","errorCorrection","setErrorCorrection","imageDownloader","ForServerVersion","setSize","margin","setMargin","capabilities","useSizeInPath","marginIsSupported","errorCorrectionIsSupported","willRenderThreeControls","qrCodeUrl","buildQrCodeUrl","totalSize","modalSize","step","src","alt","Button","block","saveImage","downloadIcon","BooleanControl","checked","inline","uuid","typeClasses","display","htmlFor","Checkbox","InfoModal","UseExistingIfFoundInfoIcon","isModalOpen","toggleModal","InfoTooltip","ShortUrlFormCheckboxGroup","infoTooltip","normalizeTag","replace","toDate","TagsSelector","DomainSelector","shortUrlData","setShortUrlData","isEdit","submit","renderOptionalInput","Input","renderDateInput","basicComponents","bsSize","required","showCustomizeCard","limitAccessCardClasses","showCrawlableControl","crawlable","goBack","shortUrlDetail","getShortUrlDetail","shortUrlEdition","savingError","savingErrorData","savingSucceeded","isSuccessful","isNotSuccessful","faArrowLeft","GET_SHORT_URL_DETAIL_START","GET_SHORT_URL_DETAIL_ERROR","GET_SHORT_URL_DETAIL","find","FormGroupContainer","labelClassName","forId","FormGroup","ServerForm","initialValues","setName","setUrl","setApiKey","handleSubmit","ImportResult","CreateServer","ImportServersBtn","createServer","serversImported","setServersImported","errorImporting","setErrorImporting","NoMenuLayout","serverData","onImport","onImportError","serversExporter","createServerItem","plusIcon","nav","inNavbar","serverIcon","exportServers","exportIcon","DeleteServerModal","deleteServer","showModal","hideModal","EditServer","editServer","importServersFromFile","createServers","fileRef","files","accept","SELECT_SERVER","RESET_SELECTED_SERVER","toSemVer","getServerVersion","memoizeWith","_serverId","serverNotFound","serverNotReachable","EDIT_SERVER","DELETE_SERVER","CREATE_SERVERS","newServers","dissoc","serversListToMap","reduce","acc","responseToServersList","Array","isArray","fetchServers","homepage","remoteList","maxVersion","tagsList","loadVisitsOverview","visitsOverview","loadingTags","loadingVisits","orphanVisitsCount","useHistory","CardTitle","CardText","CardHeader","CardBody","validateServer","validateServers","every","ServersImporter","csvJson","fileReaderFactory","file","reader","resolve","addEventListener","content","toString","toObject","readAsText","ServersExporter","csvjson","toCSV","FileReader","VisitsHeader","ShortUrlVisitsHeader","shortLink","longLink","visitsStatsTitle","DEFAULT","BROWSERS_WHITELIST","extractDomain","split","includes","fillTheGaps","labels","zipObj","ToggleSwitch","pointerOnHover","native","firstElement","renderChartLabel","dataset","formattedValue","label","renderPieChartLabel","STEPS_MAP","monthly","weekly","daily","hourly","STEP_TO_DURATION_MAP","hours","days","weeks","months","STEP_TO_DIFF_FUNC_MAP","differenceInHours","differenceInDays","differenceInWeeks","differenceInMonths","STEP_TO_DATE_FORMAT","firstWeekDay","startOfISOWeek","lastWeekDay","endOfISOWeek","groupVisitsByStep","countBy","generateLabelsAndGroupedVisits","groupedVisitsWithGaps","skipNoElements","diffFunc","newerDate","oldestDate","duration","num","generateLabels","generateDataset","tension","borderColor","selectedLabel","chartElementAtEvent","datasetsByPoint","setSelectedVisits","chart","LineChartCard","highlightedVisits","highlightedLabel","oldestVisitDate","now","cond","always","matcher","determineInitialStep","setStep","skipNoVisits","toggleSkipNoVisits","visitsToDatasetGroups","reverse","groupedVisits","groupedHighlighted","generateChartDatasets","mainDataset","maintainAspectRatio","plugins","legend","tooltip","intersect","axis","callbacks","scales","y","beginAtZero","ticks","precision","x","onHover","renderLineChart","datasets","getElementAtEvent","entries","menuText","SimplePaginator","setCurrentPage","searchVisits","browser","os","referer","country","city","visitedUrl","visitMatchesSearch","VisitsTable","selectedVisits","matchMedia","isOrphanVisits","headerCellsClass","matchMobile","matches","isMobileDevice","setIsMobileDevice","dir","resultSet","allVisits","sortedVisits","sort","b","greaterThan","smallerThan","sortVisits","total","visitsGroups","splitEvery","calculateVisits","isFirstLoad","setPage","end","start","supportsBots","fullSizeColSpan","listener","removeEventListener","flat","checkIcon","botIcon","isSelected","v","potentialBot","OpenStreetMapTile","TileLayer","attribution","calculateMapProps","locations","bounds","zoom","center","latLong","MapModal","contentClassName","MapContainer","cityName","count","Marker","position","Popup","OpenMapModalBtn","modalTitle","activeCities","mapIsOpened","openMap","closeMap","dropdownIsOpened","toggleDropdown","openDropdown","locationsToShow","setLocationsToShow","buttonRef","openMapWithLocations","filtered","mapIcon","isOrphanVisit","groupNewVisitsByType","groupBy","newVisit","regularVisits","highlightedVisitsToStats","property","toApiParams","excludeBots","visitHasProperty","propertyName","optionalNumericToNumber","numeric","parseFloat","updateLocationsStatsForVisit","updateCountriesStatsForVisit","updateCitiesStatsForVisit","processStatsFromVisits","osStats","updateOsStatsForVisit","browsersStats","updateBrowsersStatsForVisit","browsers","referrersStats","updateReferrersStatsForVisit","referrers","countries","cities","citiesForMapStats","latitude","longitude","currentCity","updateCitiesForMapForVisit","citiesForMap","visitedUrlsStats","isNormalizedOrphanVisit","updateVisitedUrlsForVisit","visitedUrls","normalizeVisits","userAgent","visitLocation","common","bowser","parseUserAgent","countryName","VisitsFilterDropdown","botsSupported","orphanVisitsType","propsForOrphanVisitsTypeItem","DoughnutChartLegend","config","defaultColor","borderWidth","DoughnutChart","memo","chartRef","setChartRef","chartData","generateChartData","height","element","ChartCard","footer","CardFooter","DoughnutChartCard","PaginationDropdown","toggleClassName","ranges","Infinity","dropLabelIfHidden","startsWith","highlightedData","HorizontalBarChart","highlightedStats","statsAreDefined","highlightedKey","stacked","indexAxis","determineHeight","renderChartComponent","customKey","toLowerIfString","toLower","pickKeyFromPair","pickValueFromPair","SortableBarChartCard","sortingItems","extraHeaderContent","withPagination","setItemsPerPage","determineCurrentPagePairs","firstPageLength","i","sortedPairs","pairs","sortBy","getSortedPairsForStats","sortedKeys","sortedHighlightedPairs","currentPageStats","fromPairs","currentPageHighlightedStats","highlightedPages","determineStats","sections","byTime","subPath","faCalendarAlt","byContext","faChartPie","byLocation","faMapMarkedAlt","list","faList","VisitsNavLink","RouterNavLink","endsWith","VisitsStats","visitsInfo","getVisits","cancelGetVisits","exportCsv","initialInterval","defaultInterval","setDateRange","setHighlightedVisits","setHighlightedLabel","visitsFilter","setVisitsFilter","buildSectionUrl","loadingLarge","progress","normalizedVisits","mapLocations","highlightVisitsForProp","newSelectedBar","propEq","faFileDownload","Progress","striped","pills","section","amount","exportVisits","cancelGetShortUrlVisits","ITEMS_PER_PAGE","isLastPage","calcProgress","getVisitsWithLoader","visitsLoader","extraFinishActionData","actionMap","shouldCancel","loadVisitsInParallel","flatten","loadPagesBlocks","pagesBlocks","concat","loadVisits","pagesRange","finish","GET_SHORT_URL_VISITS_START","GET_SHORT_URL_VISITS_ERROR","GET_SHORT_URL_VISITS","GET_SHORT_URL_VISITS_LARGE","GET_SHORT_URL_VISITS_CANCEL","GET_SHORT_URL_VISITS_PROGRESS_CHANGED","cancelLoad","newVisits","TagVisitsHeader","tagVisits","cancelGetTagVisits","GET_TAG_VISITS_START","GET_TAG_VISITS_ERROR","GET_TAG_VISITS","GET_TAG_VISITS_LARGE","GET_TAG_VISITS_CANCEL","GET_TAG_VISITS_PROGRESS_CHANGED","OrphanVisitsHeader","cancelGetOrphanVisits","GET_ORPHAN_VISITS_START","GET_ORPHAN_VISITS_ERROR","GET_ORPHAN_VISITS","GET_ORPHAN_VISITS_LARGE","GET_ORPHAN_VISITS_CANCEL","GET_ORPHAN_VISITS_PROGRESS_CHANGED","matchesType","GET_OVERVIEW_START","GET_OVERVIEW_ERROR","GET_OVERVIEW","VisitsExporter","visitsParser","TagBullet","toComponentTag","searchMode","tagFilteringMode","tagComponent","onDelete","suggestions","suggestionComponent","allowNew","addOnBlur","minQueryLength","delimiters","suggestionsTransform","removedTagIndex","tagsCopy","splice","onAddition","newTag","TagCard","DeleteTagConfirmModal","EditTagModal","tagStats","displayed","isEditModalOpen","toggleEdit","hasTitle","displayTitle","titleRef","scrollWidth","clientWidth","encodeURIComponent","faLink","shortUrlsCount","faEye","deleteTag","tagDelete","tagDeleted","deleting","doDelete","tagEdited","tagEdit","newTagName","setNewTagName","setColor","showColorPicker","toggleColorPicker","hideColorPicker","editing","saveTag","onClosed","colorIcon","Popover","disableAlpha","hex","TagsModeDropdown","renderTitle","cardsIcon","TagsCards","TagsTable","filterTags","forceListTags","ui","tagsMode","setMode","filteredTags","DELETE_TAG_START","DELETE_TAG_ERROR","DELETE_TAG","TAG_DELETED","EDIT_TAG_START","EDIT_TAG_ERROR","EDIT_TAG","TAG_EDITED","pick","LIST_TAGS_START","LIST_TAGS_ERROR","LIST_TAGS","FILTER_TAGS","renameTag","rejectTag","tagToReject","calculateVisitsPerTag","increase","displayedTag","setDisplayedTag","tagsCount","tagsGroups","group","TagsTableRow","pageFromQuery","sortedTags","showPaginator","isDropdownOpen","listTagsActionFactory","force","processedStats","factory","GET_MERCURE_INFO_START","GET_MERCURE_INFO_ERROR","GET_MERCURE_INFO","realTimeUpdates","enabled","info","RealTimeUpdates","toggleRealTimeUpdates","setRealTimeUpdatesInterval","SettingsSections","child","subChild","subIndex","Settings","ShortUrlCreation","UserInterface","Visits","SET_SETTINGS","mergeDeepRight","setShortUrlCreationSettings","setUiSettings","setVisitsSettings","tagFilteringModeText","changeTagsFilteringMode","faMoon","faSun","useDarkTheme","DateIntervalSelector","EDIT_DOMAIN_REDIRECTS","redirects","LIST_DOMAINS_START","LIST_DOMAINS_ERROR","LIST_DOMAINS","FILTER_DOMAINS","filteredDomains","replaceRedirectsOnDomain","filterDomains","domainsList","inputDisplayed","showInput","hideInput","valueIsEmpty","unselectDomain","InputGroup","InputGroupAddon","addonType","faUndo","trigger","isDefault","isLast","EditDomainRedirectsModal","baseUrlRedirect","setBaseUrlRedirect","regular404Redirect","setRegular404Redirect","invalidShortUrlRedirect","setInvalidShortUrlRedirect","Nr","fallback","DefaultDomain","defaultDomainIcon","DomainRow","defaultRedirects","authority","domainId","forbiddenIcon","column","APP_UPDATE_AVAILABLE","RESET_APP_UPDATE","appUpdateAvailable","resetAppUpdate","AppUpdateBanner","forceUpdate","isUpdating","setUpdating","Alert","reloadIcon","navigator","serviceWorker","getRegistrations","registrations","registration","waiting","postMessage","App","appUpdated","Bottle","container","mapActionService","actionName","serviceName","lazyService","propsFromState","actionServiceNames","reduxConnect","provideAppServices","provideCommonServices","provideApiServices","provideShortUrlsServices","provideServersServices","provideTagsServices","provideVisitsServices","provideUtilsServices","provideMercureServices","provideSettingsServices","provideDomainsServices","combineReducers","serversReducer","selectedServerReducer","shortUrlsListReducer","shortUrlsListParamsReducer","shortUrlCreationReducer","shortUrlDeletionReducer","shortUrlEditionReducer","shortUrlVisitsReducer","tagVisitsReducer","orphanVisitsReducer","shortUrlDetailReducer","tagsListReducer","tagDeleteReducer","tagEditReducer","mercureInfoReducer","settingsReducer","domainsListReducer","visitsOverviewReducer","appUpdatesReducer","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","localStorageConfig","states","namespace","namespaceSeparator","debounce","store","createStore","reducers","load","applyMiddleware","save","ReduxThunk","isLocalhost","hostname","registerValidSW","swUrl","register","onupdatefound","installingWorker","installing","onstatechange","controller","log","onUpdate","onSuccess","L","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","marker2x","iconUrl","marker","shadowUrl","markerShadow","basename","getElementById","process","origin","fetch","contentType","indexOf","ready","unregister","checkValidServiceWorker","registerServiceWorker","versionToMatch","matchesMinVersion","compare","versionIsValidSemVer","defaultValue"],"mappings":"qJAMO,SAASA,EAA8BC,GAC5C,OAAO,SAACC,GAKN,OAJAC,qBAAU,WACRD,EAAME,wBACL,IAEI,cAACH,EAAD,eAAsBC,O,iCCZjC,oEAAO,IAAMG,EAAU,SAAC,EAAsBC,EAAaC,GAAsB,IAAvDC,EAAsD,EAAtDA,SAClBC,EAAOD,EAASE,cAAc,KAEpCD,EAAKE,aAAa,OAAQL,GAC1BG,EAAKE,aAAa,WAAYJ,GAC9BE,EAAKG,MAAMC,WAAa,SACxBL,EAASM,KAAKC,YAAYN,GAC1BA,EAAKO,QACLR,EAASM,KAAKG,YAAYR,IAGfS,EAAU,SAACC,EAAgBC,EAAab,GACnD,IAAMc,EAAO,IAAIC,KAAK,CAAEF,GAAO,CAAEG,KAAM,4BACjCjB,EAAMkB,IAAIC,gBAAgBJ,GAEhChB,EAAQc,EAAQb,EAAKC,K,kKCRVmB,EAAa,SAAC,GAAD,QAAGC,aAAH,MAAWC,IAAX,EAAuBC,EAAvB,EAAuBA,UAAvB,OACxB,qBAAKA,UAAWA,EAAWC,QAAQ,cAAcC,QAAQ,MAAMC,MAAM,6BAArE,SACE,oBAAGC,KAAMN,EAAT,UACE,sBACEO,EAAE,6lBAEJ,sBACEA,EAAE,uiBAEJ,sBACEA,EAAE,uiBAEJ,sBACEA,EAAE,8X,oHCTH,SAASC,EAA2BlC,EAAmDmC,GAC5F,OAAO,SAAClC,GAAwC,IACtCmC,EAAwCnC,EAAxCmC,aAAc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wB,CAAwB/B,EAAO/X,GAI/B4T,UAAUC,cAAc+F,MAAMvqC,MAAK,WACjCjL,QAAQk0C,IACN,+GAMJR,GAAgBC,EAAO/X,OEpB/B+Z,CAAsB,CACpBxB,SADoB,WAElBlB,GAAMr6B,SAASo2B,U,2CC9BJjmB,IAFU,SAAC,GAAD,IAAG7uB,EAAH,EAAGA,SAAH,OAAkB,qBAAKjB,UAAU,+BAAf,SAA+CiB,M,gCCH1F,6IAiBauO,EAAe,SAACmtC,EAAD,GAAoF,IAAjDhqB,EAAgD,EAAhDA,WAAYjjB,EAAoC,EAApCA,WACzE,IAAKpK,YAASq3C,GACZ,OAAO,EAGT,IAAMC,GAAqBltC,GAAcmtC,kBAAQF,EAAgBjtC,EAAY,MAG7E,QAF2BijB,GAAckqB,kBAAQF,EAAgBhqB,EAAY,QAEjDiqB,GAGxBE,EAAuBrrB,YAAYvI,KAAU,SAAChpB,GAClD,IACE,OAAO28C,kBAAQ38C,EAASA,EAAS,KACjC,MAAOiD,GACP,OAAO,MAIEkH,EAAqB,SAACnK,GAAD,OAAsB48C,EAAqB58C,GAAtB,WAA+CA,GAAdA,GAE3EkK,EAAkB,eAAC2yC,EAAD,uDAAwB,SAAxB,OAC7B,SAAC78C,GAAD,OAA6B48C,EAAqB58C,GAAWA,EAAU68C,M","file":"static/js/main.89526a11.chunk.js","sourcesContent":["import { FC, useEffect } from 'react';\n\ninterface WithoutSelectedServerProps {\n resetSelectedServer: Function;\n}\n\nexport function withoutSelectedServer(WrappedComponent: FC) {\n return (props: WithoutSelectedServerProps & T) => {\n useEffect(() => {\n props.resetSelectedServer();\n }, []);\n\n return ;\n };\n}\n","export const saveUrl = ({ document }: Window, url: string, filename: string) => {\n const link = document.createElement('a');\n\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n};\n\nexport const saveCsv = (window: Window, csv: string, filename: string) => {\n const blob = new Blob([ csv ], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n\n saveUrl(window, url, filename);\n};\n","import { MAIN_COLOR } from '../../utils/theme';\n\nexport interface ShlinkLogoProps {\n color?: string;\n className?: string;\n}\n\nexport const ShlinkLogo = ({ color = MAIN_COLOR, className }: ShlinkLogoProps) => (\n \n \n \n \n \n \n \n \n);\n","import { FC, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport Message from '../../utils/Message';\nimport { isNotFoundServer, SelectedServer } from '../data';\nimport NoMenuLayout from '../../common/NoMenuLayout';\n\ninterface WithSelectedServerProps extends RouteComponentProps<{ serverId: string }> {\n selectServer: (serverId: string) => void;\n selectedServer: SelectedServer;\n}\n\nexport function withSelectedServer(WrappedComponent: FC, ServerError: FC) {\n return (props: WithSelectedServerProps & T) => {\n const { selectServer, selectedServer, match } = props;\n\n useEffect(() => {\n selectServer(match.params.serverId);\n }, [ match.params.serverId ]);\n\n if (!selectedServer) {\n return (\n \n \n \n );\n }\n\n if (isNotFoundServer(selectedServer)) {\n return ;\n }\n\n return ;\n };\n}\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface NotFoundProps {\n to?: string;\n}\n\nconst NotFound: FC = ({ to = '/', children = 'Home' }) => (\n
\n \n

Oops! We could not find requested route.

\n

\n Use your browser's back button to navigate to the page you have previously come from, or just press this\n button.\n

\n
\n {children}\n
\n
\n);\n\nexport default NotFound;\n","import { FC } from 'react';\nimport { ListGroup, ListGroupItem } from 'reactstrap';\nimport { Link } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronRight as chevronIcon } from '@fortawesome/free-solid-svg-icons';\nimport { ServerWithId } from './data';\nimport './ServersListGroup.scss';\n\ninterface ServersListGroupProps {\n servers: ServerWithId[];\n embedded?: boolean;\n}\n\nconst ServerListItem = ({ id, name }: { id: string; name: string }) => (\n \n {name}\n \n \n);\n\nconst ServersListGroup: FC = ({ servers, children, embedded = false }) => (\n <>\n {children &&
{children}
}\n {servers.length > 0 && (\n \n {servers.map(({ id, name }) => )}\n \n )}\n \n);\n\nexport default ServersListGroup;\n","import { useState, useRef } from 'react';\nimport { useSwipeable as useReactSwipeable } from 'react-swipeable';\nimport { parseQuery, stringifyQuery } from './query';\n\nconst DEFAULT_DELAY = 2000;\n\nexport type StateFlagTimeout = (initialValue?: boolean, delay?: number) => [ boolean, () => void ];\n\nexport const useStateFlagTimeout = (\n setTimeout: (callback: Function, timeout: number) => number,\n clearTimeout: (timer: number) => void,\n): StateFlagTimeout => (initialValue = false, delay = DEFAULT_DELAY) => {\n const [ flag, setFlag ] = useState(initialValue);\n const timeout = useRef(undefined);\n const callback = () => {\n setFlag(!initialValue);\n\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => setFlag(initialValue), delay);\n };\n\n return [ flag, callback ];\n};\n\ntype ToggleResult = [ boolean, () => void, () => void, () => void ];\n\nexport const useToggle = (initialValue = false): ToggleResult => {\n const [ flag, setFlag ] = useState(initialValue);\n\n return [ flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false) ];\n};\n\nexport const useSwipeable = (showSidebar: () => void, hideSidebar: () => void) => {\n const swipeMenuIfNoModalExists = (callback: () => void) => (e: any) => {\n const swippedOnVisitsTable = (e.event.composedPath() as HTMLElement[]).some( // eslint-disable-line @typescript-eslint/no-unsafe-call\n ({ classList }) => classList?.contains('visits-table'),\n );\n\n if (swippedOnVisitsTable || document.querySelector('.modal')) {\n return;\n }\n\n callback();\n };\n\n return useReactSwipeable({\n delta: 40,\n onSwipedLeft: swipeMenuIfNoModalExists(hideSidebar),\n onSwipedRight: swipeMenuIfNoModalExists(showSidebar),\n });\n};\n\nexport const useQueryState = (paramName: string, initialState: T): [ T, (newValue: T) => void ] => {\n const [ value, setValue ] = useState(initialState);\n const setValueWithLocation = (value: T) => {\n const { location, history } = window;\n const query = parseQuery(location.search);\n\n query[paramName] = value;\n history.pushState(null, '', `${location.pathname}?${stringifyQuery(query)}`);\n setValue(value);\n };\n\n return [ value, setValueWithLocation ];\n};\n","import { isEmpty, isNil, pipe, range } from 'ramda';\nimport { SyntheticEvent } from 'react';\n\nexport type OrderDir = 'ASC' | 'DESC' | undefined;\n\nexport const determineOrderDir = (\n currentField: T,\n newField?: T,\n currentOrderDir?: OrderDir,\n): OrderDir => {\n if (currentField !== newField) {\n return 'ASC';\n }\n\n const newOrderMap: Record<'ASC' | 'DESC', OrderDir> = {\n ASC: 'DESC',\n DESC: undefined,\n };\n\n return currentOrderDir ? newOrderMap[currentOrderDir] : 'ASC';\n};\n\nexport const rangeOf = (size: number, mappingFn: (value: number) => T, startAt = 1): T[] =>\n range(startAt, size + 1).map(mappingFn);\n\nexport type Empty = null | undefined | '' | never[];\n\nexport const hasValue = (value: T | Empty): value is T => !isNil(value) && !isEmpty(value);\n\nexport const handleEventPreventingDefault = (handler: () => T) => pipe(\n (e: SyntheticEvent) => e.preventDefault(),\n handler,\n);\n\nexport type Nullable = {\n [P in keyof T]: T[P] | null\n};\n\ntype Optional = T | null | undefined;\n\nexport type OptionalString = Optional;\n\nexport type RecursivePartial = {\n [P in keyof T]?: RecursivePartial;\n};\n\nexport const nonEmptyValueOrNull = (value: T): T | null => isEmpty(value) ? null : value;\n\nexport const capitalize = (value: T): string => `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n","import { SemVer } from '../../utils/helpers/version';\n\nexport interface ServerData {\n name: string;\n url: string;\n apiKey: string;\n}\n\nexport interface ServerWithId extends ServerData {\n id: string;\n}\n\nexport interface ReachableServer extends ServerWithId {\n version: SemVer;\n printableVersion: string;\n}\n\nexport interface NonReachableServer extends ServerWithId {\n serverNotReachable: true;\n}\n\nexport interface NotFoundServer {\n serverNotFound: true;\n}\n\nexport type RegularServer = ReachableServer | NonReachableServer;\n\nexport type SelectedServer = RegularServer | NotFoundServer | null;\n\nexport type ServersMap = Record;\n\nexport const hasServerData = (server: SelectedServer | ServerData): server is ServerData =>\n !!(server as ServerData)?.url && !!(server as ServerData)?.apiKey;\n\nexport const isServerWithId = (server: SelectedServer | ServerWithId): server is ServerWithId =>\n !!server?.hasOwnProperty('id');\n\nexport const isReachableServer = (server: SelectedServer): server is ReachableServer =>\n !!server?.hasOwnProperty('version');\n\nexport const isNotFoundServer = (server: SelectedServer): server is NotFoundServer =>\n !!server?.hasOwnProperty('serverNotFound');\n\nexport const getServerId = (server: SelectedServer) => isServerWithId(server) ? server.id : '';\n","import axios from 'axios';\nimport Bottle, { Decorator } from 'bottlejs';\nimport ScrollToTop from '../ScrollToTop';\nimport MainHeader from '../MainHeader';\nimport Home from '../Home';\nimport MenuLayout from '../MenuLayout';\nimport AsideMenu from '../AsideMenu';\nimport ErrorHandler from '../ErrorHandler';\nimport ShlinkVersionsContainer from '../ShlinkVersionsContainer';\nimport { ConnectDecorator } from '../../container/types';\nimport { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServer';\nimport { ImageDownloader } from './ImageDownloader';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {\n // Services\n bottle.constant('window', (global as any).window);\n bottle.constant('console', global.console);\n bottle.constant('axios', axios);\n\n bottle.service('ImageDownloader', ImageDownloader, 'axios', 'window');\n\n // Components\n bottle.serviceFactory('ScrollToTop', ScrollToTop);\n bottle.decorator('ScrollToTop', withRouter);\n\n bottle.serviceFactory('MainHeader', MainHeader, 'ServersDropdown');\n bottle.decorator('MainHeader', withRouter);\n\n bottle.serviceFactory('Home', () => Home);\n bottle.decorator('Home', withoutSelectedServer);\n bottle.decorator('Home', connect([ 'servers' ], [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory(\n 'MenuLayout',\n MenuLayout,\n 'TagsList',\n 'ShortUrls',\n 'AsideMenu',\n 'CreateShortUrl',\n 'ShortUrlVisits',\n 'TagVisits',\n 'OrphanVisits',\n 'ServerError',\n 'Overview',\n 'EditShortUrl',\n 'ManageDomains',\n );\n bottle.decorator('MenuLayout', connect([ 'selectedServer', 'shortUrlsListParams' ], [ 'selectServer' ]));\n bottle.decorator('MenuLayout', withRouter);\n\n bottle.serviceFactory('AsideMenu', AsideMenu, 'DeleteServerButton');\n\n bottle.serviceFactory('ShlinkVersionsContainer', () => ShlinkVersionsContainer);\n bottle.decorator('ShlinkVersionsContainer', connect([ 'selectedServer' ]));\n\n bottle.serviceFactory('ErrorHandler', ErrorHandler, 'window', 'console');\n};\n\nexport default provideServices;\n","import { PropsWithChildren, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\n\nconst ScrollToTop = () => ({ location, children }: PropsWithChildren) => {\n useEffect(() => {\n scrollTo(0, 0);\n }, [ location ]);\n\n return <>{children};\n};\n\nexport default ScrollToTop;\n","import { Component, ReactNode } from 'react';\nimport { Button } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface ErrorHandlerState {\n hasError: boolean;\n}\n\nconst ErrorHandler = (\n { location }: Window,\n { error }: Console,\n) => class ErrorHandler extends Component {\n public constructor(props: object) {\n super(props);\n this.state = { hasError: false };\n }\n\n public static getDerivedStateFromError(): ErrorHandlerState {\n return { hasError: true };\n }\n\n public componentDidCatch(e: Error): void {\n if (process.env.NODE_ENV !== 'development') {\n error(e);\n }\n }\n\n public render(): ReactNode {\n if (this.state.hasError) {\n return (\n
\n \n

Oops! This is awkward :S

\n

It seems that something went wrong. Try refreshing the page or just click this button.

\n
\n \n
\n
\n );\n }\n\n return this.props.children;\n }\n};\n\nexport default ErrorHandler;\n","import { AxiosInstance } from 'axios';\nimport { saveUrl } from '../../utils/helpers/files';\n\nexport class ImageDownloader {\n public constructor(private readonly axios: AxiosInstance, private readonly window: Window) {}\n\n public async saveImage(imgUrl: string, filename: string): Promise {\n const { data } = await this.axios.get(imgUrl, { responseType: 'blob' });\n const url = URL.createObjectURL(data);\n\n saveUrl(this.window, url, filename);\n }\n}\n","import Bottle from 'bottlejs';\nimport { useStateFlagTimeout } from '../helpers/hooks';\nimport LocalStorage from './LocalStorage';\nimport ColorGenerator from './ColorGenerator';\n\nconst provideServices = (bottle: Bottle) => {\n bottle.constant('localStorage', (global as any).localStorage);\n bottle.service('Storage', LocalStorage, 'localStorage');\n bottle.service('ColorGenerator', ColorGenerator, 'Storage');\n\n bottle.constant('setTimeout', global.setTimeout);\n bottle.constant('clearTimeout', global.clearTimeout);\n bottle.serviceFactory('useStateFlagTimeout', useStateFlagTimeout, 'setTimeout', 'clearTimeout');\n};\n\nexport default provideServices;\n","const PREFIX = 'shlink';\nconst buildPath = (path: string) => `${PREFIX}.${path}`;\n\nexport default class LocalStorage {\n public constructor(private readonly localStorage: Storage) {}\n\n public readonly get = (key: string): T | undefined => {\n const item = this.localStorage.getItem(buildPath(key));\n\n return item ? JSON.parse(item) as T : undefined;\n };\n\n public readonly set = (key: string, value: any) => this.localStorage.setItem(buildPath(key), JSON.stringify(value));\n}\n","import { rangeOf } from '../utils';\nimport LocalStorage from './LocalStorage';\n\nconst HEX_COLOR_LENGTH = 6;\nconst { floor, random } = Math;\nconst letters = '0123456789ABCDEF';\nconst buildRandomColor = () => `#${rangeOf(HEX_COLOR_LENGTH, () => letters[floor(random() * letters.length)]).join('')}`;\nconst normalizeKey = (key: string) => key.toLowerCase().trim();\n\nexport default class ColorGenerator {\n private readonly colors: Record;\n\n public constructor(private readonly storage: LocalStorage) {\n this.colors = this.storage.get>('colors') ?? {};\n }\n\n public readonly getColorForKey = (key: string) => {\n const normalizedKey = normalizeKey(key);\n const color = this.colors[normalizedKey];\n\n // If a color has not been set yet, generate a random one and save it\n if (!color) {\n return this.setColorForKey(normalizedKey, buildRandomColor());\n }\n\n return color;\n };\n\n public readonly setColorForKey = (key: string, color: string) => {\n const normalizedKey = normalizeKey(key);\n\n this.colors[normalizedKey] = color;\n this.storage.set('colors', this.colors);\n\n return color;\n };\n}\n","import { pipe } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport { versionToPrintable, versionToSemVer } from '../utils/helpers/version';\nimport { isReachableServer } from '../servers/data';\nimport { ShlinkVersionsContainerProps } from './ShlinkVersionsContainer';\n\nconst SHLINK_WEB_CLIENT_VERSION = '%_VERSION_%';\nconst normalizeVersion = pipe(versionToSemVer(), versionToPrintable);\n\nexport interface ShlinkVersionsProps extends ShlinkVersionsContainerProps {\n clientVersion?: string;\n}\n\nconst VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => (\n \n {version}\n \n);\n\nconst ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIENT_VERSION }: ShlinkVersionsProps) => {\n const normalizedClientVersion = normalizeVersion(clientVersion);\n\n return (\n \n {isReachableServer(selectedServer) &&\n <>Server: - \n }\n Client: \n \n );\n};\n\nexport default ShlinkVersions;\n","import classNames from 'classnames';\nimport { isReachableServer, SelectedServer } from '../servers/data';\nimport ShlinkVersions from './ShlinkVersions';\nimport './ShlinkVersionsContainer.scss';\n\nexport interface ShlinkVersionsContainerProps {\n selectedServer: SelectedServer;\n}\n\nconst ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => {\n const classes = classNames('text-center', {\n 'shlink-versions-container--with-server': isReachableServer(selectedServer),\n });\n\n return (\n
\n \n
\n );\n};\n\nexport default ShlinkVersionsContainer;\n","import { faChevronDown as arrowIcon, faCogs as cogsIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC, useEffect } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';\nimport classNames from 'classnames';\nimport { RouteComponentProps } from 'react-router';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { ShlinkLogo } from './img/ShlinkLogo';\nimport './MainHeader.scss';\n\nconst MainHeader = (ServersDropdown: FC) => ({ location }: RouteComponentProps) => {\n const [ isOpen, toggleOpen, , close ] = useToggle();\n const { pathname } = location;\n\n useEffect(close, [ location ]);\n\n const settingsPath = '/settings';\n const toggleClass = classNames('main-header__toggle-icon', { 'main-header__toggle-icon--opened': isOpen });\n\n return (\n \n \n Shlink\n \n\n \n \n \n\n \n \n \n \n );\n};\n\nexport default MainHeader;\n","import { isEmpty, values } from 'ramda';\nimport { Link } from 'react-router-dom';\nimport { Card, Row } from 'reactstrap';\nimport { ExternalLink } from 'react-external-link';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faExternalLinkAlt, faPlus } from '@fortawesome/free-solid-svg-icons';\nimport ServersListGroup from '../servers/ServersListGroup';\nimport { ServersMap } from '../servers/data';\nimport { ShlinkLogo } from './img/ShlinkLogo';\nimport './Home.scss';\n\nexport interface HomeProps {\n servers: ServersMap;\n}\n\nconst Home = ({ servers }: HomeProps) => {\n const serversList = values(servers);\n const hasServers = !isEmpty(serversList);\n\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n
\n

Welcome!

\n
\n \n {!hasServers && (\n
\n

This application will help you manage your Shlink servers.

\n

\n \n Add a server\n \n

\n

\n \n \n Learn more about Shlink \n \n \n

\n
\n )}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Home;\n","import { FC, useEffect } from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport { faBars as burgerIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport classNames from 'classnames';\nimport { withSelectedServer } from '../servers/helpers/withSelectedServer';\nimport { useSwipeable, useToggle } from '../utils/helpers/hooks';\nimport { supportsDomainRedirects, supportsOrphanVisits } from '../utils/helpers/features';\nimport { isReachableServer } from '../servers/data';\nimport NotFound from './NotFound';\nimport { AsideMenuProps } from './AsideMenu';\nimport './MenuLayout.scss';\n\nconst MenuLayout = (\n TagsList: FC,\n ShortUrls: FC,\n AsideMenu: FC,\n CreateShortUrl: FC,\n ShortUrlVisits: FC,\n TagVisits: FC,\n OrphanVisits: FC,\n ServerError: FC,\n Overview: FC,\n EditShortUrl: FC,\n ManageDomains: FC,\n) => withSelectedServer(({ location, selectedServer }) => {\n const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle();\n\n useEffect(() => hideSidebar(), [ location ]);\n\n if (!isReachableServer(selectedServer)) {\n return ;\n }\n\n const addOrphanVisitsRoute = supportsOrphanVisits(selectedServer);\n const addManageDomainsRoute = supportsDomainRedirects(selectedServer);\n const burgerClasses = classNames('menu-layout__burger-icon', { 'menu-layout__burger-icon--active': sidebarVisible });\n const swipeableProps = useSwipeable(showSidebar, hideSidebar);\n\n return (\n <>\n \n\n
\n
\n \n
hideSidebar()}>\n
\n \n \n \n \n \n \n \n \n {addOrphanVisitsRoute && }\n \n {addManageDomainsRoute && }\n List short URLs}\n />\n \n
\n
\n
\n
\n \n );\n}, ServerError);\n\nexport default MenuLayout;\n","import {\n faList as listIcon,\n faLink as createIcon,\n faTags as tagsIcon,\n faPen as editIcon,\n faHome as overviewIcon,\n faGlobe as domainsIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC } from 'react';\nimport { NavLink, NavLinkProps } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { Location } from 'history';\nimport { DeleteServerButtonProps } from '../servers/DeleteServerButton';\nimport { isServerWithId, SelectedServer } from '../servers/data';\nimport { supportsDomainRedirects } from '../utils/helpers/features';\nimport './AsideMenu.scss';\n\nexport interface AsideMenuProps {\n selectedServer: SelectedServer;\n className?: string;\n showOnMobile?: boolean;\n}\n\ninterface AsideMenuItemProps extends NavLinkProps {\n to: string;\n}\n\nconst AsideMenuItem: FC = ({ children, to, className, ...rest }) => (\n \n {children}\n \n);\n\nconst AsideMenu = (DeleteServerButton: FC) => (\n { selectedServer, showOnMobile = false }: AsideMenuProps,\n) => {\n const serverId = isServerWithId(selectedServer) ? selectedServer.id : '';\n const addManageDomainsLink = supportsDomainRedirects(selectedServer);\n const asideClass = classNames('aside-menu', {\n 'aside-menu--hidden': !showOnMobile,\n });\n const shortUrlsIsActive = (_: null, location: Location) => location.pathname.match('/list-short-urls') !== null;\n const buildPath = (suffix: string) => `/server/${serverId}${suffix}`;\n\n return (\n \n );\n};\n\nexport default AsideMenu;\n","import { CardProps } from 'reactstrap/lib/Card';\nimport { Card, CardBody, CardHeader } from 'reactstrap';\nimport { ReactNode } from 'react';\n\ninterface SimpleCardProps extends Omit {\n title?: ReactNode;\n bodyClassName?: string;\n}\n\nexport const SimpleCard = ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => (\n \n {title && {title}}\n {children}\n \n);\n","import { isReachableServer, SelectedServer } from '../../servers/data';\nimport { versionMatch, Versions } from './version';\n\nconst serverMatchesVersions = (versions: Versions) => (selectedServer: SelectedServer): boolean =>\n isReachableServer(selectedServer) && versionMatch(selectedServer.version, versions);\n\nexport const supportsQrCodeSizeInQuery = serverMatchesVersions({ minVersion: '2.5.0' });\n\nexport const supportsShortUrlTitle = serverMatchesVersions({ minVersion: '2.6.0' });\n\nexport const supportsOrphanVisits = supportsShortUrlTitle;\n\nexport const supportsQrCodeMargin = supportsShortUrlTitle;\n\nexport const supportsTagsInPatch = supportsShortUrlTitle;\n\nexport const supportsBotVisits = serverMatchesVersions({ minVersion: '2.7.0' });\n\nexport const supportsCrawlableVisits = supportsBotVisits;\n\nexport const supportsQrErrorCorrection = serverMatchesVersions({ minVersion: '2.8.0' });\n\nexport const supportsDomainRedirects = supportsQrErrorCorrection;\n","export const MAIN_COLOR = '#4696e5';\n\nexport const MAIN_COLOR_ALPHA = 'rgba(70, 150, 229, 0.4)';\n\nexport const HIGHLIGHTED_COLOR = '#f77f28';\n\nexport const HIGHLIGHTED_COLOR_ALPHA = 'rgba(247, 127, 40, 0.4)';\n\nexport const PRIMARY_LIGHT_COLOR = 'white';\n\nexport const PRIMARY_DARK_COLOR = '#161b22';\n\nexport type Theme = 'dark' | 'light';\n\nexport const changeThemeInMarkup = (theme: Theme) => {\n const html = document.getElementsByTagName('html');\n\n html?.[0]?.setAttribute('data-theme', theme);\n};\n\nexport const isDarkThemeEnabled = (): boolean => {\n const html = document.getElementsByTagName('html');\n\n return html?.[0]?.getAttribute('data-theme') === 'dark';\n};\n","import qs from 'qs';\n\nexport const parseQuery = (search: string) => qs.parse(search, { ignoreQueryPrefix: true }) as unknown as T;\n\nexport const stringifyQuery = (query: any): string => qs.stringify(query, { arrayFormat: 'brackets' });\n","import { FC } from 'react';\nimport { Card, Row } from 'reactstrap';\nimport classNames from 'classnames';\nimport { faCircleNotch as preloader } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\n\ntype MessageType = 'default' | 'error';\n\nconst getClassForType = (type: MessageType) => {\n const map: Record = {\n error: 'border-danger',\n default: '',\n };\n\n return map[type];\n};\nconst getTextClassForType = (type: MessageType) => {\n const map: Record = {\n error: 'text-danger',\n default: 'text-muted',\n };\n\n return map[type];\n};\n\nexport interface MessageProps {\n className?: string;\n loading?: boolean;\n fullWidth?: boolean;\n type?: MessageType;\n}\n\nconst Message: FC = ({ className, children, loading = false, type = 'default', fullWidth = false }) => {\n const classes = classNames({\n 'col-md-12': fullWidth,\n 'col-md-10 offset-md-1': !fullWidth,\n });\n\n return (\n \n
\n \n

\n {loading && }\n {loading && {children ?? 'Loading...'}}\n {!loading && children}\n

\n
\n
\n
\n );\n};\n\nexport default Message;\n","import { useState } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSearch as searchIcon } from '@fortawesome/free-solid-svg-icons';\nimport classNames from 'classnames';\nimport './SearchField.scss';\n\nconst DEFAULT_SEARCH_INTERVAL = 500;\nlet timer: NodeJS.Timeout | null;\n\ninterface SearchFieldProps {\n onChange: (value: string) => void;\n className?: string;\n large?: boolean;\n noBorder?: boolean;\n}\n\nconst SearchField = ({ onChange, className, large = true, noBorder = false }: SearchFieldProps) => {\n const [ searchTerm, setSearchTerm ] = useState('');\n\n const resetTimer = () => {\n timer && clearTimeout(timer);\n timer = null;\n };\n const searchTermChanged = (newSearchTerm: string, timeout = DEFAULT_SEARCH_INTERVAL) => {\n setSearchTerm(newSearchTerm);\n\n resetTimer();\n\n timer = setTimeout(() => {\n onChange(newSearchTerm);\n resetTimer();\n }, timeout);\n };\n\n return (\n
\n searchTermChanged(e.target.value)}\n />\n \n
\n \n );\n};\n\nexport default SearchField;\n","import { isEmpty, isNil, reject } from 'ramda';\nimport { AxiosInstance, AxiosResponse, Method } from 'axios';\nimport { ShortUrlsListParams } from '../../short-urls/reducers/shortUrlsListParams';\nimport { ShortUrl, ShortUrlData } from '../../short-urls/data';\nimport { OptionalString } from '../../utils/utils';\nimport {\n ShlinkHealth,\n ShlinkMercureInfo,\n ShlinkShortUrlsResponse,\n ShlinkTags,\n ShlinkTagsResponse,\n ShlinkVisits,\n ShlinkVisitsParams,\n ShlinkShortUrlData,\n ShlinkDomain,\n ShlinkDomainsResponse,\n ShlinkVisitsOverview,\n ShlinkEditDomainRedirects,\n ShlinkDomainRedirects,\n} from '../types';\nimport { stringifyQuery } from '../../utils/helpers/query';\n\nconst buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';\nconst rejectNilProps = reject(isNil);\n\nexport default class ShlinkApiClient {\n private apiVersion: number;\n\n public constructor(\n private readonly axios: AxiosInstance,\n private readonly baseUrl: string,\n private readonly apiKey: string,\n ) {\n this.apiVersion = 2;\n }\n\n public readonly listShortUrls = async (params: ShortUrlsListParams = {}): Promise =>\n this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', params)\n .then(({ data }) => data.shortUrls);\n\n public readonly createShortUrl = async (options: ShortUrlData): Promise => {\n const filteredOptions = reject((value) => isEmpty(value) || isNil(value), options as any);\n\n return this.performRequest('/short-urls', 'POST', {}, filteredOptions)\n .then((resp) => resp.data);\n };\n\n public readonly getShortUrlVisits = async (shortCode: string, query?: ShlinkVisitsParams): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>(`/short-urls/${shortCode}/visits`, 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getTagVisits = async (tag: string, query?: Omit): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>(`/tags/${tag}/visits`, 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getOrphanVisits = async (query?: Omit): Promise =>\n this.performRequest<{ visits: ShlinkVisits }>('/visits/orphan', 'GET', query)\n .then(({ data }) => data.visits);\n\n public readonly getVisitsOverview = async (): Promise =>\n this.performRequest<{ visits: ShlinkVisitsOverview }>('/visits', 'GET')\n .then(({ data }) => data.visits);\n\n public readonly getShortUrl = async (shortCode: string, domain?: OptionalString): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'GET', { domain })\n .then(({ data }) => data);\n\n public readonly deleteShortUrl = async (shortCode: string, domain?: OptionalString): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'DELETE', { domain })\n .then(() => {});\n\n /* @deprecated. If using Shlink 2.6.0 or greater, use updateShortUrl instead */\n public readonly updateShortUrlTags = async (\n shortCode: string,\n domain: OptionalString,\n tags: string[],\n ): Promise =>\n this.performRequest<{ tags: string[] }>(`/short-urls/${shortCode}/tags`, 'PUT', { domain }, { tags })\n .then(({ data }) => data.tags);\n\n public readonly updateShortUrl = async (\n shortCode: string,\n domain: OptionalString,\n data: ShlinkShortUrlData,\n ): Promise =>\n this.performRequest(`/short-urls/${shortCode}`, 'PATCH', { domain }, data)\n .then(({ data }) => data);\n\n public readonly listTags = async (): Promise =>\n this.performRequest<{ tags: ShlinkTagsResponse }>('/tags', 'GET', { withStats: 'true' })\n .then((resp) => resp.data.tags)\n .then(({ data, stats }) => ({ tags: data, stats }));\n\n public readonly deleteTags = async (tags: string[]): Promise<{ tags: string[] }> =>\n this.performRequest('/tags', 'DELETE', { tags })\n .then(() => ({ tags }));\n\n public readonly editTag = async (oldName: string, newName: string): Promise<{ oldName: string; newName: string }> =>\n this.performRequest('/tags', 'PUT', {}, { oldName, newName })\n .then(() => ({ oldName, newName }));\n\n public readonly health = async (): Promise =>\n this.performRequest('/health', 'GET')\n .then((resp) => resp.data);\n\n public readonly mercureInfo = async (): Promise =>\n this.performRequest('/mercure-info', 'GET')\n .then((resp) => resp.data);\n\n public readonly listDomains = async (): Promise =>\n this.performRequest<{ domains: ShlinkDomainsResponse }>('/domains', 'GET').then(({ data }) => data.domains.data);\n\n public readonly editDomainRedirects = async (\n domainRedirects: ShlinkEditDomainRedirects,\n ): Promise =>\n this.performRequest('/domains/redirects', 'PATCH', {}, domainRedirects).then(({ data }) => data);\n\n private readonly performRequest = async (url: string, method: Method = 'GET', query = {}, body = {}): Promise> => {\n try {\n return await this.axios({\n method,\n url: `${buildShlinkBaseUrl(this.baseUrl, this.apiVersion)}${url}`,\n headers: { 'X-Api-Key': this.apiKey },\n params: rejectNilProps(query),\n data: body,\n paramsSerializer: stringifyQuery,\n });\n } catch (e) {\n const { response } = e;\n\n // Due to a bug on all previous Shlink versions, requests to non-matching URLs will always result on a CORS error\n // when performed from the browser (due to the preflight request not returning a 2xx status.\n // See https://github.com/shlinkio/shlink/issues/614), which will make the \"response\" prop not to be set here.\n // The bug will be fixed on upcoming Shlink patches, but for other versions, we can consider this situation as\n // if a request has been performed to a not supported API version.\n const apiVersionIsNotSupported = !response;\n\n // When the request is not invalid or we have already tried both API versions, throw the error and let the\n // caller handle it\n if (!apiVersionIsNotSupported || this.apiVersion === 2) {\n throw e;\n }\n\n this.apiVersion = this.apiVersion - 1;\n\n return await this.performRequest(url, method, query, body);\n }\n };\n}\n","import { AxiosInstance } from 'axios';\nimport { prop } from 'ramda';\nimport { hasServerData, SelectedServer, ServerWithId } from '../../servers/data';\nimport { GetState } from '../../container/types';\nimport ShlinkApiClient from './ShlinkApiClient';\n\nconst apiClients: Record = {};\n\nconst isGetState = (getStateOrSelectedServer: GetState | ServerWithId): getStateOrSelectedServer is GetState =>\n typeof getStateOrSelectedServer === 'function';\nconst getSelectedServerFromState = (getState: GetState): SelectedServer => prop('selectedServer', getState());\n\nexport type ShlinkApiClientBuilder = (getStateOrSelectedServer: GetState | ServerWithId) => ShlinkApiClient;\n\nconst buildShlinkApiClient = (axios: AxiosInstance): ShlinkApiClientBuilder => (\n getStateOrSelectedServer: GetState | ServerWithId,\n) => {\n const server = isGetState(getStateOrSelectedServer)\n ? getSelectedServerFromState(getStateOrSelectedServer)\n : getStateOrSelectedServer;\n\n if (!hasServerData(server)) {\n throw new Error('There\\'s no selected server or it is not found');\n }\n\n const { url, apiKey } = server;\n const clientKey = `${url}_${apiKey}`;\n\n if (!apiClients[clientKey]) {\n apiClients[clientKey] = new ShlinkApiClient(axios, url, apiKey);\n }\n\n return apiClients[clientKey];\n};\n\nexport default buildShlinkApiClient;\n","import Bottle from 'bottlejs';\nimport buildShlinkApiClient from './ShlinkApiClientBuilder';\n\nconst provideServices = (bottle: Bottle) => {\n bottle.serviceFactory('buildShlinkApiClient', buildShlinkApiClient, 'axios');\n};\n\nexport default provideServices;\n","import { FC, useEffect, useState } from 'react';\nimport { ShortUrlsListProps } from './ShortUrlsList';\n\nconst ShortUrls = (SearchBar: FC, ShortUrlsList: FC) => (props: ShortUrlsListProps) => {\n const { match } = props;\n const { page = '1', serverId = '' } = match?.params ?? {};\n const [ urlsListKey, setUrlsListKey ] = useState(`${serverId}_${page}`);\n\n // Using a key on a component makes react to create a new instance every time the key changes\n // Without it, pagination on the URL will not make the component to be refreshed\n useEffect(() => {\n setUrlsListKey(`${serverId}_${page}`);\n }, [ serverId, page ]);\n\n return (\n <>\n
\n \n \n );\n};\n\nexport default ShortUrls;\n","import { FC, MouseEventHandler } from 'react';\nimport ColorGenerator from '../../utils/services/ColorGenerator';\nimport './Tag.scss';\n\ninterface TagProps {\n colorGenerator: ColorGenerator;\n text: string;\n className?: string;\n clearable?: boolean;\n onClick?: MouseEventHandler;\n onClose?: MouseEventHandler;\n}\n\nconst Tag: FC = ({ text, children, clearable, className = '', colorGenerator, onClick, onClose }) => (\n \n {children ?? text}\n {clearable && ×}\n \n);\n\nexport default Tag;\n","import { FC } from 'react';\nimport { Dropdown, DropdownMenu, DropdownToggle } from 'reactstrap';\nimport { useToggle } from './helpers/hooks';\nimport './DropdownBtn.scss';\n\nexport interface DropdownBtnProps {\n text: string;\n disabled?: boolean;\n className?: string;\n dropdownClassName?: string;\n right?: boolean;\n minWidth?: number;\n}\n\nexport const DropdownBtn: FC = (\n { text, disabled = false, className = '', children, dropdownClassName, right = false, minWidth },\n) => {\n const [ isOpen, toggle ] = useToggle();\n const toggleClasses = `dropdown-btn__toggle btn-block ${className}`;\n const style = { minWidth: minWidth && `${minWidth}px` };\n\n return (\n \n {text}\n {children}\n \n );\n};\n","import { format, formatISO, parse } from 'date-fns';\nimport { OptionalString } from '../utils';\n\ntype DateOrString = Date | string;\ntype NullableDate = DateOrString | null;\n\nexport const isDateObject = (date: DateOrString): date is Date => typeof date !== 'string';\n\nconst formatDateFromFormat = (date?: NullableDate, theFormat?: string): OptionalString => {\n if (!date || !isDateObject(date)) {\n return date;\n }\n\n return theFormat ? format(date, theFormat) : formatISO(date);\n};\n\nexport const formatDate = (format = 'yyyy-MM-dd') => (date?: NullableDate) => formatDateFromFormat(date, format);\n\nexport const formatIsoDate = (date?: NullableDate) => formatDateFromFormat(date, undefined);\n\nexport const formatInternational = formatDate();\n\nexport const parseDate = (date: string, format: string) => parse(date, format, new Date());\n","import { subDays, startOfDay, endOfDay } from 'date-fns';\nimport { filter, isEmpty } from 'ramda';\nimport { formatInternational } from '../../helpers/date';\n\nexport interface DateRange {\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport type DateInterval = 'today' | 'yesterday' | 'last7Days' | 'last30Days' | 'last90Days' | 'last180days' | 'last365Days';\n\nexport const dateRangeIsEmpty = (dateRange?: DateRange): boolean => dateRange === undefined\n || isEmpty(filter(Boolean, dateRange as any));\n\nexport const rangeIsInterval = (range?: DateRange | DateInterval): range is DateInterval => typeof range === 'string';\n\nconst INTERVAL_TO_STRING_MAP: Record = {\n today: 'Today',\n yesterday: 'Yesterday',\n last7Days: 'Last 7 days',\n last30Days: 'Last 30 days',\n last90Days: 'Last 90 days',\n last180days: 'Last 180 days',\n last365Days: 'Last 365 days',\n};\n\nexport const DATE_INTERVALS: DateInterval[] = Object.keys(INTERVAL_TO_STRING_MAP) as DateInterval[];\n\nconst dateRangeToString = (range?: DateRange): string | undefined => {\n if (!range || dateRangeIsEmpty(range)) {\n return undefined;\n }\n\n if (range.startDate && !range.endDate) {\n return `Since ${formatInternational(range.startDate)}`;\n }\n\n if (!range.startDate && range.endDate) {\n return `Until ${formatInternational(range.endDate)}`;\n }\n\n return `${formatInternational(range.startDate)} - ${formatInternational(range.endDate)}`;\n};\n\nexport const rangeOrIntervalToString = (range?: DateRange | DateInterval): string | undefined => {\n if (!range) {\n return undefined;\n }\n\n if (!rangeIsInterval(range)) {\n return dateRangeToString(range);\n }\n\n return INTERVAL_TO_STRING_MAP[range];\n};\n\nconst startOfDaysAgo = (daysAgo: number) => startOfDay(subDays(new Date(), daysAgo));\nconst endingToday = (startDate: Date): DateRange => ({ startDate, endDate: endOfDay(new Date()) });\n\nexport const intervalToDateRange = (dateInterval?: DateInterval): DateRange => {\n if (!dateInterval) {\n return {};\n }\n\n switch (dateInterval) {\n case 'today':\n return endingToday(startOfDay(new Date()));\n case 'yesterday':\n return { startDate: startOfDaysAgo(1), endDate: endOfDay(subDays(new Date(), 1)) };\n case 'last7Days':\n return endingToday(startOfDaysAgo(7));\n case 'last30Days':\n return endingToday(startOfDaysAgo(30));\n case 'last90Days':\n return endingToday(startOfDaysAgo(90));\n case 'last180days':\n return endingToday(startOfDaysAgo(180));\n case 'last365Days':\n return endingToday(startOfDaysAgo(365));\n }\n\n return {};\n};\n","import { useRef } from 'react';\nimport { isNil } from 'ramda';\nimport DatePicker, { ReactDatePickerProps } from 'react-datepicker';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCalendarAlt as calendarIcon } from '@fortawesome/free-regular-svg-icons';\nimport classNames from 'classnames';\nimport './DateInput.scss';\n\nexport type DateInputProps = ReactDatePickerProps;\n\nconst DateInput = (props: DateInputProps) => {\n const { className, isClearable, selected } = props;\n const showCalendarIcon = !isClearable || isNil(selected);\n const ref = useRef<{ input: HTMLInputElement }>();\n\n return (\n
\n \n {showCalendarIcon && (\n ref.current?.input.focus()}\n />\n )}\n
\n );\n};\n\nexport default DateInput;\n","import DateInput from '../DateInput';\nimport { DateRange } from './types';\n\ninterface DateRangeRowProps extends DateRange {\n onStartDateChange: (date: Date | null) => void;\n onEndDateChange: (date: Date | null) => void;\n disabled?: boolean;\n}\n\nconst DateRangeRow = (\n { startDate = null, endDate = null, disabled = false, onStartDateChange, onEndDateChange }: DateRangeRowProps,\n) => (\n
\n
\n \n
\n
\n \n
\n
\n);\n\nexport default DateRangeRow;\n","import { DropdownItem } from 'reactstrap';\nimport { FC } from 'react';\nimport { DATE_INTERVALS, DateInterval, rangeOrIntervalToString } from './types';\n\nexport interface DateIntervalDropdownProps {\n active?: DateInterval;\n onChange: (interval: DateInterval) => void;\n}\n\nexport const DateIntervalDropdownItems: FC = ({ active, onChange }) => (\n <>\n {DATE_INTERVALS.map(\n (interval) => (\n onChange(interval)}>\n {rangeOrIntervalToString(interval)}\n \n ),\n )}\n \n);\n","import { useState } from 'react';\nimport { DropdownItem } from 'reactstrap';\nimport { DropdownBtn } from '../DropdownBtn';\nimport {\n DateInterval,\n DateRange,\n dateRangeIsEmpty,\n rangeOrIntervalToString,\n intervalToDateRange,\n rangeIsInterval,\n} from './types';\nimport DateRangeRow from './DateRangeRow';\nimport { DateIntervalDropdownItems } from './DateIntervalDropdownItems';\n\nexport interface DateRangeSelectorProps {\n initialDateRange?: DateInterval | DateRange;\n disabled?: boolean;\n onDatesChange: (dateRange: DateRange) => void;\n defaultText: string;\n}\n\nexport const DateRangeSelector = (\n { onDatesChange, initialDateRange, defaultText, disabled }: DateRangeSelectorProps,\n) => {\n const [ activeInterval, setActiveInterval ] = useState(\n rangeIsInterval(initialDateRange) ? initialDateRange : undefined,\n );\n const [ activeDateRange, setActiveDateRange ] = useState(\n !rangeIsInterval(initialDateRange) ? initialDateRange : undefined,\n );\n const updateDateRange = (dateRange: DateRange) => {\n setActiveInterval(undefined);\n setActiveDateRange(dateRange);\n onDatesChange(dateRange);\n };\n const updateInterval = (dateInterval?: DateInterval) => () => {\n setActiveInterval(dateInterval);\n setActiveDateRange(undefined);\n onDatesChange(intervalToDateRange(dateInterval));\n };\n\n return (\n \n \n {defaultText}\n \n \n updateInterval(interval)()} />\n \n Custom:\n \n updateDateRange({ ...activeDateRange, startDate })}\n onEndDateChange={(endDate) => updateDateRange({ ...activeDateRange, endDate })}\n />\n \n \n );\n};\n","import { faTags as tagsIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { isEmpty, pipe } from 'ramda';\nimport { parseISO } from 'date-fns';\nimport SearchField from '../utils/SearchField';\nimport Tag from '../tags/helpers/Tag';\nimport { DateRangeSelector } from '../utils/dates/DateRangeSelector';\nimport { formatIsoDate } from '../utils/helpers/date';\nimport ColorGenerator from '../utils/services/ColorGenerator';\nimport { DateRange } from '../utils/dates/types';\nimport { ShortUrlsListParams } from './reducers/shortUrlsListParams';\nimport './SearchBar.scss';\n\ninterface SearchBarProps {\n listShortUrls: (params: ShortUrlsListParams) => void;\n shortUrlsListParams: ShortUrlsListParams;\n}\n\nconst dateOrNull = (date?: string) => date ? parseISO(date) : null;\n\nconst SearchBar = (colorGenerator: ColorGenerator) => ({ listShortUrls, shortUrlsListParams }: SearchBarProps) => {\n const selectedTags = shortUrlsListParams.tags ?? [];\n const setDates = pipe(\n ({ startDate, endDate }: DateRange) => ({\n startDate: formatIsoDate(startDate) ?? undefined,\n endDate: formatIsoDate(endDate) ?? undefined,\n }),\n (dates) => listShortUrls({ ...shortUrlsListParams, ...dates }),\n );\n\n return (\n
\n listShortUrls({ ...shortUrlsListParams, searchTerm })} />\n\n
\n
\n
\n \n
\n
\n
\n\n {!isEmpty(selectedTags) && (\n

\n \n  \n {selectedTags.map((tag) => (\n listShortUrls(\n {\n ...shortUrlsListParams,\n tags: selectedTags.filter((selectedTag) => selectedTag !== tag),\n },\n )}\n />\n ))}\n

\n )}\n
\n );\n};\n\nexport default SearchBar;\n","import { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';\nimport { toPairs } from 'ramda';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSortAmountUp as sortAscIcon, faSortAmountDown as sortDescIcon } from '@fortawesome/free-solid-svg-icons';\nimport classNames from 'classnames';\nimport { determineOrderDir, OrderDir } from './utils';\nimport './SortingDropdown.scss';\n\nexport interface SortingDropdownProps {\n items: Record;\n orderField?: T;\n orderDir?: OrderDir;\n onChange: (orderField?: T, orderDir?: OrderDir) => void;\n isButton?: boolean;\n right?: boolean;\n}\n\nexport default function SortingDropdown(\n { items, orderField, orderDir, onChange, isButton = true, right = false }: SortingDropdownProps,\n) {\n const handleItemClick = (fieldKey: T) => () => {\n const newOrderDir = determineOrderDir(fieldKey, orderField, orderDir);\n\n onChange(newOrderDir ? fieldKey : undefined, newOrderDir);\n };\n\n return (\n \n \n {!isButton && <>Order by}\n {isButton && !orderField && <>Order by...}\n {isButton && orderField && `Order by: \"${items[orderField]}\" - \"${orderDir ?? 'DESC'}\"`}\n \n \n {toPairs(items).map(([ fieldKey, fieldValue ]) => (\n \n {fieldValue}\n {orderField === fieldKey && (\n \n )}\n \n ))}\n \n onChange()}>\n Clear selection\n \n \n \n );\n}\n","import { FC, useEffect } from 'react';\nimport { pipe } from 'ramda';\nimport { CreateVisit } from '../../visits/types';\nimport { MercureInfo } from '../reducers/mercureInfo';\nimport { bindToMercureTopic } from './index';\n\nexport interface MercureBoundProps {\n createNewVisits: (createdVisits: CreateVisit[]) => void;\n loadMercureInfo: () => void;\n mercureInfo: MercureInfo;\n}\n\nexport function boundToMercureHub(\n WrappedComponent: FC,\n getTopicsForProps: (props: T) => string[],\n) {\n const pendingUpdates = new Set();\n\n return (props: MercureBoundProps & T) => {\n const { createNewVisits, loadMercureInfo, mercureInfo } = props;\n const { interval } = mercureInfo;\n\n useEffect(() => {\n const onMessage = (visit: CreateVisit) => interval ? pendingUpdates.add(visit) : createNewVisits([ visit ]);\n const closeEventSource = bindToMercureTopic(mercureInfo, getTopicsForProps(props), onMessage, loadMercureInfo);\n\n if (!interval) {\n return closeEventSource;\n }\n\n const timer = setInterval(() => {\n createNewVisits([ ...pendingUpdates ]);\n pendingUpdates.clear();\n }, interval * 1000 * 60);\n\n return pipe(() => clearInterval(timer), () => closeEventSource?.());\n }, [ mercureInfo ]);\n\n return ;\n };\n}\n","import { EventSourcePolyfill as EventSource } from 'event-source-polyfill';\nimport { MercureInfo } from '../reducers/mercureInfo';\n\nexport const bindToMercureTopic = (mercureInfo: MercureInfo, topics: string[], onMessage: (message: T) => void, onTokenExpired: () => void) => { // eslint-disable-line max-len\n const { mercureHubUrl, token, loading, error } = mercureInfo;\n\n if (loading || error || !mercureHubUrl) {\n return undefined;\n }\n\n const onEventSourceMessage = ({ data }: { data: string }) => onMessage(JSON.parse(data) as T);\n const onEventSourceError = ({ status }: { status: number }) => status === 401 && onTokenExpired();\n\n const subscriptions = topics.map((topic) => {\n const hubUrl = new URL(mercureHubUrl);\n\n hubUrl.searchParams.append('topic', topic);\n const es = new EventSource(hubUrl, {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n });\n\n es.onmessage = onEventSourceMessage;\n es.onerror = onEventSourceError;\n\n return es;\n });\n\n return () => subscriptions.forEach((es) => es.close());\n};\n","export class Topics {\n public static readonly visits = 'https://shlink.io/new-visit';\n\n public static readonly orphanVisits = 'https://shlink.io/new-orphan-visit';\n\n public static readonly shortUrlVisits = (shortCode: string) => `https://shlink.io/new-visit/${shortCode}`;\n}\n","import { Action } from 'redux';\n\ntype ActionHandler = (currentState: State, action: AT) => State;\ntype ActionHandlerMap = Record>;\n\nexport const buildReducer = (map: ActionHandlerMap, initialState: State) => (\n state: State | undefined,\n action: AT,\n): State => {\n const { type } = action;\n const actionHandler = map[type];\n const currentState = state ?? initialState;\n\n return actionHandler ? actionHandler(currentState, action) : currentState;\n};\n\nexport const buildActionCreator = (type: T) => (): Action => ({ type });\n","import { isEmpty, propEq, values } from 'ramda';\nimport { useState, useEffect, useMemo, FC } from 'react';\nimport { Button, Card, Nav, NavLink, Progress, Row } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCalendarAlt, faMapMarkedAlt, faList, faChartPie, faFileDownload } from '@fortawesome/free-solid-svg-icons';\nimport { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport { Route, Switch, NavLink as RouterNavLink, Redirect } from 'react-router-dom';\nimport { Location } from 'history';\nimport classNames from 'classnames';\nimport { DateRangeSelector } from '../utils/dates/DateRangeSelector';\nimport Message from '../utils/Message';\nimport { DateInterval, DateRange, intervalToDateRange } from '../utils/dates/types';\nimport { Result } from '../utils/Result';\nimport { ShlinkApiError } from '../api/ShlinkApiError';\nimport { Settings } from '../settings/reducers/settings';\nimport { SelectedServer } from '../servers/data';\nimport { supportsBotVisits } from '../utils/helpers/features';\nimport LineChartCard from './charts/LineChartCard';\nimport VisitsTable from './VisitsTable';\nimport { NormalizedOrphanVisit, NormalizedVisit, VisitsFilter, VisitsInfo, VisitsParams } from './types';\nimport OpenMapModalBtn from './helpers/OpenMapModalBtn';\nimport { normalizeVisits, processStatsFromVisits } from './services/VisitsParser';\nimport { VisitsFilterDropdown } from './helpers/VisitsFilterDropdown';\nimport { HighlightableProps, highlightedVisitsToStats } from './types/helpers';\nimport { DoughnutChartCard } from './charts/DoughnutChartCard';\nimport { SortableBarChartCard } from './charts/SortableBarChartCard';\nimport './VisitsStats.scss';\n\nexport interface VisitsStatsProps {\n getVisits: (params: VisitsParams) => void;\n visitsInfo: VisitsInfo;\n settings: Settings;\n selectedServer: SelectedServer;\n cancelGetVisits: () => void;\n baseUrl: string;\n domain?: string;\n exportCsv: (visits: NormalizedVisit[]) => void;\n isOrphanVisits?: boolean;\n}\n\ninterface VisitsNavLinkProps {\n title: string;\n subPath: string;\n icon: IconDefinition;\n}\n\ntype Section = 'byTime' | 'byContext' | 'byLocation' | 'list';\n\nconst sections: Record = {\n byTime: { title: 'By time', subPath: '', icon: faCalendarAlt },\n byContext: { title: 'By context', subPath: '/by-context', icon: faChartPie },\n byLocation: { title: 'By location', subPath: '/by-location', icon: faMapMarkedAlt },\n list: { title: 'List', subPath: '/list', icon: faList },\n};\n\nlet selectedBar: string | undefined;\n\nconst VisitsNavLink: FC = ({ subPath, title, icon, to }) => (\n pathname.endsWith(`visits${subPath}`)}\n replace\n >\n \n {title}\n \n);\n\nconst VisitsStats: FC = ({\n children,\n visitsInfo,\n getVisits,\n cancelGetVisits,\n baseUrl,\n domain,\n settings,\n exportCsv,\n selectedServer,\n isOrphanVisits = false,\n}) => {\n const initialInterval: DateInterval = settings.visits?.defaultInterval ?? 'last30Days';\n const [ dateRange, setDateRange ] = useState(intervalToDateRange(initialInterval));\n const [ highlightedVisits, setHighlightedVisits ] = useState([]);\n const [ highlightedLabel, setHighlightedLabel ] = useState();\n const [ visitsFilter, setVisitsFilter ] = useState({});\n const botsSupported = supportsBotVisits(selectedServer);\n\n const buildSectionUrl = (subPath?: string) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return !subPath ? `${baseUrl}${query}` : `${baseUrl}${subPath}${query}`;\n };\n const { visits, loading, loadingLarge, error, errorData, progress } = visitsInfo;\n const normalizedVisits = useMemo(() => normalizeVisits(visits), [ visits ]);\n const { os, browsers, referrers, countries, cities, citiesForMap, visitedUrls } = useMemo(\n () => processStatsFromVisits(normalizedVisits),\n [ normalizedVisits ],\n );\n const mapLocations = values(citiesForMap);\n\n const setSelectedVisits = (selectedVisits: NormalizedVisit[]) => {\n selectedBar = undefined;\n setHighlightedVisits(selectedVisits);\n };\n const highlightVisitsForProp = (prop: HighlightableProps) => (value: string) => {\n const newSelectedBar = `${prop}_${value}`;\n\n if (selectedBar === newSelectedBar) {\n setHighlightedVisits([]);\n setHighlightedLabel(undefined);\n selectedBar = undefined;\n } else {\n setHighlightedVisits((normalizedVisits as NormalizedOrphanVisit[]).filter(propEq(prop, value)));\n setHighlightedLabel(value);\n selectedBar = newSelectedBar;\n }\n };\n\n useEffect(() => cancelGetVisits, []);\n useEffect(() => {\n getVisits({ dateRange, filter: visitsFilter });\n }, [ dateRange, visitsFilter ]);\n\n const renderVisitsContent = () => {\n if (loadingLarge) {\n return (\n \n This is going to take a while... :S\n \n \n );\n }\n\n if (loading) {\n return ;\n }\n\n if (error) {\n return (\n \n \n \n );\n }\n\n if (isEmpty(visits)) {\n return There are no visits matching current filter :(;\n }\n\n return (\n <>\n \n \n \n \n \n \n
\n \n
\n
\n\n \n
\n \n
\n
\n \n
\n
\n \n
\n {isOrphanVisits && (\n
\n \n
\n )}\n
\n\n \n
\n \n
\n
\n \n mapLocations.length > 0 &&\n \n }\n sortingItems={{\n name: 'City name',\n amount: 'Visits amount',\n }}\n onClick={highlightVisitsForProp('city')}\n />\n
\n
\n\n \n
\n \n
\n
\n\n \n
\n
\n \n );\n };\n\n return (\n <>\n {children}\n\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n {visits.length > 0 && (\n
\n
\n setSelectedVisits([])}\n >\n Clear selection {highlightedVisits.length > 0 && <>({highlightedVisits.length})}\n \n exportCsv(normalizedVisits)}\n >\n Export ({normalizedVisits.length})\n \n
\n
\n )}\n
\n
\n\n
\n {renderVisitsContent()}\n
\n \n );\n};\n\nexport default VisitsStats;\n","import { isNil } from 'ramda';\nimport { ShortUrl } from '../data';\nimport { OptionalString } from '../../utils/utils';\n\nexport const shortUrlMatches = (shortUrl: ShortUrl, shortCode: string, domain: OptionalString): boolean => {\n if (isNil(domain)) {\n return shortUrl.shortCode === shortCode && !shortUrl.domain;\n }\n\n return shortUrl.shortCode === shortCode && shortUrl.domain === domain;\n};\n","import { Action } from 'redux';\nimport { CreateVisit } from '../types';\n\nexport const CREATE_VISITS = 'shlink/visitCreation/CREATE_VISITS';\n\nexport interface CreateVisitsAction extends Action {\n createdVisits: CreateVisit[];\n}\n\nexport const createNewVisits = (createdVisits: CreateVisit[]): CreateVisitsAction => ({\n type: CREATE_VISITS,\n createdVisits,\n});\n","import { AxiosError } from 'axios';\nimport { InvalidArgumentError, InvalidShortUrlDeletion, ProblemDetailsError } from '../types';\n\nexport const parseApiError = (e: AxiosError) => e.response?.data;\n\nexport const isInvalidArgumentError = (error?: ProblemDetailsError): error is InvalidArgumentError =>\n error?.type === 'INVALID_ARGUMENT';\n\nexport const isInvalidDeletionError = (error?: ProblemDetailsError): error is InvalidShortUrlDeletion =>\n error?.type === 'INVALID_SHORTCODE_DELETION';\n","import { Action, Dispatch } from 'redux';\nimport { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\nimport { ProblemDetailsError } from '../../api/types';\nimport { GetState } from '../../container/types';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const DELETE_SHORT_URL_START = 'shlink/deleteShortUrl/DELETE_SHORT_URL_START';\nexport const DELETE_SHORT_URL_ERROR = 'shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR';\nexport const SHORT_URL_DELETED = 'shlink/deleteShortUrl/SHORT_URL_DELETED';\nexport const RESET_DELETE_SHORT_URL = 'shlink/deleteShortUrl/RESET_DELETE_SHORT_URL';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlDeletion {\n shortCode: string;\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface DeleteShortUrlAction extends Action {\n shortCode: string;\n domain?: string | null;\n}\n\nconst initialState: ShortUrlDeletion = {\n shortCode: '',\n loading: false,\n error: false,\n};\n\nexport default buildReducer({\n [DELETE_SHORT_URL_START]: (state) => ({ ...state, loading: true, error: false }),\n [DELETE_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, errorData, loading: false, error: true }),\n [SHORT_URL_DELETED]: (state, { shortCode }) => ({ ...state, shortCode, loading: false, error: false }),\n [RESET_DELETE_SHORT_URL]: () => initialState,\n}, initialState);\n\nexport const deleteShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n shortCode: string,\n domain?: string | null,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: DELETE_SHORT_URL_START });\n const { deleteShortUrl } = buildShlinkApiClient(getState);\n\n try {\n await deleteShortUrl(shortCode, domain);\n dispatch({ type: SHORT_URL_DELETED, shortCode, domain });\n } catch (e) {\n dispatch({ type: DELETE_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n\nexport const resetDeleteShortUrl = buildActionCreator(RESET_DELETE_SHORT_URL);\n","import { Action, Dispatch } from 'redux';\nimport { GetState } from '../../container/types';\nimport { ShortUrl, ShortUrlData } from '../data';\nimport { buildReducer, buildActionCreator } from '../../utils/helpers/redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ProblemDetailsError } from '../../api/types';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const CREATE_SHORT_URL_START = 'shlink/createShortUrl/CREATE_SHORT_URL_START';\nexport const CREATE_SHORT_URL_ERROR = 'shlink/createShortUrl/CREATE_SHORT_URL_ERROR';\nexport const CREATE_SHORT_URL = 'shlink/createShortUrl/CREATE_SHORT_URL';\nexport const RESET_CREATE_SHORT_URL = 'shlink/createShortUrl/RESET_CREATE_SHORT_URL';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlCreation {\n result: ShortUrl | null;\n saving: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface CreateShortUrlAction extends Action {\n result: ShortUrl;\n}\n\nconst initialState: ShortUrlCreation = {\n result: null,\n saving: false,\n error: false,\n};\n\nexport default buildReducer({\n [CREATE_SHORT_URL_START]: (state) => ({ ...state, saving: true, error: false }),\n [CREATE_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, saving: false, error: true, errorData }),\n [CREATE_SHORT_URL]: (_, { result }) => ({ result, saving: false, error: false }),\n [RESET_CREATE_SHORT_URL]: () => initialState,\n}, initialState);\n\nexport const createShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (data: ShortUrlData) => async (\n dispatch: Dispatch,\n getState: GetState,\n) => {\n dispatch({ type: CREATE_SHORT_URL_START });\n const { createShortUrl } = buildShlinkApiClient(getState);\n\n try {\n const result = await createShortUrl(data);\n\n dispatch({ type: CREATE_SHORT_URL, result });\n } catch (e) {\n dispatch({ type: CREATE_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n\nexport const resetCreateShortUrl = buildActionCreator(RESET_CREATE_SHORT_URL);\n","import { Action, Dispatch } from 'redux';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { GetState } from '../../container/types';\nimport { OptionalString } from '../../utils/utils';\nimport { EditShortUrlData, ShortUrl } from '../data';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ProblemDetailsError } from '../../api/types';\nimport { parseApiError } from '../../api/utils';\nimport { supportsTagsInPatch } from '../../utils/helpers/features';\nimport { ApiErrorAction } from '../../api/types/actions';\n\n/* eslint-disable padding-line-between-statements */\nexport const EDIT_SHORT_URL_START = 'shlink/shortUrlEdition/EDIT_SHORT_URL_START';\nexport const EDIT_SHORT_URL_ERROR = 'shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR';\nexport const SHORT_URL_EDITED = 'shlink/shortUrlEdition/SHORT_URL_EDITED';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlEdition {\n shortUrl?: ShortUrl;\n saving: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ShortUrlEditedAction extends Action {\n shortUrl: ShortUrl;\n}\n\nconst initialState: ShortUrlEdition = {\n saving: false,\n error: false,\n};\n\nexport default buildReducer({\n [EDIT_SHORT_URL_START]: (state) => ({ ...state, saving: true, error: false }),\n [EDIT_SHORT_URL_ERROR]: (state, { errorData }) => ({ ...state, saving: false, error: true, errorData }),\n [SHORT_URL_EDITED]: (_, { shortUrl }) => ({ shortUrl, saving: false, error: false }),\n}, initialState);\n\nexport const editShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n shortCode: string,\n domain: OptionalString,\n data: EditShortUrlData,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: EDIT_SHORT_URL_START });\n\n const { selectedServer } = getState();\n const sendTagsSeparately = !supportsTagsInPatch(selectedServer);\n const { updateShortUrl, updateShortUrlTags } = buildShlinkApiClient(getState);\n\n try {\n const [ shortUrl ] = await Promise.all([\n updateShortUrl(shortCode, domain, data as any), // FIXME Parse dates\n sendTagsSeparately && data.tags ? updateShortUrlTags(shortCode, domain, data.tags) : undefined,\n ]);\n\n dispatch({ shortUrl, type: SHORT_URL_EDITED });\n } catch (e) {\n dispatch({ type: EDIT_SHORT_URL_ERROR, errorData: parseApiError(e) });\n\n throw e;\n }\n};\n","import { assoc, assocPath, init, last, pipe, reject } from 'ramda';\nimport { Action, Dispatch } from 'redux';\nimport { shortUrlMatches } from '../helpers';\nimport { CREATE_VISITS, CreateVisitsAction } from '../../visits/reducers/visitCreation';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { GetState } from '../../container/types';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ShlinkShortUrlsResponse } from '../../api/types';\nimport { DeleteShortUrlAction, SHORT_URL_DELETED } from './shortUrlDeletion';\nimport { ShortUrlsListParams } from './shortUrlsListParams';\nimport { CREATE_SHORT_URL, CreateShortUrlAction } from './shortUrlCreation';\nimport { SHORT_URL_EDITED, ShortUrlEditedAction } from './shortUrlEdition';\n\n/* eslint-disable padding-line-between-statements */\nexport const LIST_SHORT_URLS_START = 'shlink/shortUrlsList/LIST_SHORT_URLS_START';\nexport const LIST_SHORT_URLS_ERROR = 'shlink/shortUrlsList/LIST_SHORT_URLS_ERROR';\nexport const LIST_SHORT_URLS = 'shlink/shortUrlsList/LIST_SHORT_URLS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface ShortUrlsList {\n shortUrls?: ShlinkShortUrlsResponse;\n loading: boolean;\n error: boolean;\n}\n\nexport interface ListShortUrlsAction extends Action {\n shortUrls: ShlinkShortUrlsResponse;\n params: ShortUrlsListParams;\n}\n\nexport type ListShortUrlsCombinedAction = (\n ListShortUrlsAction\n & CreateVisitsAction\n & CreateShortUrlAction\n & DeleteShortUrlAction\n & ShortUrlEditedAction\n);\n\nconst initialState: ShortUrlsList = {\n loading: true,\n error: false,\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS_START]: (state) => ({ ...state, loading: true, error: false }),\n [LIST_SHORT_URLS_ERROR]: () => ({ loading: false, error: true }),\n [LIST_SHORT_URLS]: (_, { shortUrls }) => ({ loading: false, error: false, shortUrls }),\n [SHORT_URL_DELETED]: pipe(\n (state: ShortUrlsList, { shortCode, domain }: DeleteShortUrlAction) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n reject((shortUrl) => shortUrlMatches(shortUrl, shortCode, domain), state.shortUrls.data),\n state,\n ),\n (state) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'pagination', 'totalItems' ],\n state.shortUrls.pagination.totalItems - 1,\n state,\n ),\n ),\n [CREATE_VISITS]: (state, { createdVisits }) => assocPath(\n [ 'shortUrls', 'data' ],\n state.shortUrls?.data?.map(\n (currentShortUrl) => {\n // Find the last of the new visit for this short URL, and pick the amount of visits from it\n const lastVisit = last(\n createdVisits.filter(\n ({ shortUrl }) => shortUrl && shortUrlMatches(currentShortUrl, shortUrl.shortCode, shortUrl.domain),\n ),\n );\n\n return lastVisit?.shortUrl\n ? assoc('visitsCount', lastVisit.shortUrl.visitsCount, currentShortUrl)\n : currentShortUrl;\n },\n ),\n state,\n ),\n [CREATE_SHORT_URL]: pipe(\n // The only place where the list and the creation form coexist is the overview page.\n // There we can assume we are displaying page 1, and therefore, we can safely prepend the new short URL and remove the last one.\n (state: ShortUrlsList, { result }: CreateShortUrlAction) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n [ result, ...init(state.shortUrls.data) ],\n state,\n ),\n (state: ShortUrlsList) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'pagination', 'totalItems' ],\n state.shortUrls.pagination.totalItems + 1,\n state,\n ),\n ),\n [SHORT_URL_EDITED]: (state, { shortUrl: editedShortUrl }) => !state.shortUrls ? state : assocPath(\n [ 'shortUrls', 'data' ],\n state.shortUrls.data.map((shortUrl) => {\n const { shortCode, domain } = editedShortUrl;\n\n return shortUrlMatches(shortUrl, shortCode, domain) ? editedShortUrl : shortUrl;\n }),\n state,\n ),\n}, initialState);\n\nexport const listShortUrls = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n params: ShortUrlsListParams = {},\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: LIST_SHORT_URLS_START });\n const { listShortUrls } = buildShlinkApiClient(getState);\n\n try {\n const shortUrls = await listShortUrls(params);\n\n dispatch({ type: LIST_SHORT_URLS, shortUrls, params });\n } catch (e) {\n dispatch({ type: LIST_SHORT_URLS_ERROR, params });\n }\n};\n","import { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\nimport { OrderDir } from '../../utils/utils';\nimport { LIST_SHORT_URLS, ListShortUrlsAction } from './shortUrlsList';\n\nexport const RESET_SHORT_URL_PARAMS = 'shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS';\n\nexport const SORTABLE_FIELDS = {\n dateCreated: 'Created at',\n shortCode: 'Short URL',\n longUrl: 'Long URL',\n title: 'Title',\n visits: 'Visits',\n};\n\nexport type OrderableFields = keyof typeof SORTABLE_FIELDS;\n\nexport interface ShortUrlsListParams {\n page?: string;\n itemsPerPage?: number;\n tags?: string[];\n searchTerm?: string;\n startDate?: string;\n endDate?: string;\n orderBy?: Partial>;\n}\n\nconst initialState: ShortUrlsListParams = {\n page: '1',\n orderBy: { dateCreated: 'DESC' },\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS]: (state, { params }) => ({ ...state, ...params }),\n [RESET_SHORT_URL_PARAMS]: () => initialState,\n}, initialState);\n\nexport const resetShortUrlParams = buildActionCreator(RESET_SHORT_URL_PARAMS);\n","const TEN_ROUNDING_NUMBER = 10;\nconst { ceil } = Math;\nconst formatter = new Intl.NumberFormat('en-US');\n\nexport const prettify = (number: number | string) => formatter.format(Number(number));\n\nexport const roundTen = (number: number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;\n","import { max, min, range } from 'ramda';\nimport { prettify } from './numbers';\n\nconst DELTA = 2;\n\nexport const ELLIPSIS = '...';\n\ntype Ellipsis = typeof ELLIPSIS;\n\nexport type NumberOrEllipsis = number | Ellipsis;\n\nexport const progressivePagination = (currentPage: number, pageCount: number): NumberOrEllipsis[] => {\n const pages: NumberOrEllipsis[] = range(\n max(DELTA, currentPage - DELTA),\n min(pageCount - 1, currentPage + DELTA) + 1,\n );\n\n if (currentPage - DELTA > DELTA) {\n pages.unshift(ELLIPSIS);\n }\n if (currentPage + DELTA < pageCount - 1) {\n pages.push(ELLIPSIS);\n }\n\n pages.unshift(1);\n pages.push(pageCount);\n\n return pages;\n};\n\nexport const pageIsEllipsis = (pageNumber: NumberOrEllipsis): pageNumber is Ellipsis => pageNumber === ELLIPSIS;\n\nexport const prettifyPageNumber = (pageNumber: NumberOrEllipsis): string =>\n pageIsEllipsis(pageNumber) ? pageNumber : prettify(pageNumber);\n\nexport const keyForPage = (pageNumber: NumberOrEllipsis, index: number) => !pageIsEllipsis(pageNumber) ? `${pageNumber}` : `${pageNumber}_${index}`;\n","import { Link } from 'react-router-dom';\nimport { Pagination, PaginationItem, PaginationLink } from 'reactstrap';\nimport { pageIsEllipsis, keyForPage, progressivePagination, prettifyPageNumber } from '../utils/helpers/pagination';\nimport { ShlinkPaginator } from '../api/types';\n\ninterface PaginatorProps {\n paginator?: ShlinkPaginator;\n serverId: string;\n}\n\nconst Paginator = ({ paginator, serverId }: PaginatorProps) => {\n const { currentPage = 0, pagesCount = 0 } = paginator ?? {};\n\n if (pagesCount <= 1) {\n return null;\n }\n\n const renderPages = () =>\n progressivePagination(currentPage, pagesCount).map((pageNumber, index) => (\n \n \n {prettifyPageNumber(pageNumber)}\n \n \n ));\n\n return (\n \n \n \n \n {renderPages()}\n = pagesCount}>\n \n \n \n );\n};\n\nexport default Paginator;\n","import { faCaretDown as caretDownIcon, faCaretUp as caretUpIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { head, keys, values } from 'ramda';\nimport { FC, useEffect, useState } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport { Card } from 'reactstrap';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { determineOrderDir, OrderDir } from '../utils/utils';\nimport { isReachableServer, SelectedServer } from '../servers/data';\nimport { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';\nimport { parseQuery } from '../utils/helpers/query';\nimport { Topics } from '../mercure/helpers/Topics';\nimport { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';\nimport { OrderableFields, ShortUrlsListParams, SORTABLE_FIELDS } from './reducers/shortUrlsListParams';\nimport { ShortUrlsTableProps } from './ShortUrlsTable';\nimport Paginator from './Paginator';\nimport './ShortUrlsList.scss';\n\ninterface RouteParams {\n page: string;\n serverId: string;\n}\n\nexport interface ShortUrlsListProps extends RouteComponentProps {\n selectedServer: SelectedServer;\n shortUrlsList: ShortUrlsListState;\n listShortUrls: (params: ShortUrlsListParams) => void;\n shortUrlsListParams: ShortUrlsListParams;\n resetShortUrlParams: () => void;\n}\n\nconst ShortUrlsList = (ShortUrlsTable: FC) => boundToMercureHub(({\n listShortUrls,\n resetShortUrlParams,\n shortUrlsListParams,\n match,\n location,\n shortUrlsList,\n selectedServer,\n}: ShortUrlsListProps) => {\n const { orderBy } = shortUrlsListParams;\n const [ order, setOrder ] = useState<{ orderField?: OrderableFields; orderDir?: OrderDir }>({\n orderField: orderBy && (head(keys(orderBy)) as OrderableFields),\n orderDir: orderBy && head(values(orderBy)),\n });\n const { pagination } = shortUrlsList?.shortUrls ?? {};\n const refreshList = (extraParams: ShortUrlsListParams) => listShortUrls({ ...shortUrlsListParams, ...extraParams });\n const handleOrderBy = (orderField?: OrderableFields, orderDir?: OrderDir) => {\n setOrder({ orderField, orderDir });\n refreshList({ orderBy: orderField ? { [orderField]: orderDir } : undefined });\n };\n const orderByColumn = (field: OrderableFields) => () =>\n handleOrderBy(field, determineOrderDir(field, order.orderField, order.orderDir));\n const renderOrderIcon = (field: OrderableFields) => {\n if (order.orderField !== field) {\n return null;\n }\n\n if (!order.orderDir) {\n return null;\n }\n\n return (\n \n );\n };\n\n useEffect(() => {\n const { tag } = parseQuery<{ tag?: string }>(location.search);\n const tags = tag ? [ decodeURIComponent(tag) ] : shortUrlsListParams.tags;\n\n refreshList({ page: match.params.page, tags, itemsPerPage: undefined });\n\n return resetShortUrlParams;\n }, []);\n\n return (\n <>\n
\n \n
\n \n refreshList({ tags: [ ...shortUrlsListParams.tags ?? [], tag ] })}\n />\n \n \n \n );\n}, () => [ Topics.visits ]);\n\nexport default ShortUrlsList;\n","import { FC } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCopy as copyIcon } from '@fortawesome/free-regular-svg-icons';\nimport CopyToClipboard from 'react-copy-to-clipboard';\nimport './CopyToClipboardIcon.scss';\n\ninterface CopyToClipboardIconProps {\n text: string;\n onCopy?: (text: string, result: boolean) => void;\n}\n\nexport const CopyToClipboardIcon: FC = ({ text, onCopy }) => (\n \n \n \n);\n","import { parseISO, format as formatDate, getUnixTime, formatDistance } from 'date-fns';\nimport { isDateObject } from './helpers/date';\n\nexport interface DateProps {\n date: Date | string;\n format?: string;\n relative?: boolean;\n}\n\nexport const Time = ({ date, format = 'yyyy-MM-dd HH:mm', relative = false }: DateProps) => {\n const dateObject = isDateObject(date) ? date : parseISO(date);\n\n return (\n \n );\n};\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { isServerWithId, SelectedServer, ServerWithId } from '../../servers/data';\nimport { ShortUrl } from '../data';\n\nexport type LinkSuffix = 'visits' | 'edit';\n\nexport interface ShortUrlDetailLinkProps {\n shortUrl?: ShortUrl | null;\n selectedServer?: SelectedServer;\n suffix: LinkSuffix;\n}\n\nconst buildUrl = ({ id }: ServerWithId, { shortCode, domain }: ShortUrl, suffix: LinkSuffix) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return `/server/${id}/short-code/${shortCode}/${suffix}${query}`;\n};\n\nconst ShortUrlDetailLink: FC> = (\n { selectedServer, shortUrl, suffix, children, ...rest },\n) => {\n if (!selectedServer || !isServerWithId(selectedServer) || !shortUrl) {\n return {children};\n }\n\n return {children};\n};\n\nexport default ShortUrlDetailLink;\n","import { useRef } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';\nimport { UncontrolledTooltip } from 'reactstrap';\nimport classNames from 'classnames';\nimport { prettify } from '../../utils/helpers/numbers';\nimport { ShortUrl } from '../data';\nimport { SelectedServer } from '../../servers/data';\nimport ShortUrlDetailLink from './ShortUrlDetailLink';\nimport './ShortUrlVisitsCount.scss';\n\ninterface ShortUrlVisitsCountProps {\n shortUrl?: ShortUrl | null;\n selectedServer?: SelectedServer;\n visitsCount: number;\n active?: boolean;\n}\n\nconst ShortUrlVisitsCount = ({ visitsCount, shortUrl, selectedServer, active = false }: ShortUrlVisitsCountProps) => {\n const maxVisits = shortUrl?.meta?.maxVisits;\n const visitsLink = (\n \n \n {prettify(visitsCount)}\n \n \n );\n\n if (!maxVisits) {\n return visitsLink;\n }\n\n const prettifiedMaxVisits = prettify(maxVisits);\n const tooltipRef = useRef();\n\n return (\n <>\n \n {visitsLink}\n {\n tooltipRef.current = el;\n }}\n >\n {' '}/ {prettifiedMaxVisits}{' '}\n \n \n \n \n \n tooltipRef.current) as any} placement=\"bottom\">\n This short URL will not accept more than {prettifiedMaxVisits} visits.\n \n \n );\n};\n\nexport default ShortUrlVisitsCount;\n","import { FC, useEffect, useRef } from 'react';\nimport { isEmpty } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport ColorGenerator from '../../utils/services/ColorGenerator';\nimport { StateFlagTimeout } from '../../utils/helpers/hooks';\nimport Tag from '../../tags/helpers/Tag';\nimport { SelectedServer } from '../../servers/data';\nimport { CopyToClipboardIcon } from '../../utils/CopyToClipboardIcon';\nimport { ShortUrl } from '../data';\nimport { Time } from '../../utils/Time';\nimport ShortUrlVisitsCount from './ShortUrlVisitsCount';\nimport { ShortUrlsRowMenuProps } from './ShortUrlsRowMenu';\nimport './ShortUrlsRow.scss';\n\nexport interface ShortUrlsRowProps {\n onTagClick?: (tag: string) => void;\n selectedServer: SelectedServer;\n shortUrl: ShortUrl;\n}\n\nconst ShortUrlsRow = (\n ShortUrlsRowMenu: FC,\n colorGenerator: ColorGenerator,\n useStateFlagTimeout: StateFlagTimeout,\n) => ({ shortUrl, selectedServer, onTagClick }: ShortUrlsRowProps) => {\n const [ copiedToClipboard, setCopiedToClipboard ] = useStateFlagTimeout();\n const [ active, setActive ] = useStateFlagTimeout(false, 500);\n const isFirstRun = useRef(true);\n\n const renderTags = (tags: string[]) => {\n if (isEmpty(tags)) {\n return No tags;\n }\n\n return tags.map((tag) => (\n onTagClick?.(tag)}\n />\n ));\n };\n\n useEffect(() => {\n if (isFirstRun.current) {\n isFirstRun.current = false;\n } else {\n setActive();\n }\n }, [ shortUrl.visitsCount ]);\n\n return (\n \n \n