diff --git a/feature-manage-domains/asset-manifest.json b/feature-manage-domains/asset-manifest.json index c4b6f96f..1128c188 100644 --- a/feature-manage-domains/asset-manifest.json +++ b/feature-manage-domains/asset-manifest.json @@ -1,7 +1,7 @@ { "main.css": "/shlink-web-client/feature-manage-domains/static/css/main.987105aa.chunk.css", - "main.js": "/shlink-web-client/feature-manage-domains/static/js/main.c01afc03.chunk.js", - "main.js.map": "/shlink-web-client/feature-manage-domains/static/js/main.c01afc03.chunk.js.map", + "main.js": "/shlink-web-client/feature-manage-domains/static/js/main.61a82b33.chunk.js", + "main.js.map": "/shlink-web-client/feature-manage-domains/static/js/main.61a82b33.chunk.js.map", "runtime~main.js": "/shlink-web-client/feature-manage-domains/static/js/runtime~main.41779713.js", "runtime~main.js.map": "/shlink-web-client/feature-manage-domains/static/js/runtime~main.41779713.js.map", "static/css/2.bfc52f08.chunk.css": "/shlink-web-client/feature-manage-domains/static/css/2.bfc52f08.chunk.css", diff --git a/feature-manage-domains/index.html b/feature-manage-domains/index.html index 7e1baa9d..4917fecd 100644 --- a/feature-manage-domains/index.html +++ b/feature-manage-domains/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/feature-manage-domains/static/js/main.c01afc03.chunk.js b/feature-manage-domains/static/js/main.61a82b33.chunk.js similarity index 92% rename from feature-manage-domains/static/js/main.c01afc03.chunk.js rename to feature-manage-domains/static/js/main.61a82b33.chunk.js index fb8161b8..84d993ca 100644 --- a/feature-manage-domains/static/js/main.c01afc03.chunk.js +++ b/feature-manage-domains/static/js/main.61a82b33.chunk.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{146:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/feature-manage-domains"}')},149:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(44),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"})]})})}},150: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(48),i=r(28),o=r(61);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.b)(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})})}}},152:function(e,t,r){"use strict";var n=r(0),c=r(24),a=r(32);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})]})})}},165:function(e,t,r){"use strict";var n=r(0),c=r(653),a=r(654),s=r(24),i=r(7),o=r.n(i),l=r(15),u=r(14),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)}))})]})}},26:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"c",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"d",(function(){return d}));var n=r(642),c=r(216),a=r(334),s=r(641),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}},27:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o}));var n=r(9),c=r(1),a=r(295),s=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]}},i=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)}]},o=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)})}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return s}));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"))}},292:function(e,t,r){"use strict";(function(e){var n=r(293),c=r.n(n),a=r(294),s=r(325),i=r(326),o=r(327),l=r(328),u=r(296),d=r(323),j=r(97),b=r(298);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(42))},294: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})}}},296:function(e,t,r){"use strict";var n=r(40),c=r(153),a=r(330),s=r(321),i=r(0),o=r(1),l=r(220),u=r(32);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)}},298:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(13),s=r(40),i=r(153),o=r(98),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}()},312:function(e,t,r){"use strict";(function(e){var n=r(27),c=r(313),a=r(314);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.a,"setTimeout","clearTimeout")}}).call(this,r(42))},313:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(40),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))}}},314:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(40),c=r(26),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.e)(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:{}}},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(35),a=r(0),s=r(332),i=r(639),o=r(640),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})]}))}},323:function(e,t,r){"use strict";var n=r(0),c=r(7),a=r.n(c),s=r(28),i=r(641),o=r(46),l=r(62),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.c)(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.c)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},325:function(e,t,r){"use strict";var n=r(9),c=r(0),a=r(14),s=r(15),i=r(1),o=r(24),l=r(646),u=r(647),d=r(648),j=r(649),b=r(650),h=r(651),O=r(652),v=r(7),f=r.n(v),m=r(27),p=r(149);t.a=function(e){return function(t){var r=t.location,v=Object(m.c)(),x=Object(n.a)(v,4),g=x[0],S=x[1],y=x[3],C=r.pathname;Object(i.useEffect)(y,[r]);var N=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":g});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)(p.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:N})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:g,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:"/settings",active:"/settings"===C,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},326:function(e,t,r){"use strict";var n=r(0),c=r(655),a=r(334),s=r(24),i=r(332),o=r(637),l=r(46),u=r(15),d=r(14),j=r(165),b=r(149);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})]})})})]})})]})]})})})}},327:function(e,t,r){"use strict";var n=r(3),c=r(9),a=r(0),s=r(1),i=r(38),o=r(14),l=r(15),u=r(7),d=r.n(u),j=r(150),b=r(27),h=r(33),O=r(28),v=r(152);t.a=function(e,t,r,u,f,m,p,x,g,S,y){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,k=Object(b.c)(),w=Object(c.a)(k,4),_=w[0],U=w[1],T=w[2],R=w[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.c)(N))return Object(a.jsx)(x,{});var D=Object(h.l)(N),E=Object(h.e)(N),L=Object(h.c)(N),V=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),I=Object(b.b)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:V,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},I),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:_}),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:g}),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}),D&&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:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),L&&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)}},328:function(e,t,r){"use strict";var n=r(3),c=r(35),a=r(0),s=r(14),i=r(15),o=r(24),l=r(7),u=r.n(l),d=r(28),j=r(33),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.d)(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,{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,{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,{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,{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,{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,{icon:s.A}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),Object(d.d)(r)&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},33:function(e,t,r){"use strict";r.d(t,"j",(function(){return s})),r.d(t,"l",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"h",(function(){return l})),r.d(t,"n",(function(){return u})),r.d(t,"g",(function(){return d})),r.d(t,"k",(function(){return j})),r.d(t,"e",(function(){return b})),r.d(t,"f",(function(){return h})),r.d(t,"m",(function(){return O})),r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"c",(function(){return p}));var n=r(28),c=r(62),a=function(e){return function(t){return Object(n.c)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.1.0"}),i=a({minVersion:"2.2.0"}),o=a({minVersion:"2.4.0"}),l=o,u=o,d=a({minVersion:"2.5.0"}),j=a({minVersion:"2.6.0"}),b=j,h=j,O=j,v=a({minVersion:"2.7.0"}),f=v,m=a({minVersion:"2.8.0"}),p=m},335:function(e,t,r){e.exports=r(633)},420:function(e,t){},422:function(e,t){},44: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"))}},48:function(e,t,r){"use strict";var n=r(0),c=r(637),a=r(332),s=r(7),i=r.n(s),o=r(14),l=r(15),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]})})})})}},61: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})}},62: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(168),c=r(638),a=r(643),s=r(26),i=function(e,t){var r=t.maxVersion,c=t.minVersion;if(!Object(s.c)(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}}},633:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return Ra})),r.d(n,"normalizeVisits",(function(){return Da}));var c,a=r(0),s=r(43),i=r(163),o=r(24),l=r(146),u=r(10),d=r(3),j=r(291),b=r(38),h=r(703),O=r(708),v=r(28),f=r(6),m=r.n(f),p=r(13),x=r(40),g=r(121),S=r.n(g),y=r(324),C=r(216),N=r(334),k=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(y.a)(C.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(p.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(p.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(y.a)((function(e){return Object(N.a)(e)||Object(C.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(k(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:function(e){return S.a.stringify(e,{arrayFormat:"brackets"})}});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},U={},T=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.a)(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 U[s]||(U[s]=new _(e,c,a)),U[s]}},R=function(e){e.serviceFactory("buildShlinkApiClient",T,"axios")},D=r(292),E=r(9),L=r(1),V=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(L.useState)("".concat(u,"_").concat(o)),b=Object(E.a)(j,2),h=b[0],O=b[1];return Object(L.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(L.createElement)(t,Object(d.a)(Object(d.a)({},r),{},{key:h}))]})}},I=r(14),F=r(15),A=r(641),M=r(410),G=r(7),P=r.n(G),B=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(L.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:P()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:P()("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)(F.a,{icon:I.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"})]})},H=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"})]})},W=r(659),q=r(125),z=r(656),K=r(657),Q=r(27),J=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(Q.c)(),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)(q.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(z.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(K.a,{className:"w-100",right:u,style:f,children:i})]})},Z=r(84),Y=r(376),X=r(204),$=r(322),ee=r(635),te=r(658),re=(r(634),function(e){return"string"!==typeof e}),ne=function(e,t){return e&&re(e)?t?Object(ee.default)(e,t):Object(te.a)(e):e},ce=function(e){return ne(e,void 0)},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return ne(t,e)}}(),se=function(e){return void 0===e||Object(N.a)(Object($.a)(Boolean,e))},ie=function(e){return"string"===typeof e},oe={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180days:"Last 180 days",last365Days:"Last 365 days"},le=Object.keys(oe),ue=function(e){if(e)return ie(e)?oe[e]:function(e){if(e&&!se(e))return e.startDate&&!e.endDate?"Since ".concat(ae(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ae(e.endDate)):"".concat(ae(e.startDate)," - ").concat(ae(e.endDate))}(e)},de=function(e){return Object(Z.default)(Object(Y.default)(new Date,e))},je=function(e){if(!e)return{};switch(e){case"today":return{startDate:Object(Z.default)(new Date),endDate:new Date};case"yesterday":return{startDate:de(1),endDate:Object(X.default)(Object(Y.default)(new Date,1))};case"last7Days":return{startDate:de(7),endDate:new Date};case"last30Days":return{startDate:de(30),endDate:new Date};case"last90Days":return{startDate:de(90),endDate:new Date};case"last180days":return{startDate:de(180),endDate:new Date};case"last365Days":return{startDate:de(365),endDate:new Date}}return{}},be=r(300),he=r.n(be),Oe=r(103),ve=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(C.a)(n),s=Object(L.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:P()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(F.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:le.map((function(e){return Object(a.jsx)(W.a,{active:t===e,onClick:function(){return r(e)},children:ue(e)},e)}))})},pe=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=Object(L.useState)(ie(n)?n:void 0),o=Object(E.a)(i,2),l=o[0],u=o[1],j=Object(L.useState)(ie(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)(J,{disabled:s,text:null!==(t=ue(null!==l&&void 0!==l?l:h))&&void 0!==t?t:c,children:[Object(a.jsx)(W.a,{active:void 0===l&&se(h),onClick:f(void 0),children:c}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(me,{active:l,onChange:function(e){return f(e)()}}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{header:!0,children:"Custom:"}),Object(a.jsx)(W.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(M.default)(e):null},ge=function(e){return function(t){var r,n=t.listShortUrls,c=t.shortUrlsListParams,s=null!==(r=c.tags)&&void 0!==r?r:[],i=Object(A.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=ce(n))&&void 0!==t?t:void 0,endDate:null!==(r=ce(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)(B,{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)(pe,{defaultText:"All short URLs",initialDateRange:{startDate:xe(c.startDate),endDate:xe(c.endDate)},onDatesChange:i})})})}),!Object(N.a)(s)&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(F.a,{icon:I.L,className:"search-bar__tags-icon"}),"\xa0",s.map((function(t){return Object(a.jsx)(H,{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(29),ye=r(669),Ce=r(53),Ne=r(655),ke=r(332),we=r(660),_e=r(661),Ue=r(26);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.a)(e,r,n);c(t?e:void 0,t)}};return Object(a.jsxs)(we.a,{children:[Object(a.jsxs)(z.a,{caret:!0,color:i?"primary":"link",className:P()({"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)(K.a,{right:l,className:P()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(_e.a)(t).map((function(e){var t=Object(E.a)(e,2),c=t[0],s=t[1];return Object(a.jsxs)(W.a,{active:r===c,onClick:u(c),children:[s,r===c&&Object(a.jsx)(F.a,{icon:"ASC"===n?I.I:I.H,className:"sorting-dropdown__sort-icon"})]},c)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!r,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Re=r(301);function De(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(L.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(A.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 Ee=function(e){return S.a.parse(e,{ignoreQueryPrefix:!0})},Le=function e(){Object(x.a)(this,e)};Le.visits="https://shlink.io/new-visit",Le.orphanVisits="https://shlink.io/new-orphan-visit",Le.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Ve,Ie,Fe,Ae,Me,Ge,Pe,Be,He,We,qe,ze,Ke,Qe,Je,Ze,Ye,Xe,$e,et=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}},tt=function(e){return function(){return{type:e}}},rt=r(662),nt=r(663),ct=r(302),at=r(664),st=function(e,t,r){return Object(C.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},it="shlink/visitCreation/CREATE_VISITS",ot=function(e){return{type:it,createdVisits:e}},lt=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},ut=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},dt="shlink/deleteShortUrl/DELETE_SHORT_URL_START",jt="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",bt="shlink/deleteShortUrl/SHORT_URL_DELETED",ht="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",Ot={shortCode:"",loading:!1,error:!1},vt=et((Ve={},Object(u.a)(Ve,dt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ve,jt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Ve,bt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Ve,ht,(function(){return Ot})),Ve),Ot),ft=function(e){return function(t,r){return function(){var n=Object(p.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:dt}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:bt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:jt,errorData:lt(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},mt=tt(ht),pt="shlink/createShortUrl/CREATE_SHORT_URL_START",xt="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",gt="shlink/createShortUrl/CREATE_SHORT_URL",St="shlink/createShortUrl/RESET_CREATE_SHORT_URL",yt={result:null,saving:!1,error:!1},Ct=et((Ie={},Object(u.a)(Ie,pt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ie,xt,(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,gt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Ie,St,(function(){return yt})),Ie),yt),Nt=function(e){return function(t){return function(){var r=Object(p.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:pt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:gt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:xt,errorData:lt(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},kt=tt(St),wt=r(33),_t="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Ut="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Tt="shlink/shortUrlEdition/SHORT_URL_EDITED",Rt=et((Fe={},Object(u.a)(Fe,_t,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Fe,Ut,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Fe,Tt,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),Fe),{saving:!1,error:!1}),Dt=function(e){return function(t,r,n){return function(){var c=Object(p.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.m)(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:Tt}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Ut,errorData:lt(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",Lt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Vt="shlink/shortUrlsList/LIST_SHORT_URLS",It=et((Ae={},Object(u.a)(Ae,Et,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ae,Lt,(function(){return{loading:!1,error:!0}})),Object(u.a)(Ae,Vt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Ae,bt,Object(A.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(rt.a)(["shortUrls","data"],Object(y.a)((function(e){return st(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(rt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Ae,it,(function(e,t){var r,n,c=t.createdVisits;return Object(rt.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(nt.a)(c.filter((function(t){var r=t.shortUrl;return r&&st(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(ct.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Ae,gt,Object(A.a)((function(e,t){var r=t.result;return e.shortUrls?Object(rt.a)(["shortUrls","data"],[r].concat(Object(Se.a)(Object(at.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(rt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Ae,Tt,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(rt.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return st(e,t,n)?r:e})),e):e})),Ae),{loading:!0,error:!1}),Ft=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(p.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:Vt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Lt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},At="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",Mt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Gt={page:"1",orderBy:{dateCreated:"DESC"}},Pt=et((Me={},Object(u.a)(Me,Vt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Me,At,(function(){return Gt})),Me),Gt),Bt=tt(At),Ht=r(666),Wt=r(667),qt=r(668),zt=r(642),Kt=r(303),Qt=r(665),Jt=Math.ceil,Zt=new Intl.NumberFormat("en-US"),Yt=function(e){return Zt.format(e)},Xt="...",$t=function(e,t){var r=Object(zt.a)(Object(Kt.a)(2,e-2),Object(Qt.a)(t-1,e+2)+1);return e-2>2&&r.unshift(Xt),e+2=l,children:Object(a.jsx)(Wt.a,{next:!0,tag:o.b,to:"/server/".concat(r,"/list-short-urls/").concat(s+1)})})]})},cr=function(e){return De((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(L.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],p=(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))},g=function(e,t){m({orderField:e,orderDir:t}),x({orderBy:e?Object(u.a)({},e,t):void 0})};return Object(L.useEffect)((function(){var e=Ee(o.search).tag,t=e?[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:Mt,orderField:f.orderField,orderDir:f.orderDir,onChange:g})}),Object(a.jsxs)(ke.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{orderByColumn:function(e){return function(){return g(e,Object(Ue.a)(e,f.orderField,f.orderDir))}},renderOrderIcon:function(e){return f.orderField!==e?null:f.orderDir?Object(a.jsx)(F.a,{icon:"ASC"===f.orderDir?I.f:I.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)(nr,{paginator:p,serverId:Object(v.c)(j)?j.id:""})]})]})}),(function(){return[Le.visits]}))},ar=r(46),sr=r(159),ir=r.n(sr),or=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(ir.a,{text:t,onCopy:r,children:Object(a.jsx)(F.a,{icon:Oe.b,className:"ml-2 copy-to-clipboard-icon"})})},lr=r(670),ur=r(710),dr=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=re(t)?t:Object(M.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(lr.a)(i),"000"),children:s?"".concat(Object(ur.a)(new Date,i)," ago"):Object(ee.default)(i,n)})},jr=r(671),br=r(35),hr=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)},Or=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(br.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.d)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:hr(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},vr=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)(Or,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:P()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:Yt(r)})});if(!o)return l;var u=Yt(o),d=Object(L.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)(F.a,{icon:I.t})})]})]}),Object(a.jsxs)(jr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},fr=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(L.useRef)(!0);return Object(L.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)(dr,{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)(ar.a,{href:i.shortUrl}),Object(a.jsx)(or,{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)(ar.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)(ar.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(N.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(H,{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)(vr,{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})})]})}},mr=r(672),pr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(Q.c)(),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(Q.c)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(Q.c)(),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(mr.a,{toggle:l,isOpen:o,children:[Object(a.jsxs)(z.a,{size:"sm",caret:!0,outline:!0,className:"short-urls-row-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(F.a,{icon:I.n}),"\xa0"]}),Object(a.jsxs)(K.a,{right:!0,children:[Object(a.jsxs)(W.a,{tag:Or,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(F.a,{icon:I.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(W.a,{tag:Or,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(F.a,{icon:I.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(W.a,{onClick:b,children:[Object(a.jsx)(F.a,{icon:I.D,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"short-urls-row-menu__dropdown-item--danger",onClick:f,children:[Object(a.jsx)(F.a,{icon:I.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(L.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(p.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}))]})}},gr=r(712),Sr=r(673),yr=r(674),Cr=r(675),Nr=r(643),kr=r(637),wr=r(32),_r=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(kr.a,{className:n,children:Object(a.jsx)("div",{className:P()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(wr.a,{className:P()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:P()({"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(L.useState)(""),l=Object(E.a)(o,2),u=l[0],d=l[1];Object(L.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(A.a)(s,r),O=Object(Ue.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Nr.a)}));return Object(a.jsx)(gr.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)(_r,{type:ut(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(223),Dr=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(L.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(_r,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(F.a,{icon:I.M,className:"float-right pointer",onClick:s}),Object(a.jsx)(Ur,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(C.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(_r,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(F.a,{icon:I.M,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)(ir.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)(F.a,{icon:Oe.b})," Copy"]})}),Object(a.jsx)(Rr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},Er=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=P()({"short-urls-table__header-cell--with-action":!!r}),b=P()("short-urls-table__header-cell",j),h=P()("table table-hover",o),O=Object(wt.k)(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(N.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(676),Vr=r(220),Ir=function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.svgIsSupported,l=r.marginIsSupported,u=r.errorCorrectionIsSupported,d="".concat(e,"/qr-code").concat(i?"/".concat(n):""),j=function(e){return S.a.stringify(e,{arrayFormat:"brackets"})}({size:i?void 0:n,format:o?c:void 0,margin:l&&a>0?a:void 0,errorCorrection:u?s:void 0});return"".concat(d).concat(Object(N.a)(j)?"":"?".concat(j))},Fr=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(J,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(W.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(W.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},Ar=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(J,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(W.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(W.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(W.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(W.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},Mr=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(L.useState)(300),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(L.useState)(0),O=Object(E.a)(h,2),v=O[0],f=O[1],x=Object(L.useState)("png"),g=Object(E.a)(x,2),S=g[0],y=g[1],C=Object(L.useState)("L"),N=Object(E.a)(C,2),k=N[0],w=N[1],_=Object(L.useMemo)((function(){return{useSizeInPath:!Object(wt.g)(l),svgIsSupported:Object(wt.h)(l),marginIsSupported:Object(wt.f)(l),errorCorrectionIsSupported:Object(wt.i)(l)}}),[l]),U=Object(L.useMemo)((function(){return Ir(c,{size:j,format:S,margin:v,errorCorrection:k},_)}),[c,j,S,v,k,_]),T=Object(L.useMemo)((function(){return j+v}),[j,v]),R=Object(L.useMemo)((function(){if(!(T<500))return T<800?"lg":"xl"}),[T]);return Object(a.jsxs)(gr.a,{isOpen:o,toggle:i,centered:!0,size:R,children:[Object(a.jsxs)(Sr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(ar.a,{href:c,children:c})]}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)(kr.a,{children:[Object(a.jsxs)(Lr.a,{className:P()({"col-md-4":_.marginIsSupported&&_.svgIsSupported&&!_.errorCorrectionIsSupported,"col-md-6":_.errorCorrectionIsSupported||!_.marginIsSupported&&_.svgIsSupported||_.marginIsSupported&&!_.svgIsSupported,"col-12":!_.marginIsSupported&&!_.svgIsSupported&&!_.errorCorrectionIsSupported}),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))}})]}),_.marginIsSupported&&Object(a.jsxs)(Lr.a,{className:_.svgIsSupported&&!_.errorCorrectionIsSupported?"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))}})]}),_.svgIsSupported&&Object(a.jsx)(Lr.a,{className:_.marginIsSupported&&!_.errorCorrectionIsSupported?"col-md-4":"col-md-6",children:Object(a.jsx)(Fr,{format:S,setFormat:y})}),_.errorCorrectionIsSupported&&Object(a.jsx)(Lr.a,{className:"col-md-6",children:Object(a.jsx)(Ar,{errorCorrection:k,setErrorCorrection:w})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(ar.a,{href:U}),Object(a.jsx)(or,{text:U})]}),Object(a.jsx)("img",{src:U,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(p.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(U,"".concat(s,"-qr-code.").concat(S)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(F.a,{icon:I.q,className:"ml-1"})]})})})]})]})]})}},Gr=r(679),Pr=r(677),Br=r(678),Hr=r(707),Wr=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(L.useRef)(Object(Hr.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:P()("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})]})},qr=function(e){return Object(a.jsx)(Wr,Object(d.a)({type:"checkbox"},e))},zr=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(gr.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"})]})]})]})},Kr=function(){var e=Object(Q.c)(),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)(F.a,{icon:I.t,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(zr,{isOpen:r,toggle:n})]})},Qr=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(L.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(F.a,{icon:I.t})}),Object(a.jsx)(jr.a,{target:function(){return s.current},placement:n,children:c})]})},Jr=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(qr,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(Qr,{placement:"right",children:r})]})},Zr=Object(A.a)(Pr.a,Object(Br.a)(/ /g,"-")),Yr=function(e){return"string"===typeof e?Object(M.default)(e):e},Xr=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(L.useState)(o),b=Object(E.a)(j,2),h=b[0],O=b[1],v="edit"===c,f=Object(Ue.b)(Object(p.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=ce(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=ce(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Ue.c)(h.maxVisits)?Number(h.maxVisits):null,title:Object(Ue.c)(h.title)?h.title:void 0})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(L.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)(Gr.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))})},g=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]?Yr(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)(Gr.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(Zr)}))}})})]}),y=Object(wt.d)(l),C=!Object(wt.j)(l),k=Object(wt.k)(l),w=k||!v,_=P()("mb-3",{"col-sm-6":w,"col-sm-12":!w}),U=Object(wt.n)(l),T=Object(wt.b)(l),R=U||T||!v;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)(wr.a,{title:"Basic options",className:"mb-3",children:S}),Object(a.jsxs)(kr.a,{children:[w&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(wr.a,{title:"Customize the short URL",children:[k&&x("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(kr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:Object(Ue.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",Object(d.a)({min:4,disabled:C||Object(Ue.c)(h.customSlug)},C&&{title:"Shlink 2.1.0 or higher is required to be able to provide the short code length"}))})]}),!y&&x("domain","Domain","text"),y&&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:_,children:Object(a.jsxs)(wr.a,{title:"Limit access to the short URL",children:[x("maxVisits","Maximum number of visits allowed","number",{min:1}),g("validSince","Enabled since...",{maxDate:h.validUntil?Yr(h.validUntil):void 0}),g("validUntil","Enabled until...",{minDate:h.validSince?Yr(h.validSince):void 0})]})})]}),R&&Object(a.jsxs)(wr.a,{title:"Extra checks",className:"mb-3",children:[U&&Object(a.jsx)(Jr,{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"}),T&&Object(a.jsx)(Jr,{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)(qr,{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)(Kr,{})]})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Vr.a,{outline:!0,color:"primary",disabled:s||Object(N.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},$r=r(48),en=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,g=d.errorData,S=Ee(s).domain,y=Object(L.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]),C=Object(Q.c)(),N=Object(E.a)(C,4),k=N[0],w=N[2],_=N[3];return Object(L.useEffect)((function(){u(c.shortCode,S)}),[]),b?Object(a.jsx)($r.a,{loading:!0}):h?Object(a.jsx)(_r,{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)(ke.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)(F.a,{icon:I.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(ar.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(p.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:_(),j(v.shortCode,v.domain,t).then(w).catch(_);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),x&&Object(a.jsx)(_r,{type:"error",className:"mt-3",children:Object(a.jsx)(Ur,{errorData:g,fallbackMessage:"An error occurred while updating short URL :("})}),k&&Object(a.jsx)(_r,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},tn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",rn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",nn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",cn={loading:!1,error:!1},an=et((Ge={},Object(u.a)(Ge,tn,(function(){return{loading:!0,error:!1}})),Object(u.a)(Ge,rn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Ge,nn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},cn)})),Ge),cn),sn=function(e){return function(t,r){return function(){var n=Object(p.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:tn}),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 st(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:nn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:rn,errorData:lt(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},on=function(e,t){e.serviceFactory("ShortUrls",V,"SearchBar","ShortUrlsList"),e.decorator("ShortUrls",t(["shortUrlsList"])),e.serviceFactory("ShortUrlsList",cr,"ShortUrlsTable"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Er,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",fr,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",pr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Dr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",Xr,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",xr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",en,"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",Mr,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",ge,"ColorGenerator"),e.decorator("SearchBar",t(["shortUrlsListParams"],["listShortUrls"])),e.serviceFactory("listShortUrls",Ft,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return Bt})),e.serviceFactory("createShortUrl",Nt,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return kt})),e.serviceFactory("deleteShortUrl",ft,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return mt})),e.serviceFactory("getShortUrlDetail",sn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",Dt,"buildShlinkApiClient")},ln=r(304),un=r.n(ln),dn=r(61),jn=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(L.useRef)(null!==c&&void 0!==c?c:Object(Hr.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)}})]})},bn=function(e){return Object(a.jsx)(jn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},hn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(L.useState)(""),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(L.useState)(""),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(L.useState)(""),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(Ue.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(L.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)(wr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(bn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(bn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(bn,{value:v,onChange:f,children:"APIkey"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},On=function(e){var t=e.type;return Object(a.jsxs)(_r,{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."]})},vn=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)(dn.a,{children:[Object(a.jsxs)(hn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(Hr.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)(On,{type:"success"}),b&&Object(a.jsx)(On,{type:"error"})]})]})}},fn=function(e){return function(t){var r=t.servers,n=t.selectedServer,c=Object(Ne.a)(r),s=Object(a.jsxs)(W.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(F.a,{icon:I.C})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]});return Object(a.jsxs)(we.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(z.a,{nav:!0,caret:!0,children:[Object(a.jsx)(F.a,{icon:I.G})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(K.a,{right:!0,children:Object(N.a)(c)?s:Object(a.jsxs)(a.Fragment,{children:[c.map((function(e){var t=e.name,r=e.id;return Object(a.jsx)(W.a,{tag:o.b,to:"/server/".concat(r),active:Object(v.d)(n)&&n.id===r,children:t},r)})),Object(a.jsx)(W.a,{divider:!0}),s,Object(a.jsxs)(W.a,{className:"servers-dropdown__export-item",onClick:Object(p.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)(F.a,{icon:I.q})," ",Object(a.jsx)("span",{className:"ml-1",children:"Export servers"})]})]})})]})}},mn=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history;return Object(a.jsxs)(gr.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"})]})]})},pn=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(Q.c)(),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)(F.a,{icon:I.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})]})}},xn=r(150),gn=function(e){return Object(xn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history,c=n.push,s=n.goBack;if(!Object(v.d)(r))return null;return Object(a.jsx)(dn.a,{children:Object(a.jsxs)(hn,{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)},Sn=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(L.useRef)(),u=function(){var e=Object(p.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)(jr.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})]})}},yn=r(638),Cn=r(62),Nn="shlink/selectedServer/SELECT_SERVER",kn="shlink/selectedServer/RESET_SELECTED_SERVER",wn=Object(A.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Cn.c)("1.0.0")),_n=Object(yn.a)(Nr.a,function(){var e=Object(p.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(Cn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Un=et((Pe={},Object(u.a)(Pe,kn,(function(){return null})),Object(u.a)(Pe,Nn,(function(e,t){return t.selectedServer})),Pe),null),Tn=tt(kn),Rn=function(e,t){return function(r){return function(){var n=Object(p.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(Tn()),c(Bt()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:Nn,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:Nn,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:Nn,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)}}()}},Dn=r(680),En=r(151),Ln=r(329),Vn="shlink/servers/EDIT_SERVER",In="shlink/servers/DELETE_SERVER",Fn="shlink/servers/CREATE_SERVERS",An=et((Be={},Object(u.a)(Be,Fn,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Be,In,(function(e,t){var r=t.serverId;return Object(Dn.a)(r,e)})),Object(u.a)(Be,Vn,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(ct.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Be),{}),Mn=Object(En.a)((function(e,t){return Object(ct.a)(t.id,t,e)}),{}),Gn=Object(A.a)(Object(Ln.a)((function(e){return e.id?e:Object(ct.a)("id",Object(Hr.a)(),e)})),Mn,(function(e){return{type:Fn,newServers:e}})),Pn=function(e){return Gn([e])},Bn=function(e,t){return{type:Vn,serverId:e,serverData:t}},Hn=function(e){var t=e.id;return{type:In,serverId:t}},Wn=Object(A.a)(Object(O.a)("data"),(function(e){if(!Array.isArray(e))throw new Error("Value is not an array");return e})),qn=function(e){var t=e.get;return function(){return function(){var e=Object(p.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(Wn).catch((function(){return[]}));case 2:n=e.sent,r(Gn(n));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},zn=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.c)(n))return null;var s=n.version;return Object(Cn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},Kn=r(165),Qn=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(dn.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)($r.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.d)(n)&&"Could not find this Shlink server.",Object(v.d)(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)(Kn.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.d)(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"}),"."]})})]})})}},Jn=r(97),Zn=r(681),Yn=r(682),Xn=r(639),$n=r(640),ec=function(e,t,r){return De((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,p=h.loading,x=h.visitsCount,g=h.orphanVisitsCount,S=Object(v.d)(d)?d.id:"",y=Object(b.g)();return Object(L.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(kr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(ke.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsxs)(Yn.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.2.0",children:p?"Loading...":Yt(x)}),Object(a.jsx)(r,{maxVersion:"2.1.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.2 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(ke.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/orphan-visits"),children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(Yn.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:p?"Loading...":Yt(null!==g&&void 0!==g?g: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)(ke.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/list-short-urls/1"),children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(Yn.a,{tag:"h2",children:O?"Loading...":Yt(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)(ke.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/manage-tags"),children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(Yn.a,{tag:"h2",children:m?"Loading...":Yt(u.tags.length)})]})})]}),Object(a.jsxs)(ke.a,{className:"mb-3",children:[Object(a.jsxs)(Xn.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)($n.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(ke.a,{children:[Object(a.jsxs)(Xn.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)($n.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[Le.visits,Le.orphanVisits]}))},tc=["text/csv","text/comma-separated-values","application/csv"],rc=function(e){return!!e&&tc.includes(e.type)},nc=function e(t,r){var n=this;Object(x.a)(this,e),this.csvjson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(p.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(rc(t)){e.next=2;break}throw new Error("No file provided or file is not a CSV");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e){r.addEventListener("loadend",(function(t){var r,c,a,s=null!==(r=null===(c=t.target)||void 0===c||null===(a=c.result)||void 0===a?void 0:a.toString())&&void 0!==r?r:"",i=n.csvjson.toObject(s);e(i)})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},cc=r(98),ac=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(p.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(Dn.a)("id"));try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(cc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},sc=function(e,t,r){e.serviceFactory("CreateServer",vn,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",Jn.a),e.decorator("CreateServer",t(["selectedServer"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",gn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",fn,"ServersExporter"),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return mn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",pn,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Sn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return zn})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",Qn,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",ec,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",un.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",nc,"csvjson","fileReaderFactory"),e.service("ServersExporter",ac,"Storage","window","csvjson"),e.serviceFactory("selectServer",Rn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return Pn})),e.serviceFactory("createServers",(function(){return Gn})),e.serviceFactory("deleteServer",(function(){return Hn})),e.serviceFactory("editServer",(function(){return Bn})),e.serviceFactory("fetchServers",qn,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Tn}))},ic=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)(ke.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)(F.a,{icon:I.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)(vr,{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})]})})},oc=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)(ar.a,{href:u})]});return Object(a.jsxs)(ic,{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)(dr,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(jr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(dr,{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)(ar.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},lc=r(700),uc=r(652),dc=r(701),jc=r(650),bc=r(122),hc=r(706),Oc=r(685),vc=r(686),fc=r(683),mc=r(687),pc=r(688),xc=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(we.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(K.a,{right:!0,children:[r.map((function(e){return Object(a.jsxs)(W.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},gc=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!er(e)&&n(e)}};return Object(a.jsxs)(qt.a,{listClassName:P()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(Ht.a,{disabled:r<=1,children:Object(a.jsx)(Wt.a,{previous:!0,tag:"span",onClick:i(r-1)})}),$t(r,t).map((function(e,t){return Object(a.jsx)(Ht.a,{disabled:er(e),active:r===e,children:Object(a.jsx)(Wt.a,{tag:"span",onClick:i(e),children:tr(e)})},rr(e,t))})),Object(a.jsx)(Ht.a,{disabled:r>=t,children:Object(a.jsx)(Wt.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},Sc=r(684),yc=r(126),Cc=r(305),Nc=r.n(Cc),kc="Others",wc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],_c=function(e){var t,r;return Object(Ue.c)(e)?null!==(t=null===(r=e.split("/")[e.includes("://")?2:0])||void 0===r?void 0:r.split(":")[0])&&void 0!==t?t:"":"Direct"},Uc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(fc.a)(t,t.map((function(){return 0})))),e))},Tc=function(e,t){e.target.style.cursor=t[0]?"pointer":"default"},Rc=function(e){return function(t,r){var n,c=r.datasets,a=t.datasetIndex,s=t[e],i=void 0!==a&&(null===c||void 0===c||null===(n=c[a])||void 0===n?void 0:n.label)||"";return"".concat(i,": ").concat(Yt(Number(s)))}},Dc=function(e,t){var r,n,c=e.datasetIndex,a=e.index,s=t.labels,i=t.datasets,o=void 0!==a&&(null===s||void 0===s?void 0:s[a])||"",l=void 0!==c&&void 0!==a&&(null===i||void 0===i||null===(r=i[c])||void 0===r||null===(n=r.data)||void 0===n?void 0:n[a])||"";return"".concat(o,": ").concat(Yt(Number(l)))},Ec=r(44),Lc=function(e){return e.startsWith("hidden")?"":e},Vc=function(e){var t,r,n=e.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=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor,d=Object(E.a)(l,1)[0].backgroundColor;return Object(a.jsx)("ul",{className:"default-chart__pie-chart-legend",children:i.map((function(e,t){return Object(a.jsxs)("li",{className:"default-chart__pie-chart-legend-item d-flex",children:[Object(a.jsx)("div",{className:"default-chart__pie-chart-legend-item-color",style:{backgroundColor:d[t]||u}}),Object(a.jsx)("small",{className:"default-chart__pie-chart-legend-item-text flex-fill",children:e})]},e)}))})},Ic=function(e){return function(t){var r=Object(E.a)(t,1)[0];if(e&&r){var n=r._index,c=r._chart.data.labels;e(null===c||void 0===c?void 0:c[n])}}},Fc=function(e){return!!e&&Object.keys(e).length>0},Ac=function(e){var t=e.title,r=e.isBarChart,n=void 0!==r&&r,c=e.stats,s=e.max,i=e.highlightedStats,o=e.highlightedLabel,l=e.onClick,u=n?yc.HorizontalBar:yc.Doughnut,j=Object(Ce.a)(c).map(Lc),b=Object(Ne.a)(Fc(i)?Object(Ce.a)(i).reduce((function(e,t){return e[t]&&(e[t]-=i[t]),e}),Object(d.a)({},c)):c),h=Fc(i)?Uc(i,j):void 0,O=Object(L.useState)(),v=Object(E.a)(O,2),f=v[0],m=v[1],p={legend:{display:!1},legendCallback:!n&&Vc,scales:n?{xAxes:[{ticks:{beginAtZero:!0,precision:0,callback:Yt,max:s},stacked:!0}],yAxes:[{stacked:!0}]}:void 0,tooltips:{intersect:!n,filter:function(e){var t=e.yLabel;return!n||""!==t},callbacks:{label:n?Rc("xLabel"):Dc}},onHover:n?Tc:void 0},x=function(e,t,r,n,c,a){return{labels:r,datasets:[{title:e,label:c?"Non-selected":"Visits",data:n,backgroundColor:t?Ec.d:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:t?Ec.c:Object(Ec.h)()?Ec.e:Ec.f,borderWidth:2},c&&{title:e,label:null!==a&&void 0!==a?a:"Selected",data:c,backgroundColor:Ec.b,borderColor:Ec.a,borderWidth:2}].filter(Boolean)}}(t,n,j,b,h,o),g=function(e,t){return e?e&&t.length>20?8*t.length:void 0:300}(n,j);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:P()("col-sm-12",{"col-md-7":!n}),children:Object(a.jsx)(u,{ref:function(e){return m(null!==e&&void 0!==e?e:void 0)},data:x,options:p,height:g,getElementAtEvent:Ic(l)},g)}),!n&&Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:null===f||void 0===f?void 0:f.chartInstance.generateLegend()})]})},Mc=function(e){var t=e.title,r=e.footer,n=Object(br.a)(e,["title","footer"]);return Object(a.jsxs)(ke.a,{children:[Object(a.jsx)(Xn.a,{className:"graph-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)($n.a,{children:Object(a.jsx)(Ac,Object(d.a)({title:t},n))}),r&&Object(a.jsx)(Sc.a,{className:"graph-card__footer--sticky",children:r})]})},Gc=function(e){return"String"===Object(bc.a)(e)?Object(hc.a)(e):e},Pc=function(e){return Object(E.a)(e,1)[0]},Bc=function(e){return Object(E.a)(e,2)[1]},Hc=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(br.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(L.useState)({orderField:void 0,orderDir:void 0}),j=Object(E.a)(u,2),b=j[0],h=j[1],O=Object(L.useState)(1),v=Object(E.a)(O,2),f=v[0],m=v[1],p=Object(L.useState)(50),x=Object(E.a)(p,2),g=x[0],S=x[1],y=function(e){var t=e[f-1];if(f0?r:void 0,c),N=C.currentPageStats,k=C.currentPageHighlightedStats,w=C.pagination,_=C.max,U=Object.keys(N);return Object(a.jsx)(Mc,Object(d.a)({isBarChart:!0,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)(xc,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:g,setValue:function(e){S(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(w?U:void 0)})]})},stats:N,highlightedStats:k,footer:w,max:_},l))},Wc=r(692),qc=r(693),zc=r(694),Kc=r(689),Qc=r(306),Jc=r(690),Zc=r(331),Yc=r(85),Xc=r(691),$c=r(695),ea=function(e){return Object(a.jsx)(Wr,Object(d.a)({type:"switch"},e))},ta={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},ra={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},na={hourly:Kc.a,daily:Qc.a,weekly:Jc.a,monthly:Zc.a},ca={hourly:function(e){return Object(ee.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(ee.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(ee.default)(Object(Yc.a)(e),"yyyy-MM-dd"),r=Object(ee.default)(Object(Xc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(ee.default)(e,"yyyy-MM")}},aa=function(e,t){return Object(zc.a)((function(t){return ca[e](Object(M.default)(t.date))}),t)},sa=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=na[e],n=ca[e],c=Object(M.default)(t[0].date),a=Object(M.default)(t[t.length-1].date),s=r(c,a),i=ra[e];return[n(a)].concat(Object(Se.a)(Object(Ue.e)(s,(function(e){return n(Object($c.a)(a,i(e)))}))))}(r,e);return[c,Uc(t,c)]},ia=function(e,t,r){return{label:t,data:e,fill:!1,lineTension:.2,borderColor:r,backgroundColor:r}},oa=null,la=function(e,t){return function(r){var n=Object(E.a)(r,1)[0];if(t&&n){var c,a=n._index,s=n._chart.data.labels;if(oa===s[a])t([]),oa=null;else t(s[a]&&e[s[a]]||[]),oa=null!==(c=s[a])&&void 0!==c?c:null}}},ua=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(L.useState)(r.length>0?function(e){var t,r=new Date,n=Object(M.default)(e);return null!==(t=Object(Wc.a)([[function(){return Object(Qc.a)(r,n)<=2},Object(qc.a)("hourly")],[function(){return Object(Zc.a)(r,n)<=1},Object(qc.a)("daily")],[function(){return Object(Zc.a)(r,n)<=6},Object(qc.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(Q.c)(!0),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(L.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=ca[e](Object(M.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(L.useMemo)((function(){return aa(u,Object(vc.a)(r))}),[u,r]),m=Object(L.useMemo)((function(){return sa(r,f,u,h)}),[r,u,h]),p=Object(E.a)(m,2),x=p[0],g=p[1],S=Object(L.useMemo)((function(){return Uc(aa(u,Object(vc.a)(n)),x)}),[n,u,x]),y={labels:x,datasets:[ia(g,"Visits",Ec.c),n.length>0&&ia(S,s,Ec.a)].filter(Boolean)},C={maintainAspectRatio:!1,legend:{display:!1},scales:{yAxes:[{ticks:{beginAtZero:!0,precision:0,callback:Yt}}],xAxes:[{scaleLabel:{display:!0,labelString:ta[u]}}]},tooltips:{intersect:!1,axis:"x",callbacks:{label:Rc("yLabel")}},onHover:Tc};return Object(a.jsxs)(ke.a,{children:[Object(a.jsxs)(Xn.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(we.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(K.a,{right:!0,children:Object.entries(ta).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(W.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)(ea,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsx)($n.a,{className:"line-chart-card__body",children:Object(a.jsx)(yc.Line,{data:y,options:C,getElementAtEvent:la(v,i)})})]})},da=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(br.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)}))},ja=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(L.useState)(h()),v=Object(E.a)(O,2),f=v[0],m=v[1],p=Object(L.useState)(void 0),x=Object(E.a)(p,2),g=x[0],S=x[1],y=Object(L.useState)({field:void 0,dir:void 0}),C=Object(E.a)(y,2),N=C[0],k=C[1],w=Object(L.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?da(t,e):Object(Se.a)(e)),c=n.length;return{visitsGroups:Object(pc.a)(20,n),total:c}}(n,g,N)}),[g,N]),_=Object(L.useRef)(!0),U=Object(L.useState)(1),T=Object(E.a)(U,2),R=T[0],D=T[1],V=20*R,A=V-20,M=Object(wt.a)(o),G=7+Number(M)+Number(j),H=function(e){return function(){return k({field:e,dir:Object(Ue.a)(e,N.field,N.dir)})}},W=function(e){return N.dir&&N.field===e&&Object(a.jsx)(F.a,{icon:"ASC"===N.dir?I.f:I.e,className:"visits-table__header-icon"})};return Object(L.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(L.useEffect)((function(){D(1),!_.current&&i([]),_.current=!1}),[g]),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.length0})})}),M&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(F.a,{icon:I.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:G,className:"p-0",children:Object(a.jsx)(B,{noBorder:!0,large:!1,onChange:S})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=w.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,className:"text-center",children:"No visits found with current filtering"})}),null===(r=w.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:P()({"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)(F.a,{icon:I.h,className:"text-primary"})}),M&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(F.a,{icon:I.E,id:"botIcon".concat(t)}),Object(a.jsx)(jr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(dr,{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)}))]}),w.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,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)(gc,{pagesCount:Math.ceil(w.total/20),currentPage:R,setCurrentPage:D,centered:f})}),Object(a.jsx)("div",{className:P()("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:Yt(A+1)})," to"," ",Object(a.jsx)("b",{children:Yt(Object(Qt.a)(V,w.total))})," of"," ",Object(a.jsx)("b",{children:Yt(w.total)})]})})]})})})})]})},ba=r(713),ha=r(696),Oa=r(697),va=r(698),fa=function(){return Object(a.jsx)(ba.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ma=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}},pa=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(gr.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)(ha.a,Object(d.a)(Object(d.a)({},ma(s)),{},{children:[Object(a.jsx)(fa,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Oa.a,{position:n,children:Object(a.jsxs)(va.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},xa=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(Q.c)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(Q.c)(),j=Object(E.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(L.useState)([]),f=Object(E.a)(v,2),m=f[0],p=f[1],x=Object(L.useRef)(),g=function(e){return function(){p(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 p(c),void l();O()},children:Object(a.jsx)(F.a,{icon:I.w})}),Object(a.jsx)(jr.a,{placement:"left",target:function(){return x.current},children:"Show in map"}),Object(a.jsx)(q.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(K.a,{right:!0,children:[Object(a.jsx)(W.a,{onClick:g(!1),children:"Show all locations"}),Object(a.jsx)(W.a,{onClick:g(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(pa,{toggle:u,isOpen:o,title:t,locations:m})]})},ga=r(699),Sa=function(e){return e.hasOwnProperty("visitedUrl")},ya=Object(A.a)(Object(ga.a)((function(e){return Sa(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),Ca=function(e,t){return Object(zc.a)(Object(O.a)(t),e)},Na=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)&&ce(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)&&ce(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}},ka=function(e,t){return!Object(C.a)(e)&&Object(Ue.c)(e[t])},wa=function(e){return"number"===typeof e?e:e?parseFloat(e):0},_a=function(e){return function(t,r){var n=ka(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Ua=_a("country"),Ta=_a("city"),Ra=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),Ua(e.countries,t),Ta(e.cities,t),function(e,t){if(ka(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[wa(n),wa(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:{}})},Da=Object(Ln.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.c)(e))return{browser:kc,os:kc};var t=Nc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:kc,browser:r&&wc.includes(r)?r:kc}}(t)),{},{referer:_c(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 Sa(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Ea=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)(J,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Bots:"}),Object(a.jsx)(W.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)(W.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!Object(Ue.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},La={byTime:{title:"By time",subPath:"",icon:I.d},byContext:{title:"By context",subPath:"/by-context",icon:I.g},byLocation:{title:"By location",subPath:"/by-location",icon:I.w},list:{title:"List",subPath:"/list",icon:I.v}},Va=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(uc.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)(F.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},Ia=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(L.useState)(je(f)),p=Object(E.a)(m,2),x=p[0],g=p[1],S=Object(L.useState)([]),y=Object(E.a)(S,2),C=y[0],k=y[1],w=Object(L.useState)(),_=Object(E.a)(w,2),U=_[0],T=_[1],R=Object(L.useState)({}),D=Object(E.a)(R,2),V=D[0],A=D[1],M=Object(wt.a)(h),G=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(L.useMemo)((function(){return Da(B)}),[B]),J=Object(L.useMemo)((function(){return Ra(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){He=void 0,k(e)},ae=function(e){return function(t){var r="".concat(e,"_").concat(t);He===r?(k([]),T(void 0),He=void 0):(k(Q.filter(Object(lc.a)(e,t))),T(t),He=r)}};Object(L.useEffect)((function(){return i}),[]),Object(L.useEffect)((function(){s({dateRange:x,filter:V})}),[x,V]);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)(pe,{disabled:H,initialDateRange:f,defaultText:"All visits",onDatesChange:g})}),Object(a.jsx)(Ea,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:M,selected:V,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===C.length,className:"btn-md-block mr-2",onClick:function(){return ce([])},children:["Clear selection ",C.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",C.length,")"]})]}),Object(a.jsxs)(Vr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j(Q)},children:[Object(a.jsx)(F.a,{icon:I.q})," Export (",Q.length,")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:W?Object(a.jsxs)($r.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(dc.a,{value:K,striped:100===K,className:"mt-3"})]}):H?Object(a.jsx)($r.a,{loading:!0}):q?Object(a.jsx)(_r,{type:"error",children:Object(a.jsx)(Ur,{errorData:z,fallbackMessage:"An error occurred while loading visits :("})}):Object(N.a)(B)?Object(a.jsx)($r.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(ke.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(jc.a,{pills:!0,fill:!0,children:Object.entries(La).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(Va,Object(d.a)(Object(d.a)({},n),{},{to:G(n.subPath)}),r)}))})}),Object(a.jsx)(kr.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)(ua,{title:"Visits during time",visits:Q,highlightedVisits:C,highlightedLabel:U,setSelectedVisits:ce})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(La.byContext.subPath),children:[Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Mc,{title:"Operating systems",stats:Z})}),Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Mc,{title:"Browsers",stats:Y})}),Object(a.jsx)("div",{className:P()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(Hc,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:Ca(C,"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)(Hc,{title:"Visited URLs",stats:re,highlightedLabel:U,highlightedStats:Ca(C,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ae("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(La.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Hc,{title:"Countries",stats:$,highlightedStats:Ca(C,"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)(Hc,{title:"Cities",stats:ee,highlightedStats:Ca(C,"city"),highlightedLabel:U,extraHeaderContent:function(e){return ne.length>0&&Object(a.jsx)(xa,{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(La.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(ja,{visits:Q,selectedVisits:C,setSelectedVisits:ce,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},Fa=function(e){var t=e.exportVisits;return De((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=Ee(i).domain;return Object(L.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(Ia,{getVisits:function(e){return u(v,Object(d.a)(Object(d.a)({},Na(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)(oc,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[Le.shortUrlVisits(t.params.shortCode)]}))},Aa=r(711),Ma=5e3,Ga=function(e){return e.currentPage>=e.pagesCount},Pa=function(e,t){return 100*t/e},Ba=function(){var e=Object(p.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(p.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(p.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,Ma).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(Aa.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i=function(){var e=Object(p.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:Pa(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,Ma);case 3:if(a=e.sent,s=a.pagination,o=a.data,s&&!Ga(s)){e.next=8;break}return e.abrupt("return",o);case 8:return l=Object(zt.a)(2,s.pagesCount+1),u=Object(pc.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:lt(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)}}(),Ha="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",Wa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",za="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",Ka="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",Qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",Ja={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Za=et((We={},Object(u.a)(We,Ha,(function(){return Object(d.a)(Object(d.a)({},Ja),{},{loading:!0})})),Object(u.a)(We,Wa,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ja),{},{error:!0,errorData:r})})),Object(u.a)(We,qa,(function(e,t){var r=t.visits,n=t.shortCode,c=t.domain;return Object(d.a)(Object(d.a)({},Ja),{},{visits:r,shortCode:n,domain:c})})),Object(u.a)(We,za,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(We,Ka,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(We,Qa,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(We,it,(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&&st(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))})})),We),Ja),Ya=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(p.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(p.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:Ha,large:za,finish:qa,error:Wa,progress:Qa},n.abrupt("return",Ba(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},Xa=tt(Ka),$a=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)(H,{text:s,colorGenerator:n})]});return Object(a.jsx)(ic,{title:i,goBack:r,visits:c})},es=function(e,t){var r=t.exportVisits;return De((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)(Ia,{getVisits:function(e){return o(b,Na(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)($a,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[Le.visits]}))},ts="shlink/tagVisits/GET_TAG_VISITS_START",rs="shlink/tagVisits/GET_TAG_VISITS_ERROR",ns="shlink/tagVisits/GET_TAG_VISITS",cs="shlink/tagVisits/GET_TAG_VISITS_LARGE",as="shlink/tagVisits/GET_TAG_VISITS_CANCEL",ss="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",is={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},os=et((qe={},Object(u.a)(qe,ts,(function(){return Object(d.a)(Object(d.a)({},is),{},{loading:!0})})),Object(u.a)(qe,rs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},is),{},{error:!0,errorData:r})})),Object(u.a)(qe,ns,(function(e,t){var r=t.visits,n=t.tag;return Object(d.a)(Object(d.a)({},is),{},{visits:r,tag:n})})),Object(u.a)(qe,cs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(qe,as,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(qe,ss,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(qe,it,(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))})})),qe),is),ls=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(p.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(p.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:ts,large:cs,finish:ns,error:rs,progress:ss},n.abrupt("return",Ba(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},us=tt(as),ds=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(ic,{title:"Orphan visits",goBack:r,visits:n})},js=function(e){var t=e.exportVisits;return De((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)(Ia,{getVisits:function(e){var t;return c(Na(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)(ds,{orphanVisits:s,goBack:r})})}),(function(){return[Le.orphanVisits]}))},bs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",hs="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",Os="shlink/orphanVisits/GET_ORPHAN_VISITS",vs="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",fs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",ms="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",ps={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},xs=et((ze={},Object(u.a)(ze,bs,(function(){return Object(d.a)(Object(d.a)({},ps),{},{loading:!0})})),Object(u.a)(ze,hs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ps),{},{error:!0,errorData:r})})),Object(u.a)(ze,Os,(function(e,t){var r=t.visits;return Object(d.a)(Object(d.a)({},ps),{},{visits:r})})),Object(u.a)(ze,vs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(ze,fs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(ze,ms,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(ze,it,(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))})})),ze),ps),gs=function(e,t){return!t||t===e.type},Ss=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(p.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(p.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 Sa(e)&&gs(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:bs,large:vs,finish:Os,error:hs,progress:ms},n.abrupt("return",Ba(o,{},u,c,l));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},ys=tt(fs),Cs="shlink/visitsOverview/GET_OVERVIEW_START",Ns="shlink/visitsOverview/GET_OVERVIEW_ERROR",ks="shlink/visitsOverview/GET_OVERVIEW",ws={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},_s=et((Ke={},Object(u.a)(Ke,Cs,(function(){return Object(d.a)(Object(d.a)({},ws),{},{loading:!0})})),Object(u.a)(Ke,Ns,(function(){return Object(d.a)(Object(d.a)({},ws),{},{error:!0})})),Object(u.a)(Ke,ks,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},ws),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(Ke,it,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(br.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=ya(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),Ke),ws),Us=function(e){return function(){return function(){var t=Object(p.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:Cs}),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:Ns});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Ts=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(cc.a)(n.window,r,e)}}},Rs=function(e,t){e.serviceFactory("MapModal",(function(){return pa})),e.serviceFactory("ShortUrlVisits",Fa,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",es,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",js,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",Ts,"window","csvjson"),e.serviceFactory("getShortUrlVisits",Ya,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return Xa})),e.serviceFactory("getTagVisits",ls,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return us})),e.serviceFactory("getOrphanVisits",Ss,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return ys})),e.serviceFactory("createNewVisits",(function(){return ot})),e.serviceFactory("loadVisitsOverview",Us,"buildShlinkApiClient")},Ds=r(307),Es=r.n(Ds),Ls=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},Vs=function(e){return{id:e,name:e}},Is=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(L.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)(Es.a,{tags:c.map(Vs),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(H,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map(Vs),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Ls,{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(","))))))}})}},Fs=r(649),As=function(e,t,r,n){return function(c){var s=c.tag,i=c.tagStats,l=c.selectedServer,u=c.displayed,d=c.toggle,j=Object(Q.c)(),b=Object(E.a)(j,2),h=b[0],O=b[1],f=Object(Q.c)(),m=Object(E.a)(f,2),p=m[0],x=m[1],g=Object(Q.c)(),S=Object(E.a)(g,3),y=S[0],C=S[2],N=Object(L.useRef)(),k=Object(v.d)(l)?l.id:"",w="/server/".concat(k,"/list-short-urls/1?tag=").concat(s);return Object(L.useEffect)((function(){var e;(e=N.current)&&e.scrollWidth>e.clientWidth&&C()}),[N.current]),Object(a.jsxs)(ke.a,{className:"tag-card",children:[Object(a.jsxs)(Xn.a,{className:"tag-card__header",children:[Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:O,children:Object(a.jsx)(F.a,{icon:I.N})}),Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:x,children:Object(a.jsx)(F.a,{icon:I.B})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:y?s:void 0,ref:function(e){N.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(Ls,{tag:s,colorGenerator:n}),Object(a.jsx)(r,{minVersion:"2.2.0",children:Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:d,children:s})}),Object(a.jsx)(r,{maxVersion:"2.1.*",children:Object(a.jsx)(o.b,{to:w,children:s})})]})]}),i&&Object(a.jsx)(Fs.a,{isOpen:u,children:Object(a.jsxs)($n.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:w,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)(F.a,{icon:I.u,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:Yt(i.shortUrlsCount)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(k,"/tag/").concat(s,"/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)(F.a,{icon:I.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:Yt(i.visitsCount)})]})]})}),Object(a.jsx)(e,{tag:s,toggle:O,isOpen:h}),Object(a.jsx)(t,{tag:s,toggle:x,isOpen:p})]})}},Ms=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(p.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)(gr.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)(_r,{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"})]})]})},Gs=r(702),Ps=r(320),Bs=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(L.useState)(r),u=Object(E.a)(l,2),d=u[0],j=u[1],b=Object(L.useState)(t(r)),h=Object(E.a)(b,2),O=h[0],v=h[1],f=Object(Q.c)(),x=Object(E.a)(f,4),g=x[0],S=x[1],y=x[3],C=o.editing,N=o.error,k=o.errorData,w=Object(Ue.b)(Object(p.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)(gr.a,{isOpen:i,toggle:c,centered:!0,onClosed:y,children:Object(a.jsxs)("form",{onSubmit:w,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)(F.a,{icon:I.z,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(Gs.a,{isOpen:g,toggle:S,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(Ps.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)("input",{type:"text",value:d,placeholder:"Tag",required:!0,className:"form-control",onChange:function(e){return j(e.target.value)}})]}),N&&Object(a.jsx)(_r,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:k,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-link",onClick:c,children:"Cancel"}),Object(a.jsx)("button",{type:"submit",className:"btn btn-primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},Hs=Math.ceil,Ws=function(e){return De((function(t){var r=t.filterTags,n=t.forceListTags,c=t.tagsList,s=t.selectedServer,i=Object(L.useState)(),o=Object(E.a)(i,2),l=o[0],u=o[1];if(Object(L.useEffect)((function(){n()}),[]),c.loading)return Object(a.jsx)($r.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:r}),function(){if(c.error)return Object(a.jsx)(_r,{type:"error",children:Object(a.jsx)(Ur,{errorData:c.errorData,fallbackMessage:"Error loading tags :("})});var t=c.filteredTags.length;if(t<1)return Object(a.jsx)($r.a,{children:"No tags found"});var r=Object(pc.a)(Hs(t/4),c.filteredTags);return Object(a.jsx)(kr.a,{children:r.map((function(t,r){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:c.stats[t],selectedServer:s,displayed:l===t,toggle:function(){return u(l!==t?t:void 0)}},t)}))},r)}))})}()]})}),(function(){return[Le.visits]}))},qs="shlink/deleteTag/DELETE_TAG_START",zs="shlink/deleteTag/DELETE_TAG_ERROR",Ks="shlink/deleteTag/DELETE_TAG",Qs="shlink/deleteTag/TAG_DELETED",Js=et((Qe={},Object(u.a)(Qe,qs,(function(){return{deleting:!0,error:!1}})),Object(u.a)(Qe,zs,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Qe,Ks,(function(){return{deleting:!1,error:!1}})),Qe),{deleting:!1,error:!1}),Zs=function(e){return function(t){return function(){var r=Object(p.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:qs}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:Ks}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:zs,errorData:lt(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},Ys=function(e){return{type:Qs,tag:e}},Xs="shlink/editTag/EDIT_TAG_START",$s="shlink/editTag/EDIT_TAG_ERROR",ei="shlink/editTag/EDIT_TAG",ti="shlink/editTag/TAG_EDITED",ri=et((Je={},Object(u.a)(Je,Xs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(Je,$s,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(Je,ei,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),Je),{oldName:"",newName:"",editing:!1,error:!1}),ni=function(e,t){return function(r,n,c){return function(){var a=Object(p.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:Xs}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:ei,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:$s,errorData:lt(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},ci=function(e,t,r){return{type:ti,oldName:e,newName:t,color:r}},ai="shlink/tagsList/LIST_TAGS_START",si="shlink/tagsList/LIST_TAGS_ERROR",ii="shlink/tagsList/LIST_TAGS",oi="shlink/tagsList/FILTER_TAGS",li={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},ui=function(e,t){return function(r){return r===e?t:r}},di=function(e,t){return Object(y.a)((function(e){return e===t}),e)},ji=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}),{}))},bi=et((Ze={},Object(u.a)(Ze,ai,(function(){return Object(d.a)(Object(d.a)({},li),{},{loading:!0})})),Object(u.a)(Ze,si,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},li),{},{error:!0,errorData:r})})),Object(u.a)(Ze,ii,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},li),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(Ze,Qs,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:di(e.tags,r),filteredTags:di(e.filteredTags,r)})})),Object(u.a)(Ze,ti,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(ui(r,n)).sort(),filteredTags:e.filteredTags.map(ui(r,n)).sort()})})),Object(u.a)(Ze,oi,(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)(Ze,it,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=ji(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)))})})),Ze),li),hi=function(e){return{type:oi,searchTerm:e}},Oi=function(e,t){e.serviceFactory("TagsSelector",Is,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",As,"DeleteTagConfirmModal","EditTagModal","ForServerVersion","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return Ms})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Bs,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsList",Ws,"TagCard"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo"],["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(p.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(N.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:ai}),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:ii}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:si,errorData:lt(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 hi})),e.serviceFactory("tagDeleted",(function(){return Ys})),e.serviceFactory("tagEdited",(function(){return ci})),e.serviceFactory("deleteTag",Zs,"buildShlinkApiClient"),e.serviceFactory("editTag",ni,"buildShlinkApiClient","ColorGenerator")},vi=r(312),fi="shlink/mercure/GET_MERCURE_INFO_START",mi="shlink/mercure/GET_MERCURE_INFO_ERROR",pi="shlink/mercure/GET_MERCURE_INFO",xi=et((Ye={},Object(u.a)(Ye,fi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ye,mi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(Ye,pi,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),Ye),{loading:!0,error:!1}),gi=function(e){return function(){return function(){var t=Object(p.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:fi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:mi}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:pi,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:mi});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},Si=function(e){e.serviceFactory("loadMercureInfo",gi,"buildShlinkApiClient")},yi=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(wr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(ea,{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:P()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(Gr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){return c(Number(e.target.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."]})]})]})},Ci=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(kr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},Ni=function(e,t,r,n){return function(){return Object(a.jsx)(dn.a,{children:Object(a.jsx)(Ci,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},ki=r(709),wi="shlink/realTimeUpdates/SET_SETTINGS",_i=et(Object(u.a)({},wi,(function(e,t){return Object(ki.a)(e,Object(Dn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),Ui=function(e){return{type:wi,realTimeUpdates:{enabled:e}}},Ti=function(e){return{type:wi,realTimeUpdates:{interval:e}}},Ri=function(e){return{type:wi,shortUrlCreation:e}},Di=function(e){return{type:wi,ui:e}},Ei=function(e){return{type:wi,visits:e}},Li=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},Vi=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)(wr.a,{title:"Short URLs creation",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(ea,{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)(J,{text:Li(i.tagFilteringMode),children:[Object(a.jsx)(W.a,{active:!i.tagFilteringMode||"startsWith"===i.tagFilteringMode,onClick:o("startsWith"),children:Li("startsWith")}),Object(a.jsx)(W.a,{active:"includes"===i.tagFilteringMode,onClick:o("includes"),children:Li("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."]}))})]})]})},Ii=function(e){var t=e.settings.ui,r=e.setUiSettings;return Object(a.jsxs)(wr.a,{title:"User interface",className:"h-100",children:[Object(a.jsx)(F.a,{icon:"dark"===(null===t||void 0===t?void 0:t.theme)?I.y:I.J,className:"user-interface__theme-icon"}),Object(a.jsx)(ea,{checked:"dark"===(null===t||void 0===t?void 0:t.theme),onChange:function(e){var t=e?"dark":"light";r({theme:t}),Object(Ec.g)(t)},children:"Use dark theme."})]})},Fi=function(e){var t,r=e.onChange,n=e.active;return Object(a.jsx)(J,{text:null!==(t=ue(n))&&void 0!==t?t:"",children:Object(a.jsx)(me,{active:n,onChange:r})})},Ai=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(wr.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)(Fi,{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})}})]})})},Mi=function(e,t){e.serviceFactory("Settings",Ni,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",Jn.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return yi})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return Vi})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return Ii})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return Ai})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return Ui})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return Ti})),e.serviceFactory("setShortUrlCreationSettings",(function(){return Ri})),e.serviceFactory("setUiSettings",(function(){return Di})),e.serviceFactory("setVisitsSettings",(function(){return Ei}))},Gi="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Pi=function(e){return function(t,r){return function(){var n=Object(p.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:Gi,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:lt(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},Bi="shlink/domainsList/LIST_DOMAINS_START",Hi="shlink/domainsList/LIST_DOMAINS_ERROR",Wi="shlink/domainsList/LIST_DOMAINS",qi="shlink/domainsList/FILTER_DOMAINS",zi={domains:[],filteredDomains:[],loading:!1,error:!1},Ki=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},Qi=et((Xe={},Object(u.a)(Xe,Bi,(function(){return Object(d.a)(Object(d.a)({},zi),{},{loading:!0})})),Object(u.a)(Xe,Hi,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},zi),{},{error:!0,errorData:t})})),Object(u.a)(Xe,Wi,(function(e,t){var r=t.domains;return Object(d.a)(Object(d.a)({},zi),{},{domains:r,filteredDomains:r})})),Object(u.a)(Xe,qi,(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)(Xe,Gi,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(Ki(r,n)),filteredDomains:e.filteredDomains.map(Ki(r,n))})})),Xe),zi),Ji=function(e){return function(){return function(){var t=Object(p.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:Bi}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,r({type:Wi,domains:s}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),r({type:Hi,errorData:lt(t.t0)});case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Zi=function(e){return{type:qi,searchTerm:e}},Yi=r(704),Xi=r(714),$i=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(Q.c)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(N.a)(r),b=function(){return c("")};return Object(L.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(Yi.a,{children:[Object(a.jsx)(Gr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(Xi.a,{addonType:"append",children:[Object(a.jsx)(Vr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(A.a)(b,u),children:Object(a.jsx)(F.a,{icon:I.O})}),Object(a.jsx)(jr.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(J,{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)(W.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)(W.a,{divider:!0}),Object(a.jsx)(W.a,{onClick:Object(A.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},eo=function(e){var t=e.isLast,r=Object(br.a)(e,["isLast"]);return Object(a.jsx)(jn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},to=function(e){var t=e.isOpen,r=e.toggle,n=e.domain,c=e.editDomainRedirects,s=Object(L.useState)(""),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(L.useState)(""),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(L.useState)(""),O=Object(E.a)(h,2),v=O[0],f=O[1],x=Object(Ue.b)(Object(p.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(n.domain,{baseUrlRedirect:Object(Ue.d)(o),regular404Redirect:Object(Ue.d)(j),invalidShortUrlRedirect:Object(Ue.d)(v)}).then(r));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(gr.a,{isOpen:t,toggle:r,centered:!0,children:Object(a.jsxs)("form",{onSubmit:x,children:[Object(a.jsxs)(Sr.a,{toggle:r,children:["Edit redirects for ",Object(a.jsx)("b",{children:n.domain})]}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)(eo,{value:o,onChange:l,children:[Object(a.jsxs)(Qr,{className:"mr-2",placement:"bottom",children:["Visitors accessing the base url, as in ",Object(a.jsxs)("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),Object(a.jsxs)(eo,{value:j,onChange:b,children:[Object(a.jsxs)(Qr,{className:"mr-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",Object(a.jsxs)("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),Object(a.jsxs)(eo,{value:v,isLast:!0,onChange:f,children:[Object(a.jsx)(Qr,{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:r,children:"Cancel"}),Object(a.jsx)(Vr.a,{color:"primary",children:"Save"})]})]})})},ro=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)"})]})]})},no=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(F.a,{icon:I.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(jr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},co=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=Object(Q.c)(),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)(no,{}):""}),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)(ro,{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)(ro,{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)(ro,{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)(F.a,{icon:b?I.b:I.m})})}),b&&Object(a.jsxs)(jr.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)(to,{domain:c,isOpen:u,toggle:d,editDomainRedirects:s})]})},ao=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],so=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(L.useEffect)((function(){r()}),[]),o)return Object(a.jsx)($r.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:c}),l?Object(a.jsx)(_r,{type:"error",children:Object(a.jsx)(Ur,{errorData:u,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(wr.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:ao.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:ao.length,className:"text-center",children:"No results found"})}),i.map((function(e){return Object(a.jsx)(co,{domain:e,editDomainRedirects:s,defaultRedirects:d},e.domain)}))]})]})})]})},io=function(e,t){e.serviceFactory("DomainSelector",(function(){return $i})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return so})),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",Ji,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return Zi})),e.serviceFactory("editDomainRedirects",Pi,"buildShlinkApiClient")},oo="shlink/appUpdates/APP_UPDATE_AVAILABLE",lo="shlink/appUpdates/RESET_APP_UPDATE",uo=et(($e={},Object(u.a)($e,oo,(function(){return!0})),Object(u.a)($e,lo,(function(){return!1})),$e),!1),jo=tt(oo),bo=tt(lo),ho=r(152),Oo=r(705),vo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(Q.c)(),s=Object(E.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(Oo.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:wr.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)(F.a,{icon:I.K,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},fo=r(315),mo=function(){var e=Object(p.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(fo.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)}}(),po=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(L.useEffect)((function(){var e,t;0===Object.keys(u).length&&l(),Object(Ec.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:ho.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(i,{})})]}),Object(a.jsx)(vo,{isOpen:j,toggle:h,forceUpdate:mo})]})}},xo=function(e,t){e.serviceFactory("App",po,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",(function(){return jo})),e.serviceFactory("resetAppUpdate",(function(){return bo}))},go=new j.a,So=go.container,yo=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)}}(So,t)))},Co=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(yo,{}))};xo(go,Co),Object(D.a)(go,Co,b.h),R(go),on(go,Co),sc(go,Co,b.h),Oi(go,Co),Rs(go,Co),Object(vi.a)(go),Si(go),Mi(go,Co),io(go,Co);var No=So,ko=r(316),wo=r(73),_o=r(225),Uo=Object(wo.c)({servers:An,selectedServer:Un,shortUrlsList:It,shortUrlsListParams:Pt,shortUrlCreationResult:Ct,shortUrlDeletion:vt,shortUrlEdition:Rt,shortUrlVisits:Za,tagVisits:os,orphanVisits:xs,shortUrlDetail:an,tagsList:bi,tagDelete:Js,tagEdit:ri,mercureInfo:xi,settings:_i,domainsList:Qi,visitsOverview:_s,appUpdated:uo}),To=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||wo.d,Ro={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Do=Object(wo.e)(Uo,Object(_o.load)(Ro),To(Object(wo.a)(Object(_o.save)(Ro),ko.a))),Eo=r(57),Lo=r.n(Eo),Vo=r(317),Io=r(318),Fo=r(319),Ao=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 Mo(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(631),r(632);delete Lo.a.Icon.Default.prototype._getIconUrl,Lo.a.Icon.Default.mergeOptions({iconRetinaUrl:Vo.a,iconUrl:Io.a,shadowUrl:Fo.a});var Go=No.App,Po=No.ScrollToTop,Bo=No.ErrorHandler,Ho=No.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:Do,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(Bo,{children:Object(a.jsx)(Po,{children:Object(a.jsx)(Go,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/feature-manage-domains")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/feature-manage-domains","/service-worker.js");Ao?(!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()}))})):Mo(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")}))):Mo(t,e)}))}}({onUpdate:function(){Do.dispatch(Ho())}})},97: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))}}},98: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)}}},[[335,1,2]]]); -//# sourceMappingURL=main.c01afc03.chunk.js.map \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{146:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/feature-manage-domains"}')},149:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(44),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"})]})})}},150: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(48),i=r(28),o=r(61);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.b)(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})})}}},152:function(e,t,r){"use strict";var n=r(0),c=r(24),a=r(32);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})]})})}},165:function(e,t,r){"use strict";var n=r(0),c=r(653),a=r(654),s=r(24),i=r(7),o=r.n(i),l=r(15),u=r(14),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)}))})]})}},26:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"c",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"d",(function(){return d}));var n=r(642),c=r(216),a=r(334),s=r(641),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}},27:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o}));var n=r(9),c=r(1),a=r(295),s=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]}},i=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)}]},o=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)})}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return s}));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"))}},292:function(e,t,r){"use strict";(function(e){var n=r(293),c=r.n(n),a=r(294),s=r(325),i=r(326),o=r(327),l=r(328),u=r(296),d=r(323),j=r(97),b=r(298);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(42))},294: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})}}},296:function(e,t,r){"use strict";var n=r(40),c=r(153),a=r(330),s=r(321),i=r(0),o=r(1),l=r(220),u=r(32);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)}},298:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(13),s=r(40),i=r(153),o=r(98),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}()},312:function(e,t,r){"use strict";(function(e){var n=r(27),c=r(313),a=r(314);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.a,"setTimeout","clearTimeout")}}).call(this,r(42))},313:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(40),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))}}},314:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(40),c=r(26),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.e)(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:{}}},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(35),a=r(0),s=r(332),i=r(639),o=r(640),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})]}))}},323:function(e,t,r){"use strict";var n=r(0),c=r(7),a=r.n(c),s=r(28),i=r(641),o=r(46),l=r(62),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.c)(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.c)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},325:function(e,t,r){"use strict";var n=r(9),c=r(0),a=r(14),s=r(15),i=r(1),o=r(24),l=r(646),u=r(647),d=r(648),j=r(649),b=r(650),h=r(651),O=r(652),v=r(7),f=r.n(v),m=r(27),p=r(149);t.a=function(e){return function(t){var r=t.location,v=Object(m.c)(),x=Object(n.a)(v,4),g=x[0],S=x[1],y=x[3],C=r.pathname;Object(i.useEffect)(y,[r]);var N=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":g});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)(p.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:N})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:g,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:"/settings",active:"/settings"===C,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},326:function(e,t,r){"use strict";var n=r(0),c=r(655),a=r(334),s=r(24),i=r(332),o=r(637),l=r(46),u=r(15),d=r(14),j=r(165),b=r(149);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})]})})})]})})]})]})})})}},327:function(e,t,r){"use strict";var n=r(3),c=r(9),a=r(0),s=r(1),i=r(38),o=r(14),l=r(15),u=r(7),d=r.n(u),j=r(150),b=r(27),h=r(33),O=r(28),v=r(152);t.a=function(e,t,r,u,f,m,p,x,g,S,y){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,k=Object(b.c)(),w=Object(c.a)(k,4),_=w[0],U=w[1],T=w[2],R=w[3];if(Object(s.useEffect)((function(){return R()}),[C]),!Object(O.c)(N))return Object(a.jsx)(x,{});var D=Object(h.l)(N),E=Object(h.e)(N),L=Object(h.c)(N),V=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),I=Object(b.b)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:V,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},I),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:_}),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:g}),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}),D&&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:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),L&&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)}},328:function(e,t,r){"use strict";var n=r(3),c=r(35),a=r(0),s=r(14),i=r(15),o=r(24),l=r(7),u=r.n(l),d=r(28),j=r(33),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.d)(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,{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,{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,{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,{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,{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,{icon:s.A}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),Object(d.d)(r)&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},33:function(e,t,r){"use strict";r.d(t,"j",(function(){return s})),r.d(t,"l",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"h",(function(){return l})),r.d(t,"n",(function(){return u})),r.d(t,"g",(function(){return d})),r.d(t,"k",(function(){return j})),r.d(t,"e",(function(){return b})),r.d(t,"f",(function(){return h})),r.d(t,"m",(function(){return O})),r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"c",(function(){return p}));var n=r(28),c=r(62),a=function(e){return function(t){return Object(n.c)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.1.0"}),i=a({minVersion:"2.2.0"}),o=a({minVersion:"2.4.0"}),l=o,u=o,d=a({minVersion:"2.5.0"}),j=a({minVersion:"2.6.0"}),b=j,h=j,O=j,v=a({minVersion:"2.7.0"}),f=v,m=a({minVersion:"2.8.0"}),p=m},335:function(e,t,r){e.exports=r(633)},420:function(e,t){},422:function(e,t){},44: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"))}},48:function(e,t,r){"use strict";var n=r(0),c=r(637),a=r(332),s=r(7),i=r.n(s),o=r(14),l=r(15),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]})})})})}},61: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})}},62: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(168),c=r(638),a=r(643),s=r(26),i=function(e,t){var r=t.maxVersion,c=t.minVersion;if(!Object(s.c)(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}}},633:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return Ra})),r.d(n,"normalizeVisits",(function(){return Da}));var c,a=r(0),s=r(43),i=r(163),o=r(24),l=r(146),u=r(10),d=r(3),j=r(291),b=r(38),h=r(703),O=r(708),v=r(28),f=r(6),m=r.n(f),p=r(13),x=r(40),g=r(121),S=r.n(g),y=r(324),C=r(216),N=r(334),k=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},w=Object(y.a)(C.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(p.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(p.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(y.a)((function(e){return Object(N.a)(e)||Object(C.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(p.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(k(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:w(n),data:a,paramsSerializer:function(e){return S.a.stringify(e,{arrayFormat:"brackets"})}});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},U={},T=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.a)(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 U[s]||(U[s]=new _(e,c,a)),U[s]}},R=function(e){e.serviceFactory("buildShlinkApiClient",T,"axios")},D=r(292),E=r(9),L=r(1),V=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(L.useState)("".concat(u,"_").concat(o)),b=Object(E.a)(j,2),h=b[0],O=b[1];return Object(L.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(L.createElement)(t,Object(d.a)(Object(d.a)({},r),{},{key:h}))]})}},I=r(14),F=r(15),A=r(641),M=r(410),G=r(7),P=r.n(G),B=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(L.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:P()("search-field",r),children:[Object(a.jsx)("input",{type:"text",className:P()("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)(F.a,{icon:I.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"})]})},H=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"})]})},W=r(659),q=r(125),z=r(656),K=r(657),Q=r(27),J=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(Q.c)(),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)(q.a,{isOpen:h,toggle:O,disabled:n,className:o,children:[Object(a.jsx)(z.a,{caret:!0,className:v,color:"primary",children:t}),Object(a.jsx)(K.a,{className:"w-100",right:u,style:f,children:i})]})},Z=r(84),Y=r(376),X=r(204),$=r(322),ee=r(635),te=r(658),re=(r(634),function(e){return"string"!==typeof e}),ne=function(e,t){return e&&re(e)?t?Object(ee.default)(e,t):Object(te.a)(e):e},ce=function(e){return ne(e,void 0)},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return ne(t,e)}}(),se=function(e){return void 0===e||Object(N.a)(Object($.a)(Boolean,e))},ie=function(e){return"string"===typeof e},oe={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180days:"Last 180 days",last365Days:"Last 365 days"},le=Object.keys(oe),ue=function(e){if(e)return ie(e)?oe[e]:function(e){if(e&&!se(e))return e.startDate&&!e.endDate?"Since ".concat(ae(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ae(e.endDate)):"".concat(ae(e.startDate)," - ").concat(ae(e.endDate))}(e)},de=function(e){return Object(Z.default)(Object(Y.default)(new Date,e))},je=function(e){if(!e)return{};switch(e){case"today":return{startDate:Object(Z.default)(new Date),endDate:new Date};case"yesterday":return{startDate:de(1),endDate:Object(X.default)(Object(Y.default)(new Date,1))};case"last7Days":return{startDate:de(7),endDate:new Date};case"last30Days":return{startDate:de(30),endDate:new Date};case"last90Days":return{startDate:de(90),endDate:new Date};case"last180days":return{startDate:de(180),endDate:new Date};case"last365Days":return{startDate:de(365),endDate:new Date}}return{}},be=r(300),he=r.n(be),Oe=r(103),ve=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(C.a)(n),s=Object(L.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:P()("date-input-container__input form-control",t),ref:s})),c&&Object(a.jsx)(F.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:le.map((function(e){return Object(a.jsx)(W.a,{active:t===e,onClick:function(){return r(e)},children:ue(e)},e)}))})},pe=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=Object(L.useState)(ie(n)?n:void 0),o=Object(E.a)(i,2),l=o[0],u=o[1],j=Object(L.useState)(ie(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)(J,{disabled:s,text:null!==(t=ue(null!==l&&void 0!==l?l:h))&&void 0!==t?t:c,children:[Object(a.jsx)(W.a,{active:void 0===l&&se(h),onClick:f(void 0),children:c}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(me,{active:l,onChange:function(e){return f(e)()}}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{header:!0,children:"Custom:"}),Object(a.jsx)(W.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(M.default)(e):null},ge=function(e){return function(t){var r,n=t.listShortUrls,c=t.shortUrlsListParams,s=null!==(r=c.tags)&&void 0!==r?r:[],i=Object(A.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=ce(n))&&void 0!==t?t:void 0,endDate:null!==(r=ce(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)(B,{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)(pe,{defaultText:"All short URLs",initialDateRange:{startDate:xe(c.startDate),endDate:xe(c.endDate)},onDatesChange:i})})})}),!Object(N.a)(s)&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(F.a,{icon:I.L,className:"search-bar__tags-icon"}),"\xa0",s.map((function(t){return Object(a.jsx)(H,{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(29),ye=r(669),Ce=r(53),Ne=r(655),ke=r(332),we=r(660),_e=r(661),Ue=r(26);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.a)(e,r,n);c(t?e:void 0,t)}};return Object(a.jsxs)(we.a,{children:[Object(a.jsxs)(z.a,{caret:!0,color:i?"primary":"link",className:P()({"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)(K.a,{right:l,className:P()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(_e.a)(t).map((function(e){var t=Object(E.a)(e,2),c=t[0],s=t[1];return Object(a.jsxs)(W.a,{active:r===c,onClick:u(c),children:[s,r===c&&Object(a.jsx)(F.a,{icon:"ASC"===n?I.I:I.H,className:"sorting-dropdown__sort-icon"})]},c)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!r,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var Re=r(301);function De(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(L.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(A.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 Ee=function(e){return S.a.parse(e,{ignoreQueryPrefix:!0})},Le=function e(){Object(x.a)(this,e)};Le.visits="https://shlink.io/new-visit",Le.orphanVisits="https://shlink.io/new-orphan-visit",Le.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Ve,Ie,Fe,Ae,Me,Ge,Pe,Be,He,We,qe,ze,Ke,Qe,Je,Ze,Ye,Xe,$e,et=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}},tt=function(e){return function(){return{type:e}}},rt=r(662),nt=r(663),ct=r(302),at=r(664),st=function(e,t,r){return Object(C.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},it="shlink/visitCreation/CREATE_VISITS",ot=function(e){return{type:it,createdVisits:e}},lt=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},ut=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},dt="shlink/deleteShortUrl/DELETE_SHORT_URL_START",jt="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",bt="shlink/deleteShortUrl/SHORT_URL_DELETED",ht="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",Ot={shortCode:"",loading:!1,error:!1},vt=et((Ve={},Object(u.a)(Ve,dt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ve,jt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Ve,bt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Ve,ht,(function(){return Ot})),Ve),Ot),ft=function(e){return function(t,r){return function(){var n=Object(p.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:dt}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:bt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:jt,errorData:lt(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},mt=tt(ht),pt="shlink/createShortUrl/CREATE_SHORT_URL_START",xt="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",gt="shlink/createShortUrl/CREATE_SHORT_URL",St="shlink/createShortUrl/RESET_CREATE_SHORT_URL",yt={result:null,saving:!1,error:!1},Ct=et((Ie={},Object(u.a)(Ie,pt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ie,xt,(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,gt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Ie,St,(function(){return yt})),Ie),yt),Nt=function(e){return function(t){return function(){var r=Object(p.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:pt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:gt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:xt,errorData:lt(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},kt=tt(St),wt=r(33),_t="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Ut="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Tt="shlink/shortUrlEdition/SHORT_URL_EDITED",Rt=et((Fe={},Object(u.a)(Fe,_t,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Fe,Ut,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Fe,Tt,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),Fe),{saving:!1,error:!1}),Dt=function(e){return function(t,r,n){return function(){var c=Object(p.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.m)(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:Tt}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Ut,errorData:lt(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",Lt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Vt="shlink/shortUrlsList/LIST_SHORT_URLS",It=et((Ae={},Object(u.a)(Ae,Et,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ae,Lt,(function(){return{loading:!1,error:!0}})),Object(u.a)(Ae,Vt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Ae,bt,Object(A.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(rt.a)(["shortUrls","data"],Object(y.a)((function(e){return st(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(rt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Ae,it,(function(e,t){var r,n,c=t.createdVisits;return Object(rt.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(nt.a)(c.filter((function(t){var r=t.shortUrl;return r&&st(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(ct.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Ae,gt,Object(A.a)((function(e,t){var r=t.result;return e.shortUrls?Object(rt.a)(["shortUrls","data"],[r].concat(Object(Se.a)(Object(at.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(rt.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Ae,Tt,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(rt.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return st(e,t,n)?r:e})),e):e})),Ae),{loading:!0,error:!1}),Ft=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(p.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:Vt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:Lt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},At="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",Mt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Gt={page:"1",orderBy:{dateCreated:"DESC"}},Pt=et((Me={},Object(u.a)(Me,Vt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Me,At,(function(){return Gt})),Me),Gt),Bt=tt(At),Ht=r(666),Wt=r(667),qt=r(668),zt=r(642),Kt=r(303),Qt=r(665),Jt=Math.ceil,Zt=new Intl.NumberFormat("en-US"),Yt=function(e){return Zt.format(e)},Xt="...",$t=function(e,t){var r=Object(zt.a)(Object(Kt.a)(2,e-2),Object(Qt.a)(t-1,e+2)+1);return e-2>2&&r.unshift(Xt),e+2=l,children:Object(a.jsx)(Wt.a,{next:!0,tag:o.b,to:"/server/".concat(r,"/list-short-urls/").concat(s+1)})})]})},cr=function(e){return De((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(L.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],p=(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))},g=function(e,t){m({orderField:e,orderDir:t}),x({orderBy:e?Object(u.a)({},e,t):void 0})};return Object(L.useEffect)((function(){var e=Ee(o.search).tag,t=e?[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:Mt,orderField:f.orderField,orderDir:f.orderDir,onChange:g})}),Object(a.jsxs)(ke.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{orderByColumn:function(e){return function(){return g(e,Object(Ue.a)(e,f.orderField,f.orderDir))}},renderOrderIcon:function(e){return f.orderField!==e?null:f.orderDir?Object(a.jsx)(F.a,{icon:"ASC"===f.orderDir?I.f:I.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)(nr,{paginator:p,serverId:Object(v.c)(j)?j.id:""})]})]})}),(function(){return[Le.visits]}))},ar=r(46),sr=r(159),ir=r.n(sr),or=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(ir.a,{text:t,onCopy:r,children:Object(a.jsx)(F.a,{icon:Oe.b,className:"ml-2 copy-to-clipboard-icon"})})},lr=r(670),ur=r(710),dr=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=re(t)?t:Object(M.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(lr.a)(i),"000"),children:s?"".concat(Object(ur.a)(new Date,i)," ago"):Object(ee.default)(i,n)})},jr=r(671),br=r(35),hr=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)},Or=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(br.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.d)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:hr(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},vr=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)(Or,{selectedServer:c,shortUrl:n,suffix:"visits",children:Object(a.jsx)("strong",{className:P()("short-url-visits-count__amount",{"short-url-visits-count__amount--big":i}),children:Yt(r)})});if(!o)return l;var u=Yt(o),d=Object(L.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)(F.a,{icon:I.t})})]})]}),Object(a.jsxs)(jr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},fr=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(L.useRef)(!0);return Object(L.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)(dr,{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)(ar.a,{href:i.shortUrl}),Object(a.jsx)(or,{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)(ar.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)(ar.a,{href:i.longUrl})}),Object(a.jsx)("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:(s=i.tags,Object(N.a)(s)?Object(a.jsx)("i",{className:"indivisible",children:Object(a.jsx)("small",{children:"No tags"})}):s.map((function(e){return Object(a.jsx)(H,{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)(vr,{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})})]})}},mr=r(672),pr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(Q.c)(),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(Q.c)(),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(Q.c)(),O=Object(E.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(mr.a,{toggle:l,isOpen:o,children:[Object(a.jsxs)(z.a,{size:"sm",caret:!0,outline:!0,className:"short-urls-row-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(F.a,{icon:I.n}),"\xa0"]}),Object(a.jsxs)(K.a,{right:!0,children:[Object(a.jsxs)(W.a,{tag:Or,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(F.a,{icon:I.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(W.a,{tag:Or,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(F.a,{icon:I.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(W.a,{onClick:b,children:[Object(a.jsx)(F.a,{icon:I.D,fixedWidth:!0})," QR code"]}),Object(a.jsx)(t,{shortUrl:n,isOpen:j,toggle:b}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"short-urls-row-menu__dropdown-item--danger",onClick:f,children:[Object(a.jsx)(F.a,{icon:I.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(L.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(p.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}))]})}},gr=r(712),Sr=r(673),yr=r(674),Cr=r(675),Nr=r(643),kr=r(637),wr=r(32),_r=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(kr.a,{className:n,children:Object(a.jsx)("div",{className:P()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(wr.a,{className:P()("text-center",{"bg-main":"success"===r,"bg-danger":"error"===r,"bg-warning":"warning"===r,"text-white":"warning"!==r}),bodyClassName:P()({"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(L.useState)(""),l=Object(E.a)(o,2),u=l[0],d=l[1];Object(L.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(A.a)(s,r),O=Object(Ue.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Nr.a)}));return Object(a.jsx)(gr.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)(_r,{type:ut(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(223),Dr=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(L.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(_r,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(F.a,{icon:I.M,className:"float-right pointer",onClick:s}),Object(a.jsx)(Ur,{errorData:n,fallbackMessage:"An error occurred while creating the URL :("})]});if(Object(C.a)(c))return null;var b=c.shortUrl;return Object(a.jsxs)(_r,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(F.a,{icon:I.M,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)(ir.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)(F.a,{icon:Oe.b})," Copy"]})}),Object(a.jsx)(Rr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},Er=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=P()({"short-urls-table__header-cell--with-action":!!r}),b=P()("short-urls-table__header-cell",j),h=P()("table table-hover",o),O=Object(wt.k)(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(N.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(676),Vr=r(220),Ir=function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.svgIsSupported,l=r.marginIsSupported,u=r.errorCorrectionIsSupported,d="".concat(e,"/qr-code").concat(i?"/".concat(n):""),j=function(e){return S.a.stringify(e,{arrayFormat:"brackets"})}({size:i?void 0:n,format:o?c:void 0,margin:l&&a>0?a:void 0,errorCorrection:u?s:void 0});return"".concat(d).concat(Object(N.a)(j)?"":"?".concat(j))},Fr=function(e){var t=e.format,r=e.setFormat;return Object(a.jsxs)(J,{text:"Format (".concat(t,")"),children:[Object(a.jsx)(W.a,{active:"png"===t,onClick:function(){return r("png")},children:"PNG"}),Object(a.jsx)(W.a,{active:"svg"===t,onClick:function(){return r("svg")},children:"SVG"})]})},Ar=function(e){var t=e.errorCorrection,r=e.setErrorCorrection;return Object(a.jsxs)(J,{text:"Error correction (".concat(t,")"),children:[Object(a.jsxs)(W.a,{active:"L"===t,onClick:function(){return r("L")},children:[Object(a.jsx)("b",{children:"L"}),"ow"]}),Object(a.jsxs)(W.a,{active:"M"===t,onClick:function(){return r("M")},children:[Object(a.jsx)("b",{children:"M"}),"edium"]}),Object(a.jsxs)(W.a,{active:"Q"===t,onClick:function(){return r("Q")},children:[Object(a.jsx)("b",{children:"Q"}),"uartile"]}),Object(a.jsxs)(W.a,{active:"H"===t,onClick:function(){return r("H")},children:[Object(a.jsx)("b",{children:"H"}),"igh"]})]})},Mr=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(L.useState)(300),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(L.useState)(0),O=Object(E.a)(h,2),v=O[0],f=O[1],x=Object(L.useState)("png"),g=Object(E.a)(x,2),S=g[0],y=g[1],C=Object(L.useState)("L"),N=Object(E.a)(C,2),k=N[0],w=N[1],_=Object(L.useMemo)((function(){return{useSizeInPath:!Object(wt.g)(l),svgIsSupported:Object(wt.h)(l),marginIsSupported:Object(wt.f)(l),errorCorrectionIsSupported:Object(wt.i)(l)}}),[l]),U=Object(L.useMemo)((function(){return Ir(c,{size:j,format:S,margin:v,errorCorrection:k},_)}),[c,j,S,v,k,_]),T=Object(L.useMemo)((function(){return j+v}),[j,v]),R=Object(L.useMemo)((function(){if(!(T<500))return T<800?"lg":"xl"}),[T]);return Object(a.jsxs)(gr.a,{isOpen:o,toggle:i,centered:!0,size:R,children:[Object(a.jsxs)(Sr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(ar.a,{href:c,children:c})]}),Object(a.jsxs)(yr.a,{children:[Object(a.jsxs)(kr.a,{children:[Object(a.jsxs)(Lr.a,{className:P()({"col-md-4":_.marginIsSupported&&_.svgIsSupported&&!_.errorCorrectionIsSupported,"col-md-6":_.errorCorrectionIsSupported||!_.marginIsSupported&&_.svgIsSupported||_.marginIsSupported&&!_.svgIsSupported,"col-12":!_.marginIsSupported&&!_.svgIsSupported&&!_.errorCorrectionIsSupported}),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))}})]}),_.marginIsSupported&&Object(a.jsxs)(Lr.a,{className:_.svgIsSupported&&!_.errorCorrectionIsSupported?"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))}})]}),_.svgIsSupported&&Object(a.jsx)(Lr.a,{className:_.marginIsSupported&&!_.errorCorrectionIsSupported?"col-md-4":"col-md-6",children:Object(a.jsx)(Fr,{format:S,setFormat:y})}),_.errorCorrectionIsSupported&&Object(a.jsx)(Lr.a,{className:"col-md-6",children:Object(a.jsx)(Ar,{errorCorrection:k,setErrorCorrection:w})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(ar.a,{href:U}),Object(a.jsx)(or,{text:U})]}),Object(a.jsx)("img",{src:U,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(p.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(U,"".concat(s,"-qr-code.").concat(S)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(F.a,{icon:I.q,className:"ml-1"})]})})})]})]})]})}},Gr=r(679),Pr=r(677),Br=r(678),Hr=r(707),Wr=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(L.useRef)(Object(Hr.a)()).current,j={"custom-switch":"switch"===o,"custom-checkbox":"checkbox"===o},b=u?{display:"inline-block"}:{};return Object(a.jsxs)("span",{className:P()("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})]})},qr=function(e){return Object(a.jsx)(Wr,Object(d.a)({type:"checkbox"},e))},zr=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(gr.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"})]})]})]})},Kr=function(){var e=Object(Q.c)(),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)(F.a,{icon:I.t,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(zr,{isOpen:r,toggle:n})]})},Qr=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(L.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(F.a,{icon:I.t})}),Object(a.jsx)(jr.a,{target:function(){return s.current},placement:n,children:c})]})},Jr=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(qr,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(Qr,{placement:"right",children:r})]})},Zr=Object(A.a)(Pr.a,Object(Br.a)(/ /g,"-")),Yr=function(e){return"string"===typeof e?Object(M.default)(e):e},Xr=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(L.useState)(o),b=Object(E.a)(j,2),h=b[0],O=b[1],v="edit"===c,f=Object(Ue.b)(Object(p.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=ce(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=ce(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Ue.c)(h.maxVisits)?Number(h.maxVisits):null,title:Object(Ue.c)(h.title)?h.title:void 0})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(L.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)(Gr.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))})},g=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]?Yr(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)(Gr.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(Zr)}))}})})]}),y=Object(wt.d)(l),C=!Object(wt.j)(l),k=Object(wt.k)(l),w=k||!v,_=P()("mb-3",{"col-sm-6":w,"col-sm-12":!w}),U=Object(wt.n)(l),T=Object(wt.b)(l),R=U||T||!v;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)(wr.a,{title:"Basic options",className:"mb-3",children:S}),Object(a.jsxs)(kr.a,{children:[w&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(wr.a,{title:"Customize the short URL",children:[k&&x("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(kr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:Object(Ue.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",Object(d.a)({min:4,disabled:C||Object(Ue.c)(h.customSlug)},C&&{title:"Shlink 2.1.0 or higher is required to be able to provide the short code length"}))})]}),!y&&x("domain","Domain","text"),y&&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:_,children:Object(a.jsxs)(wr.a,{title:"Limit access to the short URL",children:[x("maxVisits","Maximum number of visits allowed","number",{min:1}),g("validSince","Enabled since...",{maxDate:h.validUntil?Yr(h.validUntil):void 0}),g("validUntil","Enabled until...",{minDate:h.validSince?Yr(h.validSince):void 0})]})})]}),R&&Object(a.jsxs)(wr.a,{title:"Extra checks",className:"mb-3",children:[U&&Object(a.jsx)(Jr,{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"}),T&&Object(a.jsx)(Jr,{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)(qr,{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)(Kr,{})]})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Vr.a,{outline:!0,color:"primary",disabled:s||Object(N.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},$r=r(48),en=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,g=d.errorData,S=Ee(s).domain,y=Object(L.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]),C=Object(Q.c)(),N=Object(E.a)(C,4),k=N[0],w=N[2],_=N[3];return Object(L.useEffect)((function(){u(c.shortCode,S)}),[]),b?Object(a.jsx)($r.a,{loading:!0}):h?Object(a.jsx)(_r,{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)(ke.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)(F.a,{icon:I.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(ar.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(p.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:_(),j(v.shortCode,v.domain,t).then(w).catch(_);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),x&&Object(a.jsx)(_r,{type:"error",className:"mt-3",children:Object(a.jsx)(Ur,{errorData:g,fallbackMessage:"An error occurred while updating short URL :("})}),k&&Object(a.jsx)(_r,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},tn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",rn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",nn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",cn={loading:!1,error:!1},an=et((Ge={},Object(u.a)(Ge,tn,(function(){return{loading:!0,error:!1}})),Object(u.a)(Ge,rn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Ge,nn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},cn)})),Ge),cn),sn=function(e){return function(t,r){return function(){var n=Object(p.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:tn}),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 st(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:nn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:rn,errorData:lt(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},on=function(e,t){e.serviceFactory("ShortUrls",V,"SearchBar","ShortUrlsList"),e.decorator("ShortUrls",t(["shortUrlsList"])),e.serviceFactory("ShortUrlsList",cr,"ShortUrlsTable"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Er,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",fr,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",pr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Dr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",Xr,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",xr,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",en,"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",Mr,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",ge,"ColorGenerator"),e.decorator("SearchBar",t(["shortUrlsListParams"],["listShortUrls"])),e.serviceFactory("listShortUrls",Ft,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return Bt})),e.serviceFactory("createShortUrl",Nt,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return kt})),e.serviceFactory("deleteShortUrl",ft,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return mt})),e.serviceFactory("getShortUrlDetail",sn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",Dt,"buildShlinkApiClient")},ln=r(304),un=r.n(ln),dn=r(61),jn=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(L.useRef)(null!==c&&void 0!==c?c:Object(Hr.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)}})]})},bn=function(e){return Object(a.jsx)(jn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},hn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(L.useState)(""),i=Object(E.a)(s,2),o=i[0],l=i[1],u=Object(L.useState)(""),d=Object(E.a)(u,2),j=d[0],b=d[1],h=Object(L.useState)(""),O=Object(E.a)(h,2),v=O[0],f=O[1],m=Object(Ue.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(L.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)(wr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(bn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(bn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(bn,{value:v,onChange:f,children:"APIkey"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},On=function(e){var t=e.type;return Object(a.jsxs)(_r,{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."]})},vn=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)(dn.a,{children:[Object(a.jsxs)(hn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(Hr.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)(On,{type:"success"}),b&&Object(a.jsx)(On,{type:"error"})]})]})}},fn=function(e){return function(t){var r=t.servers,n=t.selectedServer,c=Object(Ne.a)(r),s=Object(a.jsxs)(W.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(F.a,{icon:I.C})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]});return Object(a.jsxs)(we.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(z.a,{nav:!0,caret:!0,children:[Object(a.jsx)(F.a,{icon:I.G})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(K.a,{right:!0,children:Object(N.a)(c)?s:Object(a.jsxs)(a.Fragment,{children:[c.map((function(e){var t=e.name,r=e.id;return Object(a.jsx)(W.a,{tag:o.b,to:"/server/".concat(r),active:Object(v.d)(n)&&n.id===r,children:t},r)})),Object(a.jsx)(W.a,{divider:!0}),s,Object(a.jsxs)(W.a,{className:"servers-dropdown__export-item",onClick:Object(p.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)(F.a,{icon:I.q})," ",Object(a.jsx)("span",{className:"ml-1",children:"Export servers"})]})]})})]})}},mn=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history;return Object(a.jsxs)(gr.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"})]})]})},pn=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(Q.c)(),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)(F.a,{icon:I.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})]})}},xn=r(150),gn=function(e){return Object(xn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history,c=n.push,s=n.goBack;if(!Object(v.d)(r))return null;return Object(a.jsx)(dn.a,{children:Object(a.jsxs)(hn,{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)},Sn=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(L.useRef)(),u=function(){var e=Object(p.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)(jr.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})]})}},yn=r(638),Cn=r(62),Nn="shlink/selectedServer/SELECT_SERVER",kn="shlink/selectedServer/RESET_SELECTED_SERVER",wn=Object(A.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Cn.c)("1.0.0")),_n=Object(yn.a)(Nr.a,function(){var e=Object(p.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(Cn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Un=et((Pe={},Object(u.a)(Pe,kn,(function(){return null})),Object(u.a)(Pe,Nn,(function(e,t){return t.selectedServer})),Pe),null),Tn=tt(kn),Rn=function(e,t){return function(r){return function(){var n=Object(p.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(Tn()),c(Bt()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:Nn,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:Nn,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:Nn,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)}}()}},Dn=r(680),En=r(151),Ln=r(329),Vn="shlink/servers/EDIT_SERVER",In="shlink/servers/DELETE_SERVER",Fn="shlink/servers/CREATE_SERVERS",An=et((Be={},Object(u.a)(Be,Fn,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Be,In,(function(e,t){var r=t.serverId;return Object(Dn.a)(r,e)})),Object(u.a)(Be,Vn,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(ct.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Be),{}),Mn=Object(En.a)((function(e,t){return Object(ct.a)(t.id,t,e)}),{}),Gn=Object(A.a)(Object(Ln.a)((function(e){return e.id?e:Object(ct.a)("id",Object(Hr.a)(),e)})),Mn,(function(e){return{type:Fn,newServers:e}})),Pn=function(e){return Gn([e])},Bn=function(e,t){return{type:Vn,serverId:e,serverData:t}},Hn=function(e){var t=e.id;return{type:In,serverId:t}},Wn=Object(A.a)(Object(O.a)("data"),(function(e){if(!Array.isArray(e))throw new Error("Value is not an array");return e})),qn=function(e){var t=e.get;return function(){return function(){var e=Object(p.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(Wn).catch((function(){return[]}));case 2:n=e.sent,r(Gn(n));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},zn=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.c)(n))return null;var s=n.version;return Object(Cn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},Kn=r(165),Qn=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(dn.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)($r.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.d)(n)&&"Could not find this Shlink server.",Object(v.d)(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)(Kn.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.d)(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"}),"."]})})]})})}},Jn=r(97),Zn=r(681),Yn=r(682),Xn=r(639),$n=r(640),ec=function(e,t,r){return De((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,p=h.loading,x=h.visitsCount,g=h.orphanVisitsCount,S=Object(v.d)(d)?d.id:"",y=Object(b.g)();return Object(L.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(kr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(ke.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsxs)(Yn.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.2.0",children:p?"Loading...":Yt(x)}),Object(a.jsx)(r,{maxVersion:"2.1.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.2 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(ke.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/orphan-visits"),children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(Yn.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:p?"Loading...":Yt(null!==g&&void 0!==g?g: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)(ke.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/list-short-urls/1"),children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(Yn.a,{tag:"h2",children:O?"Loading...":Yt(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)(ke.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(S,"/manage-tags"),children:[Object(a.jsx)(Zn.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(Yn.a,{tag:"h2",children:m?"Loading...":Yt(u.tags.length)})]})})]}),Object(a.jsxs)(ke.a,{className:"mb-3",children:[Object(a.jsxs)(Xn.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)($n.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(ke.a,{children:[Object(a.jsxs)(Xn.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)($n.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[Le.visits,Le.orphanVisits]}))},tc=["text/csv","text/comma-separated-values","application/csv"],rc=function(e){return!!e&&tc.includes(e.type)},nc=function e(t,r){var n=this;Object(x.a)(this,e),this.csvjson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(p.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(rc(t)){e.next=2;break}throw new Error("No file provided or file is not a CSV");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e){r.addEventListener("loadend",(function(t){var r,c,a,s=null!==(r=null===(c=t.target)||void 0===c||null===(a=c.result)||void 0===a?void 0:a.toString())&&void 0!==r?r:"",i=n.csvjson.toObject(s);e(i)})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},cc=r(98),ac=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(p.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(Dn.a)("id"));try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(cc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},sc=function(e,t,r){e.serviceFactory("CreateServer",vn,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",Jn.a),e.decorator("CreateServer",t(["selectedServer"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",gn,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",fn,"ServersExporter"),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return mn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",pn,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Sn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return zn})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",Qn,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",ec,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",un.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",nc,"csvjson","fileReaderFactory"),e.service("ServersExporter",ac,"Storage","window","csvjson"),e.serviceFactory("selectServer",Rn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return Pn})),e.serviceFactory("createServers",(function(){return Gn})),e.serviceFactory("deleteServer",(function(){return Hn})),e.serviceFactory("editServer",(function(){return Bn})),e.serviceFactory("fetchServers",qn,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Tn}))},ic=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)(ke.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)(F.a,{icon:I.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)(vr,{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})]})})},oc=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)(ar.a,{href:u})]});return Object(a.jsxs)(ic,{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)(dr,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(jr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(dr,{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)(ar.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},lc=r(700),uc=r(652),dc=r(701),jc=r(650),bc=r(122),hc=r(706),Oc=r(685),vc=r(686),fc=r(683),mc=r(687),pc=r(688),xc=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(we.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(K.a,{right:!0,children:[r.map((function(e){return Object(a.jsxs)(W.a,{active:e===n,onClick:function(){return c(e)},children:[Object(a.jsx)("b",{children:e})," items per page"]},e)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:n===1/0,onClick:function(){return c(1/0)},children:Object(a.jsx)("i",{children:"Clear pagination"})})]})]})},gc=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!er(e)&&n(e)}};return Object(a.jsxs)(qt.a,{listClassName:P()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(Ht.a,{disabled:r<=1,children:Object(a.jsx)(Wt.a,{previous:!0,tag:"span",onClick:i(r-1)})}),$t(r,t).map((function(e,t){return Object(a.jsx)(Ht.a,{disabled:er(e),active:r===e,children:Object(a.jsx)(Wt.a,{tag:"span",onClick:i(e),children:tr(e)})},rr(e,t))})),Object(a.jsx)(Ht.a,{disabled:r>=t,children:Object(a.jsx)(Wt.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},Sc=r(684),yc=r(126),Cc=r(305),Nc=r.n(Cc),kc="Others",wc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],_c=function(e){var t,r;return Object(Ue.c)(e)?null!==(t=null===(r=e.split("/")[e.includes("://")?2:0])||void 0===r?void 0:r.split(":")[0])&&void 0!==t?t:"":"Direct"},Uc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(fc.a)(t,t.map((function(){return 0})))),e))},Tc=function(e,t){e.target.style.cursor=t[0]?"pointer":"default"},Rc=function(e){return function(t,r){var n,c=r.datasets,a=t.datasetIndex,s=t[e],i=void 0!==a&&(null===c||void 0===c||null===(n=c[a])||void 0===n?void 0:n.label)||"";return"".concat(i,": ").concat(Yt(Number(s)))}},Dc=function(e,t){var r,n,c=e.datasetIndex,a=e.index,s=t.labels,i=t.datasets,o=void 0!==a&&(null===s||void 0===s?void 0:s[a])||"",l=void 0!==c&&void 0!==a&&(null===i||void 0===i||null===(r=i[c])||void 0===r||null===(n=r.data)||void 0===n?void 0:n[a])||"";return"".concat(o,": ").concat(Yt(Number(l)))},Ec=r(44),Lc=function(e){return e.startsWith("hidden")?"":e},Vc=function(e){var t,r,n=e.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=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor,d=Object(E.a)(l,1)[0].backgroundColor;return Object(a.jsx)("ul",{className:"default-chart__pie-chart-legend",children:i.map((function(e,t){return Object(a.jsxs)("li",{className:"default-chart__pie-chart-legend-item d-flex",children:[Object(a.jsx)("div",{className:"default-chart__pie-chart-legend-item-color",style:{backgroundColor:d[t]||u}}),Object(a.jsx)("small",{className:"default-chart__pie-chart-legend-item-text flex-fill",children:e})]},e)}))})},Ic=function(e){return function(t){var r=Object(E.a)(t,1)[0];if(e&&r){var n=r._index,c=r._chart.data.labels;e(null===c||void 0===c?void 0:c[n])}}},Fc=function(e){return!!e&&Object.keys(e).length>0},Ac=function(e){var t=e.title,r=e.isBarChart,n=void 0!==r&&r,c=e.stats,s=e.max,i=e.highlightedStats,o=e.highlightedLabel,l=e.onClick,u=n?yc.HorizontalBar:yc.Doughnut,j=Object(Ce.a)(c).map(Lc),b=Object(Ne.a)(Fc(i)?Object(Ce.a)(i).reduce((function(e,t){return e[t]&&(e[t]-=i[t]),e}),Object(d.a)({},c)):c),h=Fc(i)?Uc(i,j):void 0,O=Object(L.useState)(),v=Object(E.a)(O,2),f=v[0],m=v[1],p={legend:{display:!1},legendCallback:!n&&Vc,scales:n?{xAxes:[{ticks:{beginAtZero:!0,precision:0,callback:Yt,max:s},stacked:!0}],yAxes:[{stacked:!0}]}:void 0,tooltips:{intersect:!n,filter:function(e){var t=e.yLabel;return!n||""!==t},callbacks:{label:n?Rc("xLabel"):Dc}},onHover:n?Tc:void 0},x=function(e,t,r,n,c,a){return{labels:r,datasets:[{title:e,label:c?"Non-selected":"Visits",data:n,backgroundColor:t?Ec.d:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:t?Ec.c:Object(Ec.h)()?Ec.e:Ec.f,borderWidth:2},c&&{title:e,label:null!==a&&void 0!==a?a:"Selected",data:c,backgroundColor:Ec.b,borderColor:Ec.a,borderWidth:2}].filter(Boolean)}}(t,n,j,b,h,o),g=function(e,t){return e?e&&t.length>20?8*t.length:void 0:300}(n,j);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:P()("col-sm-12",{"col-md-7":!n}),children:Object(a.jsx)(u,{ref:function(e){return m(null!==e&&void 0!==e?e:void 0)},data:x,options:p,height:g,getElementAtEvent:Ic(l)},g)}),!n&&Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:null===f||void 0===f?void 0:f.chartInstance.generateLegend()})]})},Mc=function(e){var t=e.title,r=e.footer,n=Object(br.a)(e,["title","footer"]);return Object(a.jsxs)(ke.a,{children:[Object(a.jsx)(Xn.a,{className:"graph-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)($n.a,{children:Object(a.jsx)(Ac,Object(d.a)({title:t},n))}),r&&Object(a.jsx)(Sc.a,{className:"graph-card__footer--sticky",children:r})]})},Gc=function(e){return"String"===Object(bc.a)(e)?Object(hc.a)(e):e},Pc=function(e){return Object(E.a)(e,1)[0]},Bc=function(e){return Object(E.a)(e,2)[1]},Hc=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(br.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(L.useState)({orderField:void 0,orderDir:void 0}),j=Object(E.a)(u,2),b=j[0],h=j[1],O=Object(L.useState)(1),v=Object(E.a)(O,2),f=v[0],m=v[1],p=Object(L.useState)(50),x=Object(E.a)(p,2),g=x[0],S=x[1],y=function(e){var t=e[f-1];if(f0?r:void 0,c),N=C.currentPageStats,k=C.currentPageHighlightedStats,w=C.pagination,_=C.max,U=Object.keys(N);return Object(a.jsx)(Mc,Object(d.a)({isBarChart:!0,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)(xc,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:g,setValue:function(e){S(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(w?U:void 0)})]})},stats:N,highlightedStats:k,footer:w,max:_},l))},Wc=r(692),qc=r(693),zc=r(694),Kc=r(689),Qc=r(306),Jc=r(690),Zc=r(331),Yc=r(85),Xc=r(691),$c=r(695),ea=function(e){return Object(a.jsx)(Wr,Object(d.a)({type:"switch"},e))},ta={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},ra={hourly:function(e){return{hours:e}},daily:function(e){return{days:e}},weekly:function(e){return{weeks:e}},monthly:function(e){return{months:e}}},na={hourly:Kc.a,daily:Qc.a,weekly:Jc.a,monthly:Zc.a},ca={hourly:function(e){return Object(ee.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(ee.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(ee.default)(Object(Yc.a)(e),"yyyy-MM-dd"),r=Object(ee.default)(Object(Xc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(ee.default)(e,"yyyy-MM")}},aa=function(e,t){return Object(zc.a)((function(t){return ca[e](Object(M.default)(t.date))}),t)},sa=function(e,t,r,n){if(n)return[Object.keys(t),Object.values(t)];var c=function(e,t){var r=na[e],n=ca[e],c=Object(M.default)(t[0].date),a=Object(M.default)(t[t.length-1].date),s=r(c,a),i=ra[e];return[n(a)].concat(Object(Se.a)(Object(Ue.e)(s,(function(e){return n(Object($c.a)(a,i(e)))}))))}(r,e);return[c,Uc(t,c)]},ia=function(e,t,r){return{label:t,data:e,fill:!1,lineTension:.2,borderColor:r,backgroundColor:r}},oa=null,la=function(e,t){return function(r){var n=Object(E.a)(r,1)[0];if(t&&n){var c,a=n._index,s=n._chart.data.labels;if(oa===s[a])t([]),oa=null;else t(s[a]&&e[s[a]]||[]),oa=null!==(c=s[a])&&void 0!==c?c:null}}},ua=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(L.useState)(r.length>0?function(e){var t,r=new Date,n=Object(M.default)(e);return null!==(t=Object(Wc.a)([[function(){return Object(Qc.a)(r,n)<=2},Object(qc.a)("hourly")],[function(){return Object(Zc.a)(r,n)<=1},Object(qc.a)("daily")],[function(){return Object(Zc.a)(r,n)<=6},Object(qc.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(Q.c)(!0),b=Object(E.a)(j,2),h=b[0],O=b[1],v=Object(L.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=ca[e](Object(M.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(L.useMemo)((function(){return aa(u,Object(vc.a)(r))}),[u,r]),m=Object(L.useMemo)((function(){return sa(r,f,u,h)}),[r,u,h]),p=Object(E.a)(m,2),x=p[0],g=p[1],S=Object(L.useMemo)((function(){return Uc(aa(u,Object(vc.a)(n)),x)}),[n,u,x]),y={labels:x,datasets:[ia(g,"Visits",Ec.c),n.length>0&&ia(S,s,Ec.a)].filter(Boolean)},C={maintainAspectRatio:!1,legend:{display:!1},scales:{yAxes:[{ticks:{beginAtZero:!0,precision:0,callback:Yt}}],xAxes:[{scaleLabel:{display:!0,labelString:ta[u]}}]},tooltips:{intersect:!1,axis:"x",callbacks:{label:Rc("yLabel")}},onHover:Tc};return Object(a.jsxs)(ke.a,{children:[Object(a.jsxs)(Xn.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(we.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(K.a,{right:!0,children:Object.entries(ta).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(W.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)(ea,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsx)($n.a,{className:"line-chart-card__body",children:Object(a.jsx)(yc.Line,{data:y,options:C,getElementAtEvent:la(v,i)})})]})},da=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(br.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)}))},ja=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(L.useState)(h()),v=Object(E.a)(O,2),f=v[0],m=v[1],p=Object(L.useState)(void 0),x=Object(E.a)(p,2),g=x[0],S=x[1],y=Object(L.useState)({field:void 0,dir:void 0}),C=Object(E.a)(y,2),N=C[0],k=C[1],w=Object(L.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?da(t,e):Object(Se.a)(e)),c=n.length;return{visitsGroups:Object(pc.a)(20,n),total:c}}(n,g,N)}),[g,N]),_=Object(L.useRef)(!0),U=Object(L.useState)(1),T=Object(E.a)(U,2),R=T[0],D=T[1],V=20*R,A=V-20,M=Object(wt.a)(o),G=7+Number(M)+Number(j),H=function(e){return function(){return k({field:e,dir:Object(Ue.a)(e,N.field,N.dir)})}},W=function(e){return N.dir&&N.field===e&&Object(a.jsx)(F.a,{icon:"ASC"===N.dir?I.f:I.e,className:"visits-table__header-icon"})};return Object(L.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(L.useEffect)((function(){D(1),!_.current&&i([]),_.current=!1}),[g]),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.length0})})}),M&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(F.a,{icon:I.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:G,className:"p-0",children:Object(a.jsx)(B,{noBorder:!0,large:!1,onChange:S})})})]}),Object(a.jsxs)("tbody",{children:[!(null!==(t=w.visitsGroups[R-1])&&void 0!==t&&t.length)&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,className:"text-center",children:"No visits found with current filtering"})}),null===(r=w.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:P()({"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)(F.a,{icon:I.h,className:"text-primary"})}),M&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(F.a,{icon:I.E,id:"botIcon".concat(t)}),Object(a.jsx)(jr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(dr,{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)}))]}),w.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:G,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)(gc,{pagesCount:Math.ceil(w.total/20),currentPage:R,setCurrentPage:D,centered:f})}),Object(a.jsx)("div",{className:P()("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:Yt(A+1)})," to"," ",Object(a.jsx)("b",{children:Yt(Object(Qt.a)(V,w.total))})," of"," ",Object(a.jsx)("b",{children:Yt(w.total)})]})})]})})})})]})},ba=r(713),ha=r(696),Oa=r(697),va=r(698),fa=function(){return Object(a.jsx)(ba.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},ma=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}},pa=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(gr.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)(ha.a,Object(d.a)(Object(d.a)({},ma(s)),{},{children:[Object(a.jsx)(fa,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(Oa.a,{position:n,children:Object(a.jsxs)(va.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},xa=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(Q.c)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(Q.c)(),j=Object(E.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(L.useState)([]),f=Object(E.a)(v,2),m=f[0],p=f[1],x=Object(L.useRef)(),g=function(e){return function(){p(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 p(c),void l();O()},children:Object(a.jsx)(F.a,{icon:I.w})}),Object(a.jsx)(jr.a,{placement:"left",target:function(){return x.current},children:"Show in map"}),Object(a.jsx)(q.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(K.a,{right:!0,children:[Object(a.jsx)(W.a,{onClick:g(!1),children:"Show all locations"}),Object(a.jsx)(W.a,{onClick:g(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(pa,{toggle:u,isOpen:o,title:t,locations:m})]})},ga=r(699),Sa=function(e){return e.hasOwnProperty("visitedUrl")},ya=Object(A.a)(Object(ga.a)((function(e){return Sa(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),Ca=function(e,t){return Object(zc.a)(Object(O.a)(t),e)},Na=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)&&ce(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)&&ce(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}},ka=function(e,t){return!Object(C.a)(e)&&Object(Ue.c)(e[t])},wa=function(e){return"number"===typeof e?e:e?parseFloat(e):0},_a=function(e){return function(t,r){var n=ka(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Ua=_a("country"),Ta=_a("city"),Ra=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),Ua(e.countries,t),Ta(e.cities,t),function(e,t){if(ka(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[wa(n),wa(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:{}})},Da=Object(Ln.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.c)(e))return{browser:kc,os:kc};var t=Nc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:kc,browser:r&&wc.includes(r)?r:kc}}(t)),{},{referer:_c(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 Sa(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Ea=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)(J,{text:"Filters",dropdownClassName:c,className:"mr-3",right:!0,minWidth:250,children:[i&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Bots:"}),Object(a.jsx)(W.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)(W.a,{divider:!0}),s&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{header:!0,children:"Orphan visits type:"}),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("base_url")),{},{children:"Base URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("invalid_short_url")),{},{children:"Invalid short URL"})),Object(a.jsx)(W.a,Object(d.a)(Object(d.a)({},j("regular_404")),{},{children:"Regular 404"}))]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!Object(Ue.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},La={byTime:{title:"By time",subPath:"",icon:I.d},byContext:{title:"By context",subPath:"/by-context",icon:I.g},byLocation:{title:"By location",subPath:"/by-location",icon:I.w},list:{title:"List",subPath:"/list",icon:I.v}},Va=function(e){var t=e.subPath,r=e.title,n=e.icon,c=e.to;return Object(a.jsxs)(uc.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)(F.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},Ia=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(L.useState)(je(f)),p=Object(E.a)(m,2),x=p[0],g=p[1],S=Object(L.useState)([]),y=Object(E.a)(S,2),C=y[0],k=y[1],w=Object(L.useState)(),_=Object(E.a)(w,2),U=_[0],T=_[1],R=Object(L.useState)({}),D=Object(E.a)(R,2),V=D[0],A=D[1],M=Object(wt.a)(h),G=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(L.useMemo)((function(){return Da(B)}),[B]),J=Object(L.useMemo)((function(){return Ra(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){He=void 0,k(e)},ae=function(e){return function(t){var r="".concat(e,"_").concat(t);He===r?(k([]),T(void 0),He=void 0):(k(Q.filter(Object(lc.a)(e,t))),T(t),He=r)}};Object(L.useEffect)((function(){return i}),[]),Object(L.useEffect)((function(){s({dateRange:x,filter:V})}),[x,V]);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)(pe,{disabled:H,initialDateRange:f,defaultText:"All visits",onDatesChange:g})}),Object(a.jsx)(Ea,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:M,selected:V,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===C.length,className:"btn-md-block mr-2",onClick:function(){return ce([])},children:["Clear selection ",C.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",C.length,")"]})]}),Object(a.jsxs)(Vr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j(Q)},children:[Object(a.jsx)(F.a,{icon:I.q})," Export (",Q.length,")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:W?Object(a.jsxs)($r.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(dc.a,{value:K,striped:100===K,className:"mt-3"})]}):H?Object(a.jsx)($r.a,{loading:!0}):q?Object(a.jsx)(_r,{type:"error",children:Object(a.jsx)(Ur,{errorData:z,fallbackMessage:"An error occurred while loading visits :("})}):Object(N.a)(B)?Object(a.jsx)($r.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(ke.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(jc.a,{pills:!0,fill:!0,children:Object.entries(La).map((function(e){var t=Object(E.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(Va,Object(d.a)(Object(d.a)({},n),{},{to:G(n.subPath)}),r)}))})}),Object(a.jsx)(kr.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)(ua,{title:"Visits during time",visits:Q,highlightedVisits:C,highlightedLabel:U,setSelectedVisits:ce})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(La.byContext.subPath),children:[Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Mc,{title:"Operating systems",stats:Z})}),Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Mc,{title:"Browsers",stats:Y})}),Object(a.jsx)("div",{className:P()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(Hc,{title:"Referrers",stats:X,withPagination:!1,highlightedStats:Ca(C,"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)(Hc,{title:"Visited URLs",stats:re,highlightedLabel:U,highlightedStats:Ca(C,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ae("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(La.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(Hc,{title:"Countries",stats:$,highlightedStats:Ca(C,"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)(Hc,{title:"Cities",stats:ee,highlightedStats:Ca(C,"city"),highlightedLabel:U,extraHeaderContent:function(e){return ne.length>0&&Object(a.jsx)(xa,{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(La.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(ja,{visits:Q,selectedVisits:C,setSelectedVisits:ce,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},Fa=function(e){var t=e.exportVisits;return De((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=Ee(i).domain;return Object(L.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(Ia,{getVisits:function(e){return u(v,Object(d.a)(Object(d.a)({},Na(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)(oc,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[Le.shortUrlVisits(t.params.shortCode)]}))},Aa=r(711),Ma=5e3,Ga=function(e){return e.currentPage>=e.pagesCount},Pa=function(e,t){return 100*t/e},Ba=function(){var e=Object(p.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(p.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(p.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,Ma).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(Aa.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i=function(){var e=Object(p.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:Pa(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,Ma);case 3:if(a=e.sent,s=a.pagination,o=a.data,s&&!Ga(s)){e.next=8;break}return e.abrupt("return",o);case 8:return l=Object(zt.a)(2,s.pagesCount+1),u=Object(pc.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:lt(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)}}(),Ha="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",Wa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",za="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",Ka="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",Qa="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",Ja={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Za=et((We={},Object(u.a)(We,Ha,(function(){return Object(d.a)(Object(d.a)({},Ja),{},{loading:!0})})),Object(u.a)(We,Wa,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ja),{},{error:!0,errorData:r})})),Object(u.a)(We,qa,(function(e,t){var r=t.visits,n=t.shortCode,c=t.domain;return Object(d.a)(Object(d.a)({},Ja),{},{visits:r,shortCode:n,domain:c})})),Object(u.a)(We,za,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(We,Ka,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(We,Qa,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(We,it,(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&&st(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))})})),We),Ja),Ya=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(p.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(p.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:Ha,large:za,finish:qa,error:Wa,progress:Qa},n.abrupt("return",Ba(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},Xa=tt(Ka),$a=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)(H,{text:s,colorGenerator:n})]});return Object(a.jsx)(ic,{title:i,goBack:r,visits:c})},es=function(e,t){var r=t.exportVisits;return De((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)(Ia,{getVisits:function(e){return o(b,Na(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)($a,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[Le.visits]}))},ts="shlink/tagVisits/GET_TAG_VISITS_START",rs="shlink/tagVisits/GET_TAG_VISITS_ERROR",ns="shlink/tagVisits/GET_TAG_VISITS",cs="shlink/tagVisits/GET_TAG_VISITS_LARGE",as="shlink/tagVisits/GET_TAG_VISITS_CANCEL",ss="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",is={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},os=et((qe={},Object(u.a)(qe,ts,(function(){return Object(d.a)(Object(d.a)({},is),{},{loading:!0})})),Object(u.a)(qe,rs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},is),{},{error:!0,errorData:r})})),Object(u.a)(qe,ns,(function(e,t){var r=t.visits,n=t.tag;return Object(d.a)(Object(d.a)({},is),{},{visits:r,tag:n})})),Object(u.a)(qe,cs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(qe,as,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(qe,ss,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(qe,it,(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))})})),qe),is),ls=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var n=Object(p.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(p.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:ts,large:cs,finish:ns,error:rs,progress:ss},n.abrupt("return",Ba(o,u,j,c,l));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},us=tt(as),ds=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(ic,{title:"Orphan visits",goBack:r,visits:n})},js=function(e){var t=e.exportVisits;return De((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)(Ia,{getVisits:function(e){var t;return c(Na(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)(ds,{orphanVisits:s,goBack:r})})}),(function(){return[Le.orphanVisits]}))},bs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",hs="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",Os="shlink/orphanVisits/GET_ORPHAN_VISITS",vs="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",fs="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",ms="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",ps={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},xs=et((ze={},Object(u.a)(ze,bs,(function(){return Object(d.a)(Object(d.a)({},ps),{},{loading:!0})})),Object(u.a)(ze,hs,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ps),{},{error:!0,errorData:r})})),Object(u.a)(ze,Os,(function(e,t){var r=t.visits;return Object(d.a)(Object(d.a)({},ps),{},{visits:r})})),Object(u.a)(ze,vs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(ze,fs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(ze,ms,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(ze,it,(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))})})),ze),ps),gs=function(e,t){return!t||t===e.type},Ss=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(p.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(p.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 Sa(e)&&gs(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:bs,large:vs,finish:Os,error:hs,progress:ms},n.abrupt("return",Ba(o,{},u,c,l));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},ys=tt(fs),Cs="shlink/visitsOverview/GET_OVERVIEW_START",Ns="shlink/visitsOverview/GET_OVERVIEW_ERROR",ks="shlink/visitsOverview/GET_OVERVIEW",ws={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},_s=et((Ke={},Object(u.a)(Ke,Cs,(function(){return Object(d.a)(Object(d.a)({},ws),{},{loading:!0})})),Object(u.a)(Ke,Ns,(function(){return Object(d.a)(Object(d.a)({},ws),{},{error:!0})})),Object(u.a)(Ke,ks,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},ws),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(Ke,it,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(br.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=ya(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),Ke),ws),Us=function(e){return function(){return function(){var t=Object(p.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:Cs}),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:Ns});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Ts=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(cc.a)(n.window,r,e)}}},Rs=function(e,t){e.serviceFactory("MapModal",(function(){return pa})),e.serviceFactory("ShortUrlVisits",Fa,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",es,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",js,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",Ts,"window","csvjson"),e.serviceFactory("getShortUrlVisits",Ya,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return Xa})),e.serviceFactory("getTagVisits",ls,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return us})),e.serviceFactory("getOrphanVisits",Ss,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return ys})),e.serviceFactory("createNewVisits",(function(){return ot})),e.serviceFactory("loadVisitsOverview",Us,"buildShlinkApiClient")},Ds=r(307),Es=r.n(Ds),Ls=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},Vs=function(e){return{id:e,name:e}},Is=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(L.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)(Es.a,{tags:c.map(Vs),tagComponent:function(t){var r=t.tag,n=t.onDelete;return Object(a.jsx)(H,{colorGenerator:e,text:r.name,clearable:!0,className:"react-tags__tag",onClose:n})},suggestions:l.tags.filter((function(e){return!c.includes(e)})).map(Vs),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Ls,{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(","))))))}})}},Fs=r(649),As=function(e,t,r,n){return function(c){var s=c.tag,i=c.tagStats,l=c.selectedServer,u=c.displayed,d=c.toggle,j=Object(Q.c)(),b=Object(E.a)(j,2),h=b[0],O=b[1],f=Object(Q.c)(),m=Object(E.a)(f,2),p=m[0],x=m[1],g=Object(Q.c)(),S=Object(E.a)(g,3),y=S[0],C=S[2],N=Object(L.useRef)(),k=Object(v.d)(l)?l.id:"",w="/server/".concat(k,"/list-short-urls/1?tag=").concat(s);return Object(L.useEffect)((function(){var e;(e=N.current)&&e.scrollWidth>e.clientWidth&&C()}),[N.current]),Object(a.jsxs)(ke.a,{className:"tag-card",children:[Object(a.jsxs)(Xn.a,{className:"tag-card__header",children:[Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:O,children:Object(a.jsx)(F.a,{icon:I.N})}),Object(a.jsx)(Vr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:x,children:Object(a.jsx)(F.a,{icon:I.B})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:y?s:void 0,ref:function(e){N.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(Ls,{tag:s,colorGenerator:n}),Object(a.jsx)(r,{minVersion:"2.2.0",children:Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:d,children:s})}),Object(a.jsx)(r,{maxVersion:"2.1.*",children:Object(a.jsx)(o.b,{to:w,children:s})})]})]}),i&&Object(a.jsx)(Fs.a,{isOpen:u,children:Object(a.jsxs)($n.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:w,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)(F.a,{icon:I.u,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:Yt(i.shortUrlsCount)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(k,"/tag/").concat(s,"/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)(F.a,{icon:I.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:Yt(i.visitsCount)})]})]})}),Object(a.jsx)(e,{tag:s,toggle:O,isOpen:h}),Object(a.jsx)(t,{tag:s,toggle:x,isOpen:p})]})}},Ms=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(p.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)(gr.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)(_r,{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"})]})]})},Gs=r(702),Ps=r(320),Bs=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(L.useState)(r),u=Object(E.a)(l,2),d=u[0],j=u[1],b=Object(L.useState)(t(r)),h=Object(E.a)(b,2),O=h[0],v=h[1],f=Object(Q.c)(),x=Object(E.a)(f,4),g=x[0],S=x[1],y=x[3],C=o.editing,N=o.error,k=o.errorData,w=Object(Ue.b)(Object(p.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)(gr.a,{isOpen:i,toggle:c,centered:!0,onClosed:y,children:Object(a.jsxs)("form",{onSubmit:w,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)(F.a,{icon:I.z,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(Gs.a,{isOpen:g,toggle:S,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(Ps.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)("input",{type:"text",value:d,placeholder:"Tag",required:!0,className:"form-control",onChange:function(e){return j(e.target.value)}})]}),N&&Object(a.jsx)(_r,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Ur,{errorData:k,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Cr.a,{children:[Object(a.jsx)("button",{type:"button",className:"btn btn-link",onClick:c,children:"Cancel"}),Object(a.jsx)("button",{type:"submit",className:"btn btn-primary",disabled:C,children:C?"Saving...":"Save"})]})]})})}},Hs=Math.ceil,Ws=function(e){return De((function(t){var r=t.filterTags,n=t.forceListTags,c=t.tagsList,s=t.selectedServer,i=Object(L.useState)(),o=Object(E.a)(i,2),l=o[0],u=o[1];if(Object(L.useEffect)((function(){n()}),[]),c.loading)return Object(a.jsx)($r.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:r}),function(){if(c.error)return Object(a.jsx)(_r,{type:"error",children:Object(a.jsx)(Ur,{errorData:c.errorData,fallbackMessage:"Error loading tags :("})});var t=c.filteredTags.length;if(t<1)return Object(a.jsx)($r.a,{children:"No tags found"});var r=Object(pc.a)(Hs(t/4),c.filteredTags);return Object(a.jsx)(kr.a,{children:r.map((function(t,r){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:c.stats[t],selectedServer:s,displayed:l===t,toggle:function(){return u(l!==t?t:void 0)}},t)}))},r)}))})}()]})}),(function(){return[Le.visits]}))},qs="shlink/deleteTag/DELETE_TAG_START",zs="shlink/deleteTag/DELETE_TAG_ERROR",Ks="shlink/deleteTag/DELETE_TAG",Qs="shlink/deleteTag/TAG_DELETED",Js=et((Qe={},Object(u.a)(Qe,qs,(function(){return{deleting:!0,error:!1}})),Object(u.a)(Qe,zs,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Qe,Ks,(function(){return{deleting:!1,error:!1}})),Qe),{deleting:!1,error:!1}),Zs=function(e){return function(t){return function(){var r=Object(p.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:qs}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:Ks}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:zs,errorData:lt(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},Ys=function(e){return{type:Qs,tag:e}},Xs="shlink/editTag/EDIT_TAG_START",$s="shlink/editTag/EDIT_TAG_ERROR",ei="shlink/editTag/EDIT_TAG",ti="shlink/editTag/TAG_EDITED",ri=et((Je={},Object(u.a)(Je,Xs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(Je,$s,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(Je,ei,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),Je),{oldName:"",newName:"",editing:!1,error:!1}),ni=function(e,t){return function(r,n,c){return function(){var a=Object(p.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:Xs}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:ei,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:$s,errorData:lt(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},ci=function(e,t,r){return{type:ti,oldName:e,newName:t,color:r}},ai="shlink/tagsList/LIST_TAGS_START",si="shlink/tagsList/LIST_TAGS_ERROR",ii="shlink/tagsList/LIST_TAGS",oi="shlink/tagsList/FILTER_TAGS",li={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},ui=function(e,t){return function(r){return r===e?t:r}},di=function(e,t){return Object(y.a)((function(e){return e===t}),e)},ji=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}),{}))},bi=et((Ze={},Object(u.a)(Ze,ai,(function(){return Object(d.a)(Object(d.a)({},li),{},{loading:!0})})),Object(u.a)(Ze,si,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},li),{},{error:!0,errorData:r})})),Object(u.a)(Ze,ii,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},li),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(Ze,Qs,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:di(e.tags,r),filteredTags:di(e.filteredTags,r)})})),Object(u.a)(Ze,ti,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(ui(r,n)).sort(),filteredTags:e.filteredTags.map(ui(r,n)).sort()})})),Object(u.a)(Ze,oi,(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)(Ze,it,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=ji(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)))})})),Ze),li),hi=function(e){return{type:oi,searchTerm:e}},Oi=function(e,t){e.serviceFactory("TagsSelector",Is,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",As,"DeleteTagConfirmModal","EditTagModal","ForServerVersion","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return Ms})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Bs,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsList",Ws,"TagCard"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo"],["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(p.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(N.a)(s.tags)){r.next=3;break}return r.abrupt("return");case 3:return n({type:ai}),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:ii}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:si,errorData:lt(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 hi})),e.serviceFactory("tagDeleted",(function(){return Ys})),e.serviceFactory("tagEdited",(function(){return ci})),e.serviceFactory("deleteTag",Zs,"buildShlinkApiClient"),e.serviceFactory("editTag",ni,"buildShlinkApiClient","ColorGenerator")},vi=r(312),fi="shlink/mercure/GET_MERCURE_INFO_START",mi="shlink/mercure/GET_MERCURE_INFO_ERROR",pi="shlink/mercure/GET_MERCURE_INFO",xi=et((Ye={},Object(u.a)(Ye,fi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ye,mi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(Ye,pi,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),Ye),{loading:!0,error:!1}),gi=function(e){return function(){return function(){var t=Object(p.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:fi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:mi}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:pi,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:mi});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},Si=function(e){e.serviceFactory("loadMercureInfo",gi,"buildShlinkApiClient")},yi=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(wr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(ea,{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:P()({"text-muted":!r.enabled}),children:"Real-time updates frequency (in minutes):"}),Object(a.jsx)(Gr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){return c(Number(e.target.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."]})]})]})},Ci=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(kr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},Ni=function(e,t,r,n){return function(){return Object(a.jsx)(dn.a,{children:Object(a.jsx)(Ci,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},ki=r(709),wi="shlink/realTimeUpdates/SET_SETTINGS",_i=et(Object(u.a)({},wi,(function(e,t){return Object(ki.a)(e,Object(Dn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),Ui=function(e){return{type:wi,realTimeUpdates:{enabled:e}}},Ti=function(e){return{type:wi,realTimeUpdates:{interval:e}}},Ri=function(e){return{type:wi,shortUrlCreation:e}},Di=function(e){return{type:wi,ui:e}},Ei=function(e){return{type:wi,visits:e}},Li=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},Vi=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)(wr.a,{title:"Short URLs creation",className:"h-100",children:[Object(a.jsx)(Lr.a,{children:Object(a.jsxs)(ea,{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)(J,{text:Li(i.tagFilteringMode),children:[Object(a.jsx)(W.a,{active:!i.tagFilteringMode||"startsWith"===i.tagFilteringMode,onClick:o("startsWith"),children:Li("startsWith")}),Object(a.jsx)(W.a,{active:"includes"===i.tagFilteringMode,onClick:o("includes"),children:Li("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."]}))})]})]})},Ii=function(e){var t=e.settings.ui,r=e.setUiSettings;return Object(a.jsxs)(wr.a,{title:"User interface",className:"h-100",children:[Object(a.jsx)(F.a,{icon:"dark"===(null===t||void 0===t?void 0:t.theme)?I.y:I.J,className:"user-interface__theme-icon"}),Object(a.jsx)(ea,{checked:"dark"===(null===t||void 0===t?void 0:t.theme),onChange:function(e){var t=e?"dark":"light";r({theme:t}),Object(Ec.g)(t)},children:"Use dark theme."})]})},Fi=function(e){var t,r=e.onChange,n=e.active;return Object(a.jsx)(J,{text:null!==(t=ue(n))&&void 0!==t?t:"",children:Object(a.jsx)(me,{active:n,onChange:r})})},Ai=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(wr.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)(Fi,{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})}})]})})},Mi=function(e,t){e.serviceFactory("Settings",Ni,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",Jn.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return yi})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return Vi})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return Ii})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return Ai})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return Ui})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return Ti})),e.serviceFactory("setShortUrlCreationSettings",(function(){return Ri})),e.serviceFactory("setUiSettings",(function(){return Di})),e.serviceFactory("setVisitsSettings",(function(){return Ei}))},Gi="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Pi=function(e){return function(t,r){return function(){var n=Object(p.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:Gi,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:lt(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},Bi="shlink/domainsList/LIST_DOMAINS_START",Hi="shlink/domainsList/LIST_DOMAINS_ERROR",Wi="shlink/domainsList/LIST_DOMAINS",qi="shlink/domainsList/FILTER_DOMAINS",zi={domains:[],filteredDomains:[],loading:!1,error:!1},Ki=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},Qi=et((Xe={},Object(u.a)(Xe,Bi,(function(){return Object(d.a)(Object(d.a)({},zi),{},{loading:!0})})),Object(u.a)(Xe,Hi,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},zi),{},{error:!0,errorData:t})})),Object(u.a)(Xe,Wi,(function(e,t){var r=t.domains;return Object(d.a)(Object(d.a)({},zi),{},{domains:r,filteredDomains:r})})),Object(u.a)(Xe,qi,(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)(Xe,Gi,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(Ki(r,n)),filteredDomains:e.filteredDomains.map(Ki(r,n))})})),Xe),zi),Ji=function(e){return function(){return function(){var t=Object(p.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:Bi}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,r({type:Wi,domains:s}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),r({type:Hi,errorData:lt(t.t0)});case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},Zi=function(e){return{type:qi,searchTerm:e}},Yi=r(704),Xi=r(714),$i=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(Q.c)(),i=Object(E.a)(s,4),o=i[0],l=i[2],u=i[3],d=n.domains,j=Object(N.a)(r),b=function(){return c("")};return Object(L.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(Yi.a,{children:[Object(a.jsx)(Gr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(Xi.a,{addonType:"append",children:[Object(a.jsx)(Vr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(A.a)(b,u),children:Object(a.jsx)(F.a,{icon:I.O})}),Object(a.jsx)(jr.a,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]})]}):Object(a.jsxs)(J,{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)(W.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)(W.a,{divider:!0}),Object(a.jsx)(W.a,{onClick:Object(A.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},eo=function(e){var t=e.isLast,r=Object(br.a)(e,["isLast"]);return Object(a.jsx)(jn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},to=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(L.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(L.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],g=f[1],S=Object(L.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],k=Object(Ue.b)(Object(p.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.d)(h),regular404Redirect:Object(Ue.d)(x),invalidShortUrlRedirect:Object(Ue.d)(C)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(gr.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:k,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)(eo,{value:h,onChange:O,children:[Object(a.jsxs)(Qr,{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)(eo,{value:x,onChange:g,children:[Object(a.jsxs)(Qr,{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)(eo,{value:C,isLast:!0,onChange:N,children:[Object(a.jsx)(Qr,{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"})]})]})})},ro=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)"})]})]})},no=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(F.a,{icon:I.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(jr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},co=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=Object(Q.c)(),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)(no,{}):""}),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)(ro,{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)(ro,{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)(ro,{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)(F.a,{icon:b?I.b:I.m})})}),b&&Object(a.jsxs)(jr.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)(to,{domain:c,isOpen:u,toggle:d,editDomainRedirects:s})]})},ao=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],so=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(L.useEffect)((function(){r()}),[]),o)return Object(a.jsx)($r.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:c}),l?Object(a.jsx)(_r,{type:"error",children:Object(a.jsx)(Ur,{errorData:u,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(wr.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:ao.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:ao.length,className:"text-center",children:"No results found"})}),i.map((function(e){return Object(a.jsx)(co,{domain:e,editDomainRedirects:s,defaultRedirects:d},e.domain)}))]})]})})]})},io=function(e,t){e.serviceFactory("DomainSelector",(function(){return $i})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return so})),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",Ji,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return Zi})),e.serviceFactory("editDomainRedirects",Pi,"buildShlinkApiClient")},oo="shlink/appUpdates/APP_UPDATE_AVAILABLE",lo="shlink/appUpdates/RESET_APP_UPDATE",uo=et(($e={},Object(u.a)($e,oo,(function(){return!0})),Object(u.a)($e,lo,(function(){return!1})),$e),!1),jo=tt(oo),bo=tt(lo),ho=r(152),Oo=r(705),vo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(Q.c)(),s=Object(E.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(Oo.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:wr.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)(F.a,{icon:I.K,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},fo=r(315),mo=function(){var e=Object(p.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(fo.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)}}(),po=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(L.useEffect)((function(){var e,t;0===Object.keys(u).length&&l(),Object(Ec.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:ho.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(i,{})})]}),Object(a.jsx)(vo,{isOpen:j,toggle:h,forceUpdate:mo})]})}},xo=function(e,t){e.serviceFactory("App",po,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",(function(){return jo})),e.serviceFactory("resetAppUpdate",(function(){return bo}))},go=new j.a,So=go.container,yo=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)}}(So,t)))},Co=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(yo,{}))};xo(go,Co),Object(D.a)(go,Co,b.h),R(go),on(go,Co),sc(go,Co,b.h),Oi(go,Co),Rs(go,Co),Object(vi.a)(go),Si(go),Mi(go,Co),io(go,Co);var No=So,ko=r(316),wo=r(73),_o=r(225),Uo=Object(wo.c)({servers:An,selectedServer:Un,shortUrlsList:It,shortUrlsListParams:Pt,shortUrlCreationResult:Ct,shortUrlDeletion:vt,shortUrlEdition:Rt,shortUrlVisits:Za,tagVisits:os,orphanVisits:xs,shortUrlDetail:an,tagsList:bi,tagDelete:Js,tagEdit:ri,mercureInfo:xi,settings:_i,domainsList:Qi,visitsOverview:_s,appUpdated:uo}),To=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||wo.d,Ro={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Do=Object(wo.e)(Uo,Object(_o.load)(Ro),To(Object(wo.a)(Object(_o.save)(Ro),ko.a))),Eo=r(57),Lo=r.n(Eo),Vo=r(317),Io=r(318),Fo=r(319),Ao=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 Mo(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(631),r(632);delete Lo.a.Icon.Default.prototype._getIconUrl,Lo.a.Icon.Default.mergeOptions({iconRetinaUrl:Vo.a,iconUrl:Io.a,shadowUrl:Fo.a});var Go=No.App,Po=No.ScrollToTop,Bo=No.ErrorHandler,Ho=No.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:Do,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(Bo,{children:Object(a.jsx)(Po,{children:Object(a.jsx)(Go,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/feature-manage-domains")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/feature-manage-domains","/service-worker.js");Ao?(!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()}))})):Mo(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")}))):Mo(t,e)}))}}({onUpdate:function(){Do.dispatch(Ho())}})},97: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))}}},98: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)}}},[[335,1,2]]]); +//# sourceMappingURL=main.61a82b33.chunk.js.map \ No newline at end of file diff --git a/feature-manage-domains/static/js/main.61a82b33.chunk.js.map b/feature-manage-domains/static/js/main.61a82b33.chunk.js.map new file mode 100644 index 00000000..9e69de52 --- /dev/null +++ b/feature-manage-domains/static/js/main.61a82b33.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["common/img/ShlinkLogo.tsx","servers/helpers/withSelectedServer.tsx","common/NotFound.tsx","servers/ServersListGroup.tsx","utils/utils.ts","utils/helpers/hooks.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","utils/SimpleCard.tsx","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","common/MainHeader.tsx","common/Home.tsx","common/MenuLayout.tsx","common/AsideMenu.tsx","utils/helpers/features.ts","utils/theme/index.ts","utils/Message.tsx","common/NoMenuLayout.tsx","utils/helpers/version.ts","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","utils/helpers/query.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","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","utils/helpers/qrCodes.ts","short-urls/helpers/qr-codes/QrFormatDropdown.tsx","short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.tsx","short-urls/helpers/QrCodeModal.tsx","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/PaginationDropdown.tsx","common/SimplePaginator.tsx","utils/helpers/visits.ts","utils/helpers/charts.ts","visits/helpers/DefaultChart.tsx","visits/helpers/GraphCard.tsx","visits/helpers/SortableBarGraph.tsx","utils/ToggleSwitch.tsx","visits/helpers/LineChartCard.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/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/TagsList.tsx","tags/reducers/tagDelete.ts","tags/reducers/tagEdit.ts","tags/reducers/tagsList.ts","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.tsx","app/services/provideServices.ts","container/index.ts","reducers/index.ts","container/store.ts","serviceWorkerRegistration.ts","utils/helpers/leaflet.ts","index.tsx","servers/helpers/withoutSelectedServer.tsx","utils/helpers/files.ts"],"names":["ShlinkLogo","color","MAIN_COLOR","className","viewBox","version","xmlns","fill","d","withSelectedServer","WrappedComponent","ServerError","props","selectServer","selectedServer","match","useEffect","params","serverId","isNotFoundServer","loading","NotFound","to","children","ServerListItem","id","name","ListGroupItem","tag","Link","icon","chevronIcon","ServersListGroup","servers","embedded","length","ListGroup","classNames","map","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","undefined","rangeOf","size","mappingFn","startAt","range","hasValue","value","isNil","isEmpty","handleEventPreventingDefault","handler","pipe","e","preventDefault","nonEmptyValueOrNull","useStateFlagTimeout","setTimeout","clearTimeout","initialValue","delay","useState","flag","setFlag","timeout","useRef","callback","current","useToggle","useSwipeable","showSidebar","hideSidebar","swipeMenuIfNoModalExists","event","composedPath","some","classList","contains","document","querySelector","useReactSwipeable","delta","onSwipedLeft","onSwipedRight","hasServerData","server","url","apiKey","isServerWithId","hasOwnProperty","isReachableServer","provideServices","bottle","connect","withRouter","constant","global","window","console","axios","service","ImageDownloader","serviceFactory","ScrollToTop","decorator","MainHeader","Home","withoutSelectedServer","MenuLayout","AsideMenu","ShlinkVersionsContainer","ErrorHandler","location","scrollTo","error","state","hasError","this","outline","onClick","reload","Component","imgUrl","filename","get","responseType","data","URL","createObjectURL","saveUrl","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","SimpleCard","title","bodyClassName","rest","normalizeVersion","versionToSemVer","versionToPrintable","VersionLink","project","href","ShlinkVersions","clientVersion","normalizedClientVersion","printableVersion","classes","ServersDropdown","isOpen","toggleOpen","close","pathname","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","addTagsVisitsRoute","supportsTagVisits","addOrphanVisitsRoute","supportsOrphanVisits","addManageDomainsRoute","supportsDomainRedirects","burgerClasses","swipeableProps","burgerIcon","showOnMobile","exact","from","component","render","AsideMenuItem","activeClassName","DeleteServerButton","addManageDomainsLink","asideClass","suffix","overviewIcon","isActive","_","listIcon","createIcon","flip","tagsIcon","domainsIcon","editIcon","textClassName","serverMatchesVersions","versions","versionMatch","supportsSettingShortCodeLength","minVersion","supportsListingDomains","supportsQrCodeSvgFormat","supportsValidateUrl","supportsQrCodeSizeInQuery","supportsShortUrlTitle","supportsQrCodeMargin","supportsTagsInPatch","supportsBotVisits","supportsCrawlableVisits","supportsQrErrorCorrection","MAIN_COLOR_ALPHA","HIGHLIGHTED_COLOR","HIGHLIGHTED_COLOR_ALPHA","PRIMARY_LIGHT_COLOR","PRIMARY_DARK_COLOR","changeThemeInMarkup","theme","html","getElementsByTagName","setAttribute","isDarkThemeEnabled","getAttribute","getClassForType","type","default","getTextClassForType","Message","fullWidth","body","preloader","spin","NoMenuLayout","versionToMatch","maxVersion","matchesMinVersion","compare","versionIsValidSemVer","memoizeWith","identity","defaultValue","timer","buildShlinkBaseUrl","apiVersion","rejectNilProps","reject","ShlinkApiClient","baseUrl","listShortUrls","a","performRequest","then","shortUrls","createShortUrl","options","filteredOptions","resp","getShortUrlVisits","shortCode","query","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","qs","arrayFormat","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","style","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","intervalToDateRange","dateInterval","endOfDay","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","parseQuery","search","ignoreQueryPrefix","Topics","orphanVisits","shortUrlVisits","selectedBar","buildReducer","initialState","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","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","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","DeleteShortUrlModal","QrCodeModal","isQrModalOpen","toggleQrCode","isDeleteModalOpen","toggleDelete","ButtonDropdown","menuIcon","pieChartIcon","fixedWidth","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","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","actionableFieldClasses","orderableColumnsClasses","tableClasses","supportsTitle","colSpan","buildQrCodeUrl","margin","errorCorrection","useSizeInPath","svgIsSupported","marginIsSupported","errorCorrectionIsSupported","stringifyQuery","QrFormatDropdown","setFormat","QrErrorCorrectionDropdown","setErrorCorrection","imageDownloader","ForServerVersion","setSize","setMargin","capabilities","qrCodeUrl","totalSize","modalSize","step","Number","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","showDomainSelector","disableShortCodeLength","showCustomizeCard","limitAccessCardClasses","showValidateUrl","showCrawlableControl","showExtraValidationsCard","crawlable","goBack","history","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","serverData","onImport","onImportError","serversExporter","createServerItem","plusIcon","nav","inNavbar","serverIcon","exportServers","exportIcon","DeleteServerModal","deleteServer","showModal","hideModal","EditServer","editServer","importServersFromFile","createServers","fileRef","files","click","accept","SELECT_SERVER","RESET_SELECTED_SERVER","toSemVer","getServerVersion","_serverId","resetSelectedServer","serverNotFound","serverNotReachable","EDIT_SERVER","DELETE_SERVER","CREATE_SERVERS","newServers","dissoc","serversListToMap","reduce","acc","responseToServersList","Array","isArray","fetchServers","homepage","remoteList","tagsList","loadVisitsOverview","visitsOverview","loadingTags","loadingVisits","orphanVisitsCount","useHistory","CardTitle","CardText","CardHeader","CardBody","CSV_MIME_TYPES","isCsv","file","includes","ServersImporter","csvjson","fileReaderFactory","reader","resolve","addEventListener","content","toString","toObject","readAsText","ServersExporter","csv","toCSV","saveCsv","FileReader","VisitsHeader","ShortUrlVisitsHeader","shortLink","longLink","visitsStatsTitle","PaginationDropdown","toggleClassName","ranges","setValue","Infinity","SimplePaginator","setCurrentPage","DEFAULT","BROWSERS_WHITELIST","extractDomain","split","fillTheGaps","labels","zipObj","pointerOnHover","chartElement","renderNonDoughnutChartLabel","labelToPick","datasets","datasetIndex","datasetLabel","label","renderDoughnutChartLabel","dropLabelIfHidden","startsWith","renderPieChartLegend","config","defaultColor","chartElementAtEvent","chart","_index","_chart","statsAreDefined","DefaultChart","isBarChart","highlightedStats","highlightedLabel","HorizontalBar","Doughnut","highlightedKey","highlightedData","chartRef","setChartRef","legend","legendCallback","scales","xAxes","ticks","beginAtZero","precision","stacked","yAxes","tooltips","intersect","yLabel","callbacks","onHover","graphData","borderColor","borderWidth","generateGraphData","height","determineHeight","element","getElementAtEvent","chartInstance","generateLegend","GraphCard","footer","CardFooter","toLowerIfString","toLower","pickKeyFromPair","pickValueFromPair","SortableBarGraph","sortingItems","extraHeaderContent","withPagination","setItemsPerPage","determineCurrentPagePairs","firstPageLength","i","sortedPairs","pairs","sortBy","reverse","getSortedPairsForStats","sortedKeys","sortedHighlightedPairs","currentPageStats","fromPairs","currentPageHighlightedStats","splitEvery","highlightedPages","determineStats","activeCities","ToggleSwitch","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","lineTension","selectedLabel","datasetsByPoint","setSelectedVisits","LineChartCard","highlightedVisits","oldestVisitDate","now","cond","always","matcher","determineInitialStep","setStep","skipNoVisits","toggleSkipNoVisits","visitsToDatasetGroups","groupedVisits","groupedHighlighted","maintainAspectRatio","scaleLabel","labelString","axis","entries","menuText","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","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","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","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","shortUrlsLink","scrollWidth","clientWidth","faLink","shortUrlsCount","faEye","deleteTag","tagDelete","tagDeleted","deleting","doDelete","tagEdited","tagEdit","newTagName","setNewTagName","setColor","showColorPicker","toggleColorPicker","hideColorPicker","editing","saveTag","onClosed","colorIcon","Popover","disableAlpha","hex","filterTags","forceListTags","displayedTag","setDisplayedTag","tagsCount","filteredTags","tagsGroups","group","renderContent","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","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","ui","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","link","createElement","visibility","appendChild","removeChild","blob","Blob"],"mappings":"0OAOaA,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,EAA2BC,EAAmDC,GAC5F,OAAO,SAACC,GAAwC,IACtCC,EAAwCD,EAAxCC,aAAcC,EAA0BF,EAA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oB,WAElBlB,GAAM/5B,SAAS81B,U,2FC7BZ,SAAS5vC,EAA8BtG,GAC5C,OAAO,SAACE,GAKN,OAJAI,qBAAU,WACRJ,EAAMqyB,wBACL,IAEI,cAACvyB,EAAD,eAAsBE,O,gCCZjC,oEAAO,IAAM0H,EAAU,SAAC,EAAsB3C,EAAaqC,GAAsB,IAAvD7C,EAAsD,EAAtDA,SAClBq4C,EAAOr4C,EAASs4C,cAAc,KAEpCD,EAAK3sC,aAAa,OAAQlL,GAC1B63C,EAAK3sC,aAAa,WAAY7I,GAC9Bw1C,EAAKvmC,MAAMymC,WAAa,SACxBv4C,EAASmM,KAAKqsC,YAAYH,GAC1BA,EAAK9qB,QACLvtB,EAASmM,KAAKssC,YAAYJ,IAGf1nB,EAAU,SAACxvB,EAAgBsvB,EAAa5tB,GACnD,IAAM61C,EAAO,IAAIC,KAAK,CAAEloB,GAAO,CAAE3kB,KAAM,4BACjCtL,EAAMyC,IAAIC,gBAAgBw1C,GAEhCv1C,EAAQhC,EAAQX,EAAKqC,M","file":"static/js/main.61a82b33.chunk.js","sourcesContent":["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 { 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","import { useState, useRef } from 'react';\nimport { useSwipeable as useReactSwipeable } from 'react-swipeable';\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","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","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 { 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 { 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, supportsTagVisits } 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 addTagsVisitsRoute = supportsTagVisits(selectedServer);\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 {addTagsVisitsRoute && }\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 { 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 supportsSettingShortCodeLength = serverMatchesVersions({ minVersion: '2.1.0' });\n\nexport const supportsTagVisits = serverMatchesVersions({ minVersion: '2.2.0' });\n\nexport const supportsListingDomains = serverMatchesVersions({ minVersion: '2.4.0' });\n\nexport const supportsQrCodeSvgFormat = supportsListingDomains;\n\nexport const supportsValidateUrl = supportsListingDomains;\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 { 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 { FC } from 'react';\nimport './NoMenuLayout.scss';\n\nconst NoMenuLayout: FC = ({ children }) =>
{children}
;\n\nexport default NoMenuLayout;\n","import { compare } from 'compare-versions';\nimport { identity, memoizeWith } from 'ramda';\nimport { Empty, hasValue } from '../utils';\n\ntype SemVerPatternFragment = `${bigint | '*'}`;\n\nexport type SemVerPattern = SemVerPatternFragment\n| `${SemVerPatternFragment}.${SemVerPatternFragment}`\n| `${SemVerPatternFragment}.${SemVerPatternFragment}.${SemVerPatternFragment}`;\n\nexport interface Versions {\n maxVersion?: SemVerPattern;\n minVersion?: SemVerPattern;\n}\n\nexport type SemVer = `${bigint}.${bigint}.${bigint}` | 'latest';\n\nexport const versionMatch = (versionToMatch: SemVer | Empty, { maxVersion, minVersion }: Versions): boolean => {\n if (!hasValue(versionToMatch)) {\n return false;\n }\n\n const matchesMinVersion = !minVersion || compare(versionToMatch, minVersion, '>=');\n const matchesMaxVersion = !maxVersion || compare(versionToMatch, maxVersion, '<=');\n\n return matchesMaxVersion && matchesMinVersion;\n};\n\nconst versionIsValidSemVer = memoizeWith(identity, (version: string): version is SemVer => {\n try {\n return compare(version, version, '=');\n } catch (e) {\n return false;\n }\n});\n\nexport const versionToPrintable = (version: string) => !versionIsValidSemVer(version) ? version : `v${version}`;\n\nexport const versionToSemVer = (defaultValue: SemVer = 'latest') =>\n (version: string): SemVer => versionIsValidSemVer(version) ? version : defaultValue;\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 qs from 'qs';\nimport { 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';\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: (params) => qs.stringify(params, { arrayFormat: 'brackets' }),\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));\n\nexport const intervalToDateRange = (dateInterval?: DateInterval): DateRange => {\n if (!dateInterval) {\n return {};\n }\n\n switch (dateInterval) {\n case 'today':\n return { startDate: startOfDay(new Date()), endDate: new Date() };\n case 'yesterday':\n return { startDate: startOfDaysAgo(1), endDate: endOfDay(subDays(new Date(), 1)) };\n case 'last7Days':\n return { startDate: startOfDaysAgo(7), endDate: new Date() };\n case 'last30Days':\n return { startDate: startOfDaysAgo(30), endDate: new Date() };\n case 'last90Days':\n return { startDate: startOfDaysAgo(90), endDate: new Date() };\n case 'last180days':\n return { startDate: startOfDaysAgo(180), endDate: new Date() };\n case 'last365Days':\n return { startDate: startOfDaysAgo(365), endDate: new Date() };\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","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","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 SortableBarGraph from './helpers/SortableBarGraph';\nimport GraphCard from './helpers/GraphCard';\nimport LineChartCard from './helpers/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 './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) => formatter.format(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';\nimport './Paginator.scss';\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 ? [ 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