diff --git a/feature/not-empty-resultsets/asset-manifest.json b/feature/not-empty-resultsets/asset-manifest.json index 347b3cd8..ae09c8a4 100644 --- a/feature/not-empty-resultsets/asset-manifest.json +++ b/feature/not-empty-resultsets/asset-manifest.json @@ -1,7 +1,7 @@ { "main.css": "/shlink-web-client/feature/not-empty-resultsets/static/css/main.0dc55d47.chunk.css", - "main.js": "/shlink-web-client/feature/not-empty-resultsets/static/js/main.407b3056.chunk.js", - "main.js.map": "/shlink-web-client/feature/not-empty-resultsets/static/js/main.407b3056.chunk.js.map", + "main.js": "/shlink-web-client/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js", + "main.js.map": "/shlink-web-client/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js.map", "runtime~main.js": "/shlink-web-client/feature/not-empty-resultsets/static/js/runtime~main.9539e088.js", "runtime~main.js.map": "/shlink-web-client/feature/not-empty-resultsets/static/js/runtime~main.9539e088.js.map", "static/css/2.04c5acbe.chunk.css": "/shlink-web-client/feature/not-empty-resultsets/static/css/2.04c5acbe.chunk.css", diff --git a/feature/not-empty-resultsets/index.html b/feature/not-empty-resultsets/index.html index 52c0585b..72c2659d 100644 --- a/feature/not-empty-resultsets/index.html +++ b/feature/not-empty-resultsets/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/not-empty-resultsets/static/js/main.407b3056.chunk.js b/feature/not-empty-resultsets/static/js/main.407b3056.chunk.js deleted file mode 100644 index a9ee231d..00000000 --- a/feature/not-empty-resultsets/static/js/main.407b3056.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{103: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))}}},104: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)}},147:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/feature/not-empty-resultsets"}')},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),a=function(e){var t=e.color,r=void 0===t?c.c:t,a=e.className;return Object(n.jsx)("svg",{className:a,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsxs)("g",{fill:r,children:[Object(n.jsx)("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),Object(n.jsx)("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),Object(n.jsx)("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),Object(n.jsx)("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})})}},151:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(0),a=r(1),s=r(54),i=r(30),o=r(60);function l(e,t){return function(r){var l=r.selectServer,u=r.selectedServer,d=r.match;return Object(a.useEffect)((function(){l(d.params.serverId)}),[d.params.serverId]),u?Object(i.c)(u)?Object(c.jsx)(t,{}):Object(c.jsx)(e,Object(n.a)({},r)):Object(c.jsx)(o.a,{children:Object(c.jsx)(s.a,{loading:!0})})}}},153:function(e,t,r){"use strict";var n=r(0),c=r(22),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(557),a=r(558),s=r(22),i=r(8),o=r.n(i),l=r(12),u=r(11),d=function(e){var t=e.id,r=e.name;return Object(n.jsxs)(c.a,{tag:s.b,to:"/server/".concat(t),className:"servers-list__server-item",children:[r,Object(n.jsx)(l.a,{icon:u.j,className:"servers-list__server-item-icon"})]})};t.a=function(e){var t=e.servers,r=e.children,c=e.embedded,s=void 0!==c&&c;return Object(n.jsxs)(n.Fragment,{children:[r&&Object(n.jsx)("h5",{className:"mb-md-3",children:r}),t.length>0&&Object(n.jsx)(a.a,{className:o()("servers-list__list-group",{"servers-list__list-group--embedded":s}),children:t.map((function(e){var t=e.id,r=e.name;return Object(n.jsx)(d,{id:t,name:r},t)}))})]})}},25:function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(7),c=r(1),a=r(280),s=r(51),i=function(e,t){return function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,s=Object(c.useState)(r),i=Object(n.a)(s,2),o=i[0],l=i[1],u=Object(c.useRef)(void 0),d=function(){l(!r),u.current&&t(u.current),u.current=e((function(){return l(r)}),a)};return[o,d]}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(c.useState)(e),r=Object(n.a)(t,2),a=r[0],s=r[1];return[a,function(){return s(!a)},function(){return s(!0)},function(){return s(!1)}]},l=function(e,t){var r=function(e){return function(t){t.event.composedPath().some((function(e){var t=e.classList;return null===t||void 0===t?void 0:t.contains("visits-table")}))||document.querySelector(".modal")||e()}};return Object(a.useSwipeable)({delta:40,onSwipedLeft:r(t),onSwipedRight:r(e)})},u=function(e,t){var r=Object(c.useState)(t),a=Object(n.a)(r,2),i=a[0],o=a[1];return[i,function(t){var r=window,n=r.location,c=r.history,a=Object(s.a)(n.search);a[e]=t,c.pushState(null,"","".concat(n.pathname,"?").concat(Object(s.b)(a))),o(t)}]},d=function(e,t){var r=Object(c.useRef)(!0);Object(c.useEffect)((function(){!r.current&&e(),r.current=!1}),t)}},277:function(e,t,r){"use strict";(function(e){var n=r(278),c=r.n(n),a=r(279),s=r(310),i=r(311),o=r(312),l=r(313),u=r(281),d=r(308),j=r(103),b=r(283);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",n),t.decorator("Home",r(["servers"],["resetSelectedServer"])),t.serviceFactory("MenuLayout",o.a,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),t.decorator("MenuLayout",r(["selectedServer"],["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(49))},279: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})}}},281:function(e,t,r){"use strict";var n=r(19),c=r(27),a=r(37),s=r(36),i=r(0),o=r(1),l=r(217),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)}},283:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(15),s=r(19),i=r(27),o=r(104),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}()},299:function(e,t,r){"use strict";(function(e){var n=r(25),c=r(300),a=r(301);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.c,"setTimeout","clearTimeout")}}).call(this,r(49))},30:function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"e",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"f",(function(){return l}));var n=r(540),c=function(e){return!(null===e||void 0===e||!e.url)&&!(null===e||void 0===e||!e.apiKey)},a=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("id"))},s=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("version"))},i=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("serverNotFound"))},o=function(e){return a(e)?e.id:""},l=function(e){return Object(n.a)(["id","autoConnect"],e)}},300:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(19),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))}}},301:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(19),c=r(31),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:{}}},308:function(e,t,r){"use strict";var n=r(0),c=r(8),a=r.n(c),s=r(30),i=r(545),o=r(52),l=r(70),u=Object(i.a)(Object(l.c)(),l.b),d=function(e){var t=e.project,r=e.version;return Object(n.jsx)(o.a,{href:"https://github.com/shlinkio/".concat(t,"/releases/").concat(r),className:"text-muted",children:Object(n.jsx)("b",{children:r})})},j=function(e){var t=e.selectedServer,r=e.clientVersion,c=u(void 0===r?"%_VERSION_%":r);return Object(n.jsxs)("small",{className:"text-muted",children:[Object(s.d)(t)&&Object(n.jsxs)(n.Fragment,{children:["Server: ",Object(n.jsx)(d,{project:"shlink",version:t.printableVersion})," - "]}),"Client: ",Object(n.jsx)(d,{project:"shlink-web-client",version:c})]})};t.a=function(e){var t=e.selectedServer,r=a()("text-center",{"shlink-versions-container--with-server":Object(s.d)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},31:function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(546),c=r(213),a=r(318),s=r(545),i=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Object(n.a)(r,e+1).map(t)},o=function(e){return!Object(c.a)(e)&&!Object(a.a)(e)},l=function(e){return Object(s.a)((function(e){return e.preventDefault()}),e)},u=function(e){return Object(a.a)(e)?null:e},d=function(e){return"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}},310:function(e,t,r){"use strict";var n=r(7),c=r(0),a=r(11),s=r(12),i=r(1),o=r(22),l=r(550),u=r(551),d=r(552),j=r(553),b=r(554),h=r(555),O=r(556),v=r(8),f=r.n(v),m=r(25),x=r(150);t.a=function(e){return function(t){var r=t.location,v=Object(m.e)(),g=Object(n.a)(v,4),p=g[0],y=g[1],S=g[3],C=r.pathname;Object(i.useEffect)(S,[r]);var N="/settings",k=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":p});return Object(c.jsxs)(l.a,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[Object(c.jsxs)(u.a,{tag:o.b,to:"/",children:[Object(c.jsx)(x.a,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),Object(c.jsx)(d.a,{onClick:y,children:Object(c.jsx)(s.a,{icon:a.i,className:k})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:p,children:Object(c.jsxs)(b.a,{navbar:!0,className:"ml-auto",children:[Object(c.jsx)(h.a,{children:Object(c.jsxs)(O.a,{tag:o.b,to:N,active:C===N,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},311:function(e,t,r){"use strict";var n=r(0),c=r(1),a=r(559),s=r(318),i=r(22),o=r(316),l=r(541),u=r(52),d=r(12),j=r(11),b=r(165),h=r(150);t.a=function(e){var t=e.servers,r=e.history,O=Object(a.a)(t),v=!Object(s.a)(O);return Object(c.useEffect)((function(){var e=O.find((function(e){return e.autoConnect}));e&&r.push("/server/".concat(e.id))}),[]),Object(n.jsx)("div",{className:"home",children:Object(n.jsx)(o.a,{className:"home__main-card",children:Object(n.jsxs)(l.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)(h.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)(b.a,{embedded:!0,servers:O,children:!v&&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)(i.b,{to:"/server/create",className:"btn btn-outline-primary btn-lg mr-2",children:[Object(n.jsx)(d.a,{icon:j.E})," ",Object(n.jsx)("span",{className:"ml-1",children:"Add a server"})]})}),Object(n.jsx)("p",{className:"mb-0 mt-5",children:Object(n.jsx)(u.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)(d.a,{icon:j.o})]})})})]})})]})]})})})}},312:function(e,t,r){"use strict";var n=r(3),c=r(7),a=r(0),s=r(1),i=r(43),o=r(11),l=r(12),u=r(8),d=r.n(u),j=r(151),b=r(25),h=r(38),O=r(30),v=r(153);t.a=function(e,t,r,u,f,m,x,g,p,y,S){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,k=Object(b.e)(),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.d)(N))return Object(a.jsx)(g,{});var E=Object(h.f)(N),D=Object(h.d)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),V=Object(b.d)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:L,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},V),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:_}),Object(a.jsx)("div",{className:"menu-layout__container",onClick:function(){return R()},children:Object(a.jsx)("div",{className:"container-xl",children:Object(a.jsxs)(i.d,{children:[Object(a.jsx)(i.a,{exact:!0,from:"/server/:serverId",to:"/server/:serverId/overview"}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/overview",component:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/list-short-urls/:page",component:t}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/create-short-url",component:u}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/visits",component:f}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/edit",component:y}),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:x}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),D&&Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-domains",component:S}),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"})}})]})})})]})}))]})}),g)}},313:function(e,t,r){"use strict";var n=r(3),c=r(40),a=r(0),s=r(11),i=r(12),o=r(22),l=r(8),u=r.n(l),d=r(30),j=r(38),b=function(e){var t=e.children,r=e.to,s=e.className,i=Object(c.a)(e,["children","to","className"]);return Object(a.jsx)(o.c,Object(n.a)(Object(n.a)({className:u()("aside-menu__item",s),activeClassName:"aside-menu__item--selected",to:r},i),{},{children:t}))};t.a=function(e){return function(t){var r=t.selectedServer,n=t.showOnMobile,c=void 0!==n&&n,o=Object(d.e)(r),l=o?r.id:"",h=Object(j.d)(r),O=u()("aside-menu",{"aside-menu--hidden":!c}),v=function(e){return"/server/".concat(l).concat(e)};return Object(a.jsx)("aside",{className:O,children:Object(a.jsxs)("nav",{className:"nav flex-column aside-menu__nav",children:[Object(a.jsxs)(b,{to:v("/overview"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.t}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Overview"})]}),Object(a.jsxs)(b,{to:v("/list-short-urls/1"),isActive:function(e,t){return null!==t.pathname.match("/list-short-urls")},children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.w}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),Object(a.jsxs)(b,{to:v("/create-short-url"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.v,flip:"horizontal"}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),Object(a.jsxs)(b,{to:v("/manage-tags"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.N}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),h&&Object(a.jsxs)(b,{to:v("/manage-domains"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.s}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),Object(a.jsxs)(b,{to:v("/edit"),className:"aside-menu__item--push",children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.B}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),o&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},319:function(e,t,r){e.exports=r(536)},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(40),a=r(0),s=r(316),i=r(543),o=r(544),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})]}))}},38:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"j",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"k",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"i",(function(){return b})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return O})),r.d(t,"c",(function(){return v}));var n=r(30),c=r(70),a=function(e){return function(t){return Object(n.d)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.5.0"}),i=a({minVersion:"2.6.0"}),o=i,l=i,u=i,d=a({minVersion:"2.7.0"}),j=d,b=a({minVersion:"2.8.0"}),h=b,O=a({minVersion:"2.9.0"}),v=a({minVersion:"2.10.0"})},405:function(e,t){},407:function(e,t){},46:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return u}));var n="#4696e5",c="rgba(70, 150, 229, 0.4)",a="#f77f28",s="rgba(247, 127, 40, 0.4)",i="white",o="#161b22",l=function(e){var t,r=document.getElementsByTagName("html");null===r||void 0===r||null===(t=r[0])||void 0===t||t.setAttribute("data-theme",e)},u=function(){var e,t=document.getElementsByTagName("html");return"dark"===(null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.getAttribute("data-theme"))}},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(212),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},536:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return La})),r.d(n,"normalizeVisits",(function(){return Va}));var c,a=r(0),s=r(48),i=r(163),o=r(22),l=r(147),u=r(10),d=r(3),j=r(276),b=r(43),h=r(608),O=r(613),v=r(30),f=r(6),m=r.n(f),x=r(15),g=r(19),p=r(7),y=r(40),S=r(309),C=r(213),N=r(318),k=r(51),w=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},_=Object(S.a)(C.a),U=function(e){var t=e.orderBy,r=void 0===t?{}:t,n=Object(y.a)(e,["orderBy"]),c=Object.keys(r),a=Object(p.a)(c,1)[0],s=Object.values(r),i=Object(p.a)(s,1)[0];return i?Object(d.a)(Object(d.a)({},n),{},{orderBy:"".concat(a,"-").concat(i)}):n},T=function e(t,r,n){var c=this;Object(g.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(x.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",U(t)).then((function(e){return e.data.shortUrls})));case 2:case"end":return e.stop()}}),e)}))),this.createShortUrl=function(){var e=Object(x.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(S.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(x.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(x.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(w(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:_(n),data:a,paramsSerializer:k.b});case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),s=e.t0.response,!s&&2!==c.apiVersion){e.next=15;break}throw e.t0;case 15:return c.apiVersion=c.apiVersion-1,e.next=18,c.performRequest(t,r,n,a);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),this.apiVersion=2},R={},E=function(e){return function(t){var r,n=function(e){return"function"===typeof e}(t)?(r=t,Object(O.a)("selectedServer",r())):t;if(!Object(v.b)(n))throw new Error("There's no selected server or it is not found");var c=n.url,a=n.apiKey,s="".concat(c,"_").concat(a);return R[s]||(R[s]=new T(e,c,a)),R[s]}},D=function(e){e.serviceFactory("buildShlinkApiClient",E,"axios")},L=r(277),V=r(11),I=r(12),F=r(545),A=r(361),M=r(1),G=r(8),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=e.initialValue,u=void 0===l?"":l,d=Object(M.useState)(u),j=Object(p.a)(d,2),b=j[0],h=j[1],O=function(){c&&clearTimeout(c),c=null},v=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;h(e),O(),c=setTimeout((function(){t(e),O()}),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:b,onChange:function(e){return v(e.target.value)}}),Object(a.jsx)(I.a,{icon:V.H,className:"search-field__icon"}),Object(a.jsx)("div",{className:"close search-field__close",hidden:""===b,id:"search-field__close",onClick:function(){return v("",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(565),q=r(130),z=r(560),Q=r(561),K=r(25),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(K.e)(),b=Object(p.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)(Q.a,{className:"w-100",right:u,style:f,children:i})]})},Z=r(91),Y=r(365),X=r(200),$=r(307),ee=r(563),te=r(564),re=r(538),ne=r(562),ce=(r(537),r(362)),ae=r(363),se=r(364),ie=function(e){return"string"!==typeof e},oe=function(e,t){return e&&ie(e)?t?Object(re.default)(e,t):Object(ne.a)(e):e},le=function(e){return oe(e,void 0)},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return oe(t,e)}}(),de=function(e){return ie(e)?e:Object(A.default)(e)},je=function(e,t,r){try{return Object(ce.default)(de(e),{start:de(null!==t&&void 0!==t?t:e),end:de(null!==r&&void 0!==r?r:e)})}catch(n){return!1}},be=function(e,t){return Object(ae.default)(e,t)||Object(se.default)(e,t)},he=function(e){return void 0===e||Object(N.a)(Object($.a)(Boolean,e))},Oe=function(e){return"string"===typeof e},ve={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",all:void 0},fe=Object.keys(ve).filter((function(e){return"all"!==e})),me=function(e){if(e&&"all"!==e)return Oe(e)?ve[e]:function(e){if(e&&!he(e))return e.startDate&&!e.endDate?"Since ".concat(ue(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ue(e.endDate)):"".concat(ue(e.startDate)," - ").concat(ue(e.endDate))}(e)},xe=function(e){return Object(Z.default)(Object(Y.default)(new Date,e))},ge=function(e){return{startDate:e,endDate:Object(X.default)(new Date)}},pe=function(e){if(!e||"all"===e)return{};switch(e){case"today":return ge(Object(Z.default)(new Date));case"yesterday":return{startDate:xe(1),endDate:Object(X.default)(Object(Y.default)(new Date,1))};case"last7Days":return ge(xe(7));case"last30Days":return ge(xe(30));case"last90Days":return ge(xe(90));case"last180Days":return ge(xe(180));case"last365Days":return ge(xe(365))}return{}},ye=function(e){var t=de(e);return Object(ee.a)([[function(){return be(Object(Z.default)(new Date),t)},function(){return"today"}],[function(){return be(xe(1),t)},function(){return"yesterday"}],[function(){return be(xe(7),t)},function(){return"last7Days"}],[function(){return be(xe(30),t)},function(){return"last30Days"}],[function(){return be(xe(90),t)},function(){return"last90Days"}],[function(){return be(xe(180),t)},function(){return"last180Days"}],[function(){return be(xe(365),t)},function(){return"last365Days"}],[te.a,function(){return"all"}]])()},Se=r(286),Ce=r.n(Se),Ne=r(78),ke=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(C.a)(n),s=Object(M.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(Ce.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)(I.a,{icon:Ne.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},we=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)(ke,{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)(ke,{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})})]})},_e=function(e){var t=e.active,r=e.allText,n=e.onChange;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{active:"all"===t,onClick:function(){return n("all")},children:r}),Object(a.jsx)(W.a,{divider:!0}),fe.map((function(e){return Object(a.jsx)(W.a,{active:t===e,onClick:function(){return n(e)},children:me(e)},e)}))]})},Ue=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=e.updatable,o=void 0!==i&&i,l=Oe(n),u=Object(M.useState)(l?n:void 0),j=Object(p.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(l?void 0:n),v=Object(p.a)(O,2),f=v[0],m=v[1],x=function(e){h(he(e)?"all":void 0),m(e),r(e)},g=function(e){h(e),m(void 0),r(pe(e))};return o&&Object(K.a)((function(){Oe(n)?g(n):n&&x(n)}),[n]),Object(a.jsxs)(J,{disabled:s,text:null!==(t=me(null!==b&&void 0!==b?b:f))&&void 0!==t?t:c,children:[Object(a.jsx)(_e,{allText:c,active:b,onChange:g}),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)(we,Object(d.a)(Object(d.a)({},f),{},{onStartDateChange:function(e){return x(Object(d.a)(Object(d.a)({},f),{},{startDate:e}))},onEndDateChange:function(e){return x(Object(d.a)(Object(d.a)({},f),{},{endDate:e}))}}))})]})},Te=function(e){var t=e.history,r=e.location,n=e.match,c=Object(M.useMemo)((function(){return Object(k.a)(r.search)}),[r]);return[c,function(e){var r=Object(k.b)(Object(d.a)(Object(d.a)({},c),e)),a=Object(N.a)(r)?"":"?".concat(r);t.push("/server/".concat(null===n||void 0===n?void 0:n.params.serverId,"/list-short-urls/1").concat(a))}]},Re=function(e){return e?Object(A.default)(e):null},Ee=function(e){return function(t){var r,n=Te(t),c=Object(p.a)(n,2),s=c[0],i=s.search,o=s.tags,l=s.startDate,u=s.endDate,d=c[1],j=null!==(r=null===o||void 0===o?void 0:o.split(","))&&void 0!==r?r:[],b=Object(F.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=le(n))&&void 0!==t?t:void 0,endDate:null!==(r=le(c))&&void 0!==r?r:void 0}}),d),h=Object(F.a)((function(e){return Object(N.a)(e)?void 0:e}),(function(e){return d({search:e})})),O=Object(F.a)((function(e){return j.filter((function(t){return t!==e}))}),(function(e){return 0===e.length?void 0:e.join(",")}),(function(e){return d({tags:e})}));return Object(a.jsxs)("div",{className:"search-bar-container",children:[Object(a.jsx)(B,{initialValue:i,onChange:h}),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)(Ue,{defaultText:"All short URLs",initialDateRange:{startDate:Re(l),endDate:Re(u)},onDatesChange:b})})})}),j.length>0&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(I.a,{icon:V.N,className:"search-bar__tags-icon"}),"\xa0",j.map((function(t){return Object(a.jsx)(H,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return O(t)}},t)}))]})]})}},De=r(26),Le=r(575),Ve=r(61),Ie=r(559),Fe=r(316),Ae=r(566),Me=r(567),Ge=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},Pe=function(e,t){var r=t.field,n=t.dir;return r&&n?e.sort((function(e,t){var c="ASC"===n?1:-1,a="ASC"===n?-1:1;return e[r]>t[r]?c:a})):e};function Be(e){var t,r=e.items,n=e.order,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=Ge(e,n.field,n.dir);c(t?e:void 0,t)}};return Object(a.jsxs)(Ae.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&&!n.field&&Object(a.jsx)(a.Fragment,{children:"Order by..."}),i&&n.field&&'Order by: "'.concat(r[n.field],'" - "').concat(null!==(t=n.dir)&&void 0!==t?t:"DESC",'"')]}),Object(a.jsxs)(Q.a,{right:l,className:P()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(Me.a)(r).map((function(e){var t=Object(p.a)(e,2),r=t[0],c=t[1];return Object(a.jsxs)(W.a,{active:n.field===r,onClick:u(r),children:[c,n.field===r&&Object(a.jsx)(I.a,{icon:"ASC"===n.dir?V.K:V.J,className:"sorting-dropdown__sort-icon"})]},r)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!n.field,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var He=r(287);function We(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(M.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 He.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(De.a)(r)),r.clear()}),1e3*o*60);return Object(F.a)((function(){return clearInterval(a)}),(function(){return null===e||void 0===e?void 0:e()}))}),[i]),Object(a.jsx)(e,Object(d.a)({},n))}}var qe=function e(){Object(g.a)(this,e)};function ze(e){var t=e.currentOrder,r=e.field,n=e.className,c=void 0===n?"ml-1":n;return t.dir&&t.field===r?Object(a.jsx)(I.a,{icon:"ASC"===t.dir?V.f:V.e,className:c}):null}qe.visits="https://shlink.io/new-visit",qe.orphanVisits="https://shlink.io/new-orphan-visit",qe.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Qe,Ke,Je,Ze,Ye,Xe,$e,et,tt,rt,nt,ct,at,st,it,ot,lt,ut,dt,jt=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}},bt=function(e){return function(){return{type:e}}},ht=r(568),Ot=r(569),vt=r(288),ft=r(570),mt=function(e,t,r){return Object(C.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},xt="shlink/visitCreation/CREATE_VISITS",gt=function(e){return{type:xt,createdVisits:e}},pt=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},yt=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},St="shlink/deleteShortUrl/DELETE_SHORT_URL_START",Ct="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",Nt="shlink/deleteShortUrl/SHORT_URL_DELETED",kt="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",wt={shortCode:"",loading:!1,error:!1},_t=jt((Qe={},Object(u.a)(Qe,St,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Qe,Ct,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Qe,Nt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Qe,kt,(function(){return wt})),Qe),wt),Ut=function(e){return function(t,r){return function(){var n=Object(x.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:St}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:Nt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:Ct,errorData:pt(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},Tt=bt(kt),Rt="shlink/createShortUrl/CREATE_SHORT_URL_START",Et="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",Dt="shlink/createShortUrl/CREATE_SHORT_URL",Lt="shlink/createShortUrl/RESET_CREATE_SHORT_URL",Vt={result:null,saving:!1,error:!1},It=jt((Ke={},Object(u.a)(Ke,Rt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ke,Et,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Ke,Dt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Ke,Lt,(function(){return Vt})),Ke),Vt),Ft=function(e){return function(t){return function(){var r=Object(x.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:Rt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Dt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:Et,errorData:pt(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},At=bt(Lt),Mt=r(38),Gt="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Pt="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Bt="shlink/shortUrlEdition/SHORT_URL_EDITED",Ht=jt((Je={},Object(u.a)(Je,Gt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Je,Pt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Je,Bt,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),Je),{saving:!1,error:!1}),Wt=function(e){return function(t,r,n){return function(){var c=Object(x.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:Gt}),i=s(),o=i.selectedServer,l=!Object(Mt.k)(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(p.a)(b,1),O=h[0],a({shortUrl:O,type:Bt}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Pt,errorData:pt(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},qt="shlink/shortUrlsList/LIST_SHORT_URLS_START",zt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Qt="shlink/shortUrlsList/LIST_SHORT_URLS",Kt=jt((Ze={},Object(u.a)(Ze,qt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ze,zt,(function(){return{loading:!1,error:!0}})),Object(u.a)(Ze,Qt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Ze,Nt,Object(F.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(ht.a)(["shortUrls","data"],Object(S.a)((function(e){return mt(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(ht.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Ze,xt,(function(e,t){var r,n,c=t.createdVisits;return Object(ht.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(Ot.a)(c.filter((function(t){var r=t.shortUrl;return r&&mt(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(vt.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Ze,Dt,Object(F.a)((function(e,t){var r=t.result;return e.shortUrls?Object(ht.a)(["shortUrls","data"],[r].concat(Object(De.a)(Object(ft.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(ht.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Ze,Bt,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(ht.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return mt(e,t,n)?r:e})),e):e})),Ze),{loading:!0,error:!1}),Jt=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(x.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:qt}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Qt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:zt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Zt="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",Yt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Xt={page:"1",orderBy:{dateCreated:"DESC"}},$t=jt((Ye={},Object(u.a)(Ye,Qt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ye,Zt,(function(){return Xt})),Ye),Xt),er=bt(Zt),tr=r(572),rr=r(573),nr=r(574),cr=r(546),ar=r(285),sr=r(571),ir=Math.ceil,or=new Intl.NumberFormat("en-US"),lr=function(e){return or.format(Number(e))},ur="...",dr=function(e,t){var r=Object(cr.a)(Object(ar.a)(2,e-2),Object(sr.a)(t-1,e+2)+1);return e-2>2&&r.unshift(ur),e+2=d,children:Object(a.jsx)(rr.a,{next:!0,tag:o.b,to:j(l+1)})})]})},vr=function(e,t){return We((function(r){var n,c=r.listShortUrls,s=r.resetShortUrlParams,i=r.shortUrlsListParams,o=r.match,l=r.location,j=r.history,b=r.shortUrlsList,h=r.selectedServer,O=Object(v.a)(h),f=i.orderBy,m=Object(M.useState)({field:f&&Object(Le.a)(Object(Ve.a)(f)),dir:f&&Object(Le.a)(Object(Ie.a)(f))}),x=Object(p.a)(m,2),g=x[0],y=x[1],S=Te({history:j,match:o,location:l}),C=Object(p.a)(S,2),N=C[0],k=N.tags,w=N.search,_=N.startDate,U=N.endDate,T=C[1],R=Object(M.useMemo)((function(){var e;return null!==(e=null===k||void 0===k?void 0:k.split(","))&&void 0!==e?e:[]}),[k]),E=(null!==(n=null===b||void 0===b?void 0:b.shortUrls)&&void 0!==n?n:{}).pagination,D=function(e){return c(Object(d.a)(Object(d.a)({},i),e))},L=function(e,t){y({field:e,dir:t}),D({orderBy:e?Object(u.a)({},e,t):void 0})},V=Object(F.a)((function(e){return Object(De.a)(new Set([].concat(Object(De.a)(R),[e]))).join(",")}),(function(e){return T({tags:e})}));return Object(M.useEffect)((function(){return s}),[]),Object(M.useEffect)((function(){D({page:o.params.page,searchTerm:w,tags:R,itemsPerPage:void 0,startDate:_,endDate:U})}),[o.params.page,w,R,_,U]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"mb-3",children:Object(a.jsx)(t,{})}),Object(a.jsx)("div",{className:"d-block d-lg-none mb-3",children:Object(a.jsx)(Be,{items:Yt,order:g,onChange:L})}),Object(a.jsxs)(Fe.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{selectedServer:h,shortUrlsList:b,orderByColumn:function(e){return function(){return L(e,Ge(e,g.field,g.dir))}},renderOrderIcon:function(e){return Object(a.jsx)(ze,{currentOrder:g,field:e})},onTagClick:V}),Object(a.jsx)(Or,{paginator:E,serverId:O,currentQueryString:l.search})]})]})}),(function(){return[qe.visits]}))},fr=r(52),mr=r(160),xr=r.n(mr),gr=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(xr.a,{text:t,onCopy:r,children:Object(a.jsx)(I.a,{icon:Ne.c,className:"ml-2 copy-to-clipboard-icon"})})},pr=r(576),yr=r(615),Sr=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=ie(t)?t:Object(A.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(pr.a)(i),"000"),children:s?"".concat(Object(yr.a)(new Date,i)," ago"):Object(re.default)(i,n)})},Cr=r(577),Nr=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)},kr=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(y.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.e)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:Nr(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},wr=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)(kr,{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:lr(r)})});if(!o)return l;var u=lr(o),d=Object(M.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:"indivisible",children:[l,Object(a.jsxs)("small",{className:"short-urls-visits-count__max-visits-control",ref:function(e){d.current=e},children:[" ","/ ",u," ",Object(a.jsx)("sup",{children:Object(a.jsx)(I.a,{icon:V.u})})]})]}),Object(a.jsxs)(Cr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},_r=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(p.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(p.a)(h,2),v=O[0],f=O[1],m=Object(M.useRef)(!0);return Object(M.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)(Sr,{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)(fr.a,{href:i.shortUrl}),Object(a.jsx)(gr,{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)(fr.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)(fr.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)(wr,{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})})]})}},Ur=r(578),Tr=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(Ur.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(z.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(I.a,{icon:V.n}),"\xa0"]}),Object(a.jsx)(Q.a,{right:s,children:n})]})},Rr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(K.e)(),i=Object(p.a)(s,2),o=i[0],l=i[1],u=Object(K.e)(),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(p.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(Tr,{toggle:l,isOpen:o,children:[Object(a.jsxs)(W.a,{tag:kr,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(I.a,{icon:V.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(W.a,{tag:kr,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(W.a,{onClick:b,children:[Object(a.jsx)(I.a,{icon:V.F,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:"dropdown-item--danger",onClick:f,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},Er=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(M.useMemo)((function(){return function(e){var t,r;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,forwardQuery:null===(r=null===e||void 0===e?void 0:e.forwardQuery)||void 0===r||r}}(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(x.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}))]})}},Dr=r(617),Lr=r(579),Vr=r(580),Ir=r(581),Fr=r(547),Ar=r(31),Mr=r(541),Gr=r(32),Pr=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(Mr.a,{className:n,children:Object(a.jsx)("div",{className:P()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(Gr.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})})})},Br=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(", "),"]"]}))]})},Hr=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(M.useState)(""),l=Object(p.a)(o,2),u=l[0],d=l[1];Object(M.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(F.a)(s,r),O=Object(Ar.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Fr.a)}));return Object(a.jsx)(Dr.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(Lr.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(Vr.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)(Pr,{type:yt(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(Br,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(Ir.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"})]})]})})},Wr=r(220),qr=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(p.a)(l,2),d=u[0],j=u[1];if(Object(M.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(Pr,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.P,className:"float-right pointer",onClick:s}),Object(a.jsx)(Br,{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)(Pr,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.P,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)(xr.a,{text:b,onCopy:j,children:Object(a.jsxs)("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[Object(a.jsx)(I.a,{icon:Ne.c})," Copy"]})}),Object(a.jsx)(Wr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},zr=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(Mt.j)(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 text-dark",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)}))})]})}},Qr=r(582),Kr=r(217),Jr=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"})]})},Zr=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"]})]})},Yr=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(M.useState)(300),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(0),O=Object(p.a)(h,2),v=O[0],f=O[1],g=Object(M.useState)("png"),y=Object(p.a)(g,2),S=y[0],C=y[1],w=Object(M.useState)("L"),_=Object(p.a)(w,2),U=_[0],T=_[1],R=Object(M.useMemo)((function(){return{useSizeInPath:!Object(Mt.h)(l),marginIsSupported:Object(Mt.g)(l),errorCorrectionIsSupported:Object(Mt.i)(l)}}),[l]),E=R.marginIsSupported!==R.errorCorrectionIsSupported,D=Object(M.useMemo)((function(){return function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.marginIsSupported,l=r.errorCorrectionIsSupported,u="".concat(e,"/qr-code").concat(i?"/".concat(n):""),d=Object(k.b)({size:i?void 0:n,format:c,margin:o&&a>0?a:void 0,errorCorrection:l?s:void 0});return"".concat(u).concat(Object(N.a)(d)?"":"?".concat(d))}(c,{size:j,format:S,margin:v,errorCorrection:U},R)}),[c,j,S,v,U,R]),L=Object(M.useMemo)((function(){return j+v}),[j,v]),F=Object(M.useMemo)((function(){if(!(L<500))return L<800?"lg":"xl"}),[L]);return Object(a.jsxs)(Dr.a,{isOpen:o,toggle:i,centered:!0,size:F,children:[Object(a.jsxs)(Lr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(fr.a,{href:c,children:c})]}),Object(a.jsxs)(Vr.a,{children:[Object(a.jsxs)(Mr.a,{children:[Object(a.jsxs)(Qr.a,{className:P()({"col-md-4":E,"col-md-6":!E}),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))}})]}),R.marginIsSupported&&Object(a.jsxs)(Qr.a,{className:E?"col-md-4":"col-md-6",children:[Object(a.jsxs)("label",{className:"mb-0",children:["Margin: ",v,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:v,step:1,min:0,max:100,onChange:function(e){return f(Number(e.target.value))}})]}),Object(a.jsx)(Qr.a,{className:E?"col-md-4":"col-md-6",children:Object(a.jsx)(Jr,{format:S,setFormat:C})}),R.errorCorrectionIsSupported&&Object(a.jsx)(Qr.a,{className:"col-md-6",children:Object(a.jsx)(Zr,{errorCorrection:U,setErrorCorrection:T})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(fr.a,{href:D}),Object(a.jsx)(gr,{text:D})]}),Object(a.jsx)("img",{src:D,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)(Kr.a,{block:!0,color:"primary",onClick:Object(x.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(D,"".concat(s,"-qr-code.").concat(S)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(I.a,{icon:V.q,className:"ml-1"})]})})})]})]})]})}},Xr=r(585),$r=r(583),en=r(584),tn=r(612),rn=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?Fr.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(M.useRef)(Object(tn.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})]})},nn=function(e){return Object(a.jsx)(rn,Object(d.a)({type:"checkbox"},e))},cn=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(Dr.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(Lr.a,{toggle:r,children:"Info"}),Object(a.jsxs)(Vr.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"})]})]})]})},an=function(){var e=Object(K.e)(),t=Object(p.a)(e,2),r=t[0],n=t[1];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{title:"What does this mean?",children:Object(a.jsx)(I.a,{icon:V.u,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(cn,{isOpen:r,toggle:n})]})},sn=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(M.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(I.a,{icon:V.u})}),Object(a.jsx)(Cr.a,{target:function(){return s.current},placement:n,children:c})]})},on=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(nn,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(sn,{placement:"right",children:r})]})},ln=Object(F.a)($r.a,Object(en.a)(/ /g,"-")),un=function(e){return"string"===typeof e?Object(A.default)(e):e},dn=function(e){return{"col-sm-6":e,"col-sm-12":!e}},jn=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(M.useState)(o),b=Object(p.a)(j,2),h=b[0],O=b[1],v="edit"===c,f="create-basic"===c,g=Object(Ar.c)(o.title),y=function(){var e=Object(Ar.c)(h.title);return Object(ee.a)([[function(){return!e&&!g},function(){}],[function(){return!e&&g},function(){return null}],[te.a,function(){return h.title}]])()},S=Object(Ar.b)(Object(x.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=le(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=le(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Ar.c)(h.maxVisits)?Number(h.maxVisits):null,title:y()})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(M.useEffect)((function(){O(o)}),[o]);var C=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]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Object(a.jsx)(Qr.a,Object(d.a)(Object(d.a)({},s),{},{children:Object(a.jsx)(Xr.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))}))},k=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)(ke,Object(d.a)({selected:h[e]?un(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))})},w=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Qr.a,{children:Object(a.jsx)(Xr.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.jsxs)(Mr.a,{children:[f&&C("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),Object(a.jsx)(Qr.a,{className:f?"col-lg-6":"col-12 mb-0",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(ln)}))}})})]})]}),_=Object(Mt.j)(l),U=_||!v,T=P()("mb-3",dn(U)),R=Object(Mt.b)(l),E=Object(Mt.e)(l),D=R||E,L=P()("mb-3",dn(D));return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:S,children:[f&&w,!f&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Gr.a,{title:"Basic options",className:"mb-3",children:w}),Object(a.jsxs)(Mr.a,{children:[U&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Gr.a,{title:"Customize the short URL",children:[_&&C("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Mr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:C("customSlug","Custom slug","text",{disabled:Object(Ar.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:C("shortCodeLength","Short code length","number",{min:4,disabled:Object(Ar.c)(h.customSlug)})})]}),Object(a.jsx)(Qr.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:T,children:Object(a.jsxs)(Gr.a,{title:"Limit access to the short URL",children:[C("maxVisits","Maximum number of visits allowed","number",{min:1}),k("validSince","Enabled since...",{maxDate:h.validUntil?un(h.validUntil):void 0}),k("validUntil","Enabled until...",{minDate:h.validSince?un(h.validSince):void 0})]})})]}),Object(a.jsxs)(Mr.a,{children:[Object(a.jsx)("div",{className:L,children:Object(a.jsxs)(Gr.a,{title:"Extra checks",children:[Object(a.jsx)(on,{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"}),!v&&Object(a.jsxs)("p",{children:[Object(a.jsx)(nn,{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)(an,{})]})]})}),D&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Gr.a,{title:"Configure behavior",children:[R&&Object(a.jsx)(on,{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"}),E&&Object(a.jsx)(on,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:h.forwardQuery,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{forwardQuery:e}))},children:"Forward query params on redirect"})]})})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Kr.a,{outline:!0,color:"primary",disabled:s||Object(N.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},bn=r(54),hn=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,g=d.error,y=d.errorData,S=Object(k.a)(s).domain,C=Object(M.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,forwardQuery:e.forwardQuery,validateUrl:o}:{longUrl:"",validateUrl:o}}(v,i)}),[v,i]),N=Object(K.e)(),w=Object(p.a)(N,4),_=w[0],U=w[2],T=w[3];return Object(M.useEffect)((function(){u(c.shortCode,S)}),[]),b?Object(a.jsx)(bn.a,{loading:!0}):h?Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{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)(Fe.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Kr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(fr.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:C,saving:f,selectedServer:o,mode:"edit",onSave:function(){var e=Object(x.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:T(),j(v.shortCode,v.domain,t).then(U).catch(T);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),g&&Object(a.jsx)(Pr,{type:"error",className:"mt-3",children:Object(a.jsx)(Br,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),_&&Object(a.jsx)(Pr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},On="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",vn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",fn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",mn={loading:!1,error:!1},xn=jt((Xe={},Object(u.a)(Xe,On,(function(){return{loading:!0,error:!1}})),Object(u.a)(Xe,vn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Xe,fn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},mn)})),Xe),mn),gn=function(e){return function(t,r){return function(){var n=Object(x.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:On}),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 mt(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:fn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:vn,errorData:pt(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},pn=function(e,t,r){e.serviceFactory("ShortUrlsList",vr,"ShortUrlsTable","SearchBar"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo","shortUrlsList"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",zr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",_r,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",Rr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",qr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",jn,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Er,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",hn,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return Hr})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",Yr,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",Ee,"ColorGenerator"),e.decorator("SearchBar",r),e.serviceFactory("listShortUrls",Jt,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return er})),e.serviceFactory("createShortUrl",Ft,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return At})),e.serviceFactory("deleteShortUrl",Ut,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return Tt})),e.serviceFactory("getShortUrlDetail",gn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",Wt,"buildShlinkApiClient")},yn=r(289),Sn=r.n(yn),Cn=r(60),Nn=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(M.useRef)(null!==c&&void 0!==c?c:Object(tn.a)());return Object(a.jsxs)(Qr.a,{className: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)}})]})},kn=function(e){return Object(a.jsx)(Nn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},wn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(M.useState)(""),i=Object(p.a)(s,2),o=i[0],l=i[1],u=Object(M.useState)(""),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(""),O=Object(p.a)(h,2),v=O[0],f=O[1],m=Object(Ar.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(M.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)(Gr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(kn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(kn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(kn,{value:v,onChange:f,children:"API key"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},_n=function(e){var t=e.type;return Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Pr,{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."]})})},Un=function(e,t){return function(r){var n=r.servers,c=r.createServer,s=r.history,i=s.push,o=s.goBack,l=!!Object.keys(n).length,u=t(!1,4e3),j=Object(p.a)(u,2),b=j[0],h=j[1],O=t(!1,4e3),v=Object(p.a)(O,2),f=v[0],m=v[1];return Object(a.jsxs)(Cn.a,{children:[Object(a.jsxs)(wn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(tn.a)();c(Object(d.a)(Object(d.a)({},e),{},{id:t})),i("/server/".concat(t))},children:[!l&&Object(a.jsx)(e,{tooltipPlacement:"top",onImport:h,onImportError:m}),l&&Object(a.jsx)(Kr.a,{outline:!0,onClick:o,children:"Cancel"}),Object(a.jsx)(Kr.a,{outline:!0,color:"primary",className:"ml-2",children:"Create server"})]}),b&&Object(a.jsx)(_n,{type:"success"}),f&&Object(a.jsx)(_n,{type:"error"})]})}},Tn=function(e){var t=e.servers,r=e.selectedServer,n=Object(Ie.a)(t);return Object(a.jsxs)(Ae.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(z.a,{nav:!0,caret:!0,children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(Q.a,{right:!0,children:Object(N.a)(n)?Object(a.jsxs)(W.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.E})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]}):Object(a.jsxs)(a.Fragment,{children:[n.map((function(e){var t=e.name,n=e.id;return Object(a.jsx)(W.a,{tag:o.b,to:"/server/".concat(n),active:Object(v.a)(r)===n,children:t},n)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{tag:o.b,to:"/manage-servers",children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Manage servers"})]})]})})]})},Rn=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history,i=e.redirectHome,o=void 0===i||i;return Object(a.jsxs)(Dr.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(Lr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(Vr.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)(Ir.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(o&&s.push("/"))},children:"Delete"})]})]})},En=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(K.e)(),o=Object(p.a)(i,4),l=o[0],u=o[2],d=o[3];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:n,onClick:u,children:[!c&&Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.y}),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})]})}},Dn=r(151),Ln=function(e){return Object(Dn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history.goBack;if(!Object(v.e)(r))return null;return Object(a.jsx)(Cn.a,{children:Object(a.jsxs)(wn,{title:Object(a.jsxs)("h5",{className:"mb-0",children:['Edit "',r.name,'"']}),initialValues:r,onSubmit:function(e){t(r.id,e),n()},children:[Object(a.jsx)(Kr.a,{outline:!0,className:"mr-2",onClick:n,children:"Cancel"}),Object(a.jsx)(Kr.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},Vn=function(e){var t=e.importServersFromFile;return function(e){var r=e.createServers,n=e.fileRef,c=e.children,s=e.onImport,i=void 0===s?function(){}:s,o=e.onImportError,l=void 0===o?function(){}:o,u=e.tooltipPlacement,d=void 0===u?"bottom":u,j=e.className,b=void 0===j?"":j,h=null!==n&&void 0!==n?n:Object(M.useRef)(),O=function(){var e=Object(x.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(Object(F.a)(r,i)).then((function(){a.value=null})).catch(l));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.jsxs)(Kr.a,{outline:!0,id:"importBtn",className:b,onClick:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.click()},children:[Object(a.jsx)(I.a,{icon:V.r,fixedWidth:!0})," ",null!==c&&void 0!==c?c:"Import from file"]}),Object(a.jsxs)(Cr.a,{placement:d,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:"import-servers-btn__csv-select",ref:h,onChange:O})]})}},In=r(542),Fn=r(70),An="shlink/selectedServer/SELECT_SERVER",Mn="shlink/selectedServer/RESET_SELECTED_SERVER",Gn=Object(F.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Fn.c)("1.0.0")),Pn=Object(In.a)(Fr.a,function(){var e=Object(x.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:Gn(t),printableVersion:Object(Fn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Bn=jt(($e={},Object(u.a)($e,Mn,(function(){return null})),Object(u.a)($e,An,(function(e,t){return t.selectedServer})),$e),null),Hn=bt(Mn),Wn=function(e,t){return function(r){return function(){var n=Object(x.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(Hn()),c(er()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:An,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 7:return n.prev=7,l=e(o),u=l.health,n.next=11,Pn(r,u);case 11:j=n.sent,b=j.version,h=j.printableVersion,c({type:An,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:An,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)}}()}},qn=r(586),zn=r(587),Qn=r(152),Kn=r(314),Jn="shlink/servers/EDIT_SERVER",Zn="shlink/servers/DELETE_SERVER",Yn="shlink/servers/CREATE_SERVERS",Xn="shlink/servers/SET_AUTO_CONNECT",$n=jt((et={},Object(u.a)(et,Yn,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(et,Zn,(function(e,t){var r=t.serverId;return Object(qn.a)(r,e)})),Object(u.a)(et,Jn,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(vt.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Object(u.a)(et,Xn,(function(e,t){var r=t.serverId,n=t.autoConnect;return e[r]?n?Object(zn.a)(Object(Me.a)(e).map((function(e){var t=Object(p.a)(e,2),n=t[0],c=t[1];return[n,Object(d.a)(Object(d.a)({},c),{},{autoConnect:n===r})]}))):Object(vt.a)(r,Object(d.a)(Object(d.a)({},e[r]),{},{autoConnect:n}),e):e})),et),{}),ec=Object(Qn.a)((function(e,t){return Object(vt.a)(t.id,t,e)}),{}),tc=Object(F.a)(Object(Kn.a)((function(e){return e.id?e:Object(vt.a)("id",Object(tn.a)(),e)})),ec,(function(e){return{type:Yn,newServers:e}})),rc=function(e){return tc([e])},nc=function(e,t){return{type:Jn,serverId:e,serverData:t}},cc=function(e){var t=e.id;return{type:Zn,serverId:t}},ac=function(e,t){var r=e.id;return{type:Xn,serverId:r,autoConnect:t}},sc=Object(F.a)(Object(O.a)("data"),(function(e){return Array.isArray(e)?e.filter(v.b):[]})),ic=function(e){var t=e.get;return function(){return function(){var e=Object(x.a)(m.a.mark((function e(r){var n,c;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("".concat(l.a,"/servers.json"));case 2:n=e.sent,c=sc(n),r(tc(c));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},oc=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.d)(n))return null;var s=n.version;return Object(Fn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},lc=r(165),uc=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(Cn.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(bn.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.e)(n)&&"Could not find this Shlink server.",Object(v.e)(n)&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),Object(a.jsxs)(lc.a,{servers:Object.values(r),children:["These are the Shlink servers currently configured. Choose one of them or ",Object(a.jsx)(o.b,{to:"/server/create",children:"add a new one"}),"."]}),Object(v.e)(n)&&Object(a.jsx)("div",{className:"container mt-3 mt-md-5",children:Object(a.jsxs)("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",Object(a.jsx)(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or\xa0",Object(a.jsx)(o.b,{to:"/server/".concat(n.id,"/edit"),children:"edit it"}),"."]})})]})})}},dc=r(103),jc=r(588),bc=r(589),hc=r(543),Oc=r(544),vc=function(e,t,r){return We((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,x=h.loading,g=h.visitsCount,p=h.orphanVisitsCount,y=Object(v.a)(d),S=Object(b.g)();return Object(M.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Mr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Fe.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(bc.a,{tag:"h2",children:x?"Loading...":lr(g)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Fe.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/orphan-visits"),children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(bc.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:x?"Loading...":lr(null!==p&&void 0!==p?p:0)}),Object(a.jsx)(r,{maxVersion:"2.5.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.6 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Fe.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/list-short-urls/1"),children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(bc.a,{tag:"h2",children:O?"Loading...":lr(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)(Fe.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/manage-tags"),children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(bc.a,{tag:"h2",children:m?"Loading...":lr(u.tags.length)})]})})]}),Object(a.jsxs)(Fe.a,{className:"mb-3",children:[Object(a.jsxs)(hc.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(y,"/create-short-url"),children:"Advanced options \xbb"})]}),Object(a.jsx)(Oc.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(Fe.a,{children:[Object(a.jsxs)(hc.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(y,"/list-short-urls/1"),children:"See all \xbb"})]}),Object(a.jsx)(Oc.a,{children:Object(a.jsx)(e,{shortUrlsList:s,selectedServer:d,className:"mb-0",onTagClick:function(e){return S.push("/server/".concat(y,"/list-short-urls/1?tags=").concat(encodeURIComponent(e)))}})})]})]})}),(function(){return[qe.visits,qe.orphanVisits]}))},fc=function(e,t,r,n){return function(c){var s=c.servers,i=Object.values(s),l=Object(M.useState)(i),u=Object(p.a)(l,2),d=u[0],j=u[1],b=d.some((function(e){return!!e.autoConnect})),h=r(!1,4e3),O=Object(p.a)(h,2),v=O[0],f=O[1];return Object(M.useEffect)((function(){j(Object.values(s))}),[s]),Object(a.jsxs)(Cn.a,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:function(e){return j(i.filter((function(t){var r=t.name,n=t.url;return"".concat(r," ").concat(n).match(e)})))}}),Object(a.jsxs)(Mr.a,{className:"mb-3",children:[Object(a.jsxs)("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[Object(a.jsx)(t,{className:"flex-fill",onImportError:f,children:"Import servers"}),i.length>0&&Object(a.jsxs)(Kr.a,{outline:!0,className:"ml-2 flex-fill",onClick:Object(x.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.exportServers());case 1:case"end":return t.stop()}}),t)}))),children:[Object(a.jsx)(I.a,{icon:V.q,fixedWidth:!0})," Export servers"]})]}),Object(a.jsx)("div",{className:"col-md-6 text-md-right d-flex d-md-block",children:Object(a.jsxs)(Kr.a,{outline:!0,color:"primary",className:"flex-fill",tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.E,fixedWidth:!0})," Add a server"]})})]}),Object(a.jsx)(Gr.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsxs)("tr",{children:[b&&Object(a.jsx)("th",{style:{width:"50px"}}),Object(a.jsx)("th",{children:"Name"}),Object(a.jsx)("th",{children:"Base URL"}),Object(a.jsx)("th",{})]})}),Object(a.jsxs)("tbody",{children:[!d.length&&Object(a.jsx)("tr",{className:"text-center",children:Object(a.jsx)("td",{colSpan:4,children:"No servers found."})}),d.map((function(e){return Object(a.jsx)(n,{server:e,hasAutoConnect:b},e.id)}))]})]})}),v&&Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)(Pr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})}},mc=function(e){return function(t){var r=t.server,n=t.hasAutoConnect;return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[n&&Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:r.autoConnect&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.h,className:"text-primary",id:"autoConnectIcon"}),Object(a.jsx)(Cr.a,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Name",children:Object(a.jsx)(o.b,{to:"/server/".concat(r.id),children:r.name})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base URL",children:r.url}),Object(a.jsx)("td",{className:"responsive-table__cell text-right",children:Object(a.jsx)(e,{server:r})})]})}},xc=function(e){return function(t){var r=t.server,n=t.setAutoConnect,c=Object(K.e)(),s=Object(p.a)(c,2),i=s[0],l=s[1],u=Object(K.e)(),d=Object(p.a)(u,4),j=d[0],b=d[2],h=d[3],O="/server/".concat(r.id),v=r.autoConnect,f=v?V.b:Ne.b;return Object(a.jsxs)(Tr,{isOpen:i,toggle:l,children:[Object(a.jsxs)(W.a,{tag:o.b,to:O,children:[Object(a.jsx)(I.a,{icon:V.D,fixedWidth:!0})," Connect"]}),Object(a.jsxs)(W.a,{tag:o.b,to:"".concat(O,"/edit"),children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit server"]}),Object(a.jsxs)(W.a,{onClick:function(){return n(r,!r.autoConnect)},children:[Object(a.jsx)(I.a,{icon:f,fixedWidth:!0})," ",v?"Do not a":"A","uto-connect"]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"dropdown-item--danger",onClick:b,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Remove server"]}),Object(a.jsx)(e,{redirectHome:!1,server:r,isOpen:j,toggle:h})]})}},gc=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},pc=function(e){return Array.isArray(e)&&e.every(gc)},yc=function e(t,r){var n=this;Object(g.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(x.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("No file provided");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e,c){r.addEventListener("loadend",(function(t){try{var r,a,s,i=null!==(r=null===(a=t.target)||void 0===a||null===(s=a.result)||void 0===s?void 0:s.toString())&&void 0!==r?r:"",o=n.csvJson.toObject(i);if(!pc(o))throw new Error("Provided file does not have the right format.");e(o)}catch(t){c(t)}})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Sc=r(104),Cc=function e(t,r,n){var c=this;Object(g.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(x.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(Ie.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(v.f);try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(Sc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},Nc=function(e,t,r){e.serviceFactory("ManageServers",fc,"ServersExporter","ImportServersBtn","useStateFlagTimeout","ManageServersRow"),e.decorator("ManageServers",t(["servers"])),e.serviceFactory("ManageServersRow",mc,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",xc,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Un,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",dc.a),e.decorator("CreateServer",t(["selectedServer","servers"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",Ln,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",(function(){return Tn})),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return Rn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",En,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Vn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return oc})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",uc,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",vc,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",Sn.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",yc,"csvjson","fileReaderFactory"),e.service("ServersExporter",Cc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Wn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return rc})),e.serviceFactory("createServers",(function(){return tc})),e.serviceFactory("deleteServer",(function(){return cc})),e.serviceFactory("editServer",(function(){return nc})),e.serviceFactory("setAutoConnect",(function(){return ac})),e.serviceFactory("fetchServers",ic,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Hn}))},kc=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)(Fe.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Kr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center d-none d-sm-block",children:Object(a.jsx)("small",{children:s})}),Object(a.jsxs)("span",{className:"badge badge-main ml-3",children:["Visits:"," ",Object(a.jsx)(wr,{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})]})})},wc=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)(fr.a,{href:u})]});return Object(a.jsxs)(kc,{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)(Sr,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(Cr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(Sr,{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)(fr.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},_c=r(605),Uc=r(556),Tc=r(606),Rc=r(554),Ec=r(113),Dc=r(594),Lc=r(595),Vc=r(597),Ic=r(591),Fc=r(293),Ac=r(592),Mc=r(315),Gc=r(92),Pc=r(593),Bc=r(596),Hc=r(292),Wc=r.n(Hc),qc=r(590),zc="Others",Qc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Kc=function(e){var t,r;return Object(Ar.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"},Jc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(qc.a)(t,t.map((function(){return 0})))),e))},Zc=function(e){return Object(a.jsx)(rn,Object(d.a)({type:"switch"},e))},Yc=function(e,t){var r=e.native,n=Object(p.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},Xc=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(lr(r))},$c=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(lr(r))},ea=r(46),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:Ic.a,daily:Fc.a,weekly:Ac.a,monthly:Mc.a},ca={hourly:function(e){return Object(re.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(re.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(re.default)(Object(Gc.a)(e),"yyyy-MM-dd"),r=Object(re.default)(Object(Pc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(re.default)(e,"yyyy-MM")}},aa=function(e,t){return Object(Lc.a)((function(t){return ca[e](Object(A.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(A.default)(t[0].date),a=Object(A.default)(t[t.length-1].date),s=r(c,a),i=ra[e];return[n(a)].concat(Object(De.a)(Object(Ar.e)(s,(function(e){return n(Object(Bc.a)(a,i(e)))}))))}(r,e);return[c,Jc(t,c)]},ia=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},oa=null,la=function(e,t,r){return function(n){var c=Object(p.a)(n,1)[0];if(r&&c){var a,s=c.index;if(oa===e[s])r([]),oa=null;else r(e[s]&&t[e[s]]||[]),oa=null!==(a=e[s])&&void 0!==a?a: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(M.useState)(r.length>0?function(e){var t,r=new Date,n=Object(A.default)(e);return null!==(t=Object(ee.a)([[function(){return Object(Fc.a)(r,n)<=2},Object(Dc.a)("hourly")],[function(){return Object(Mc.a)(r,n)<=1},Object(Dc.a)("daily")],[function(){return Object(Mc.a)(r,n)<=6},Object(Dc.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(p.a)(o,2),u=l[0],d=l[1],j=Object(K.e)(!0),b=Object(p.a)(j,2),h=b[0],O=b[1],v=Object(M.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=ca[e](Object(A.default)(r.date));return t[c]=null!==(n=t[c])&&void 0!==n?n:[],t[c].push(r),t}),{})}(u,r)}),[u,r]),f=Object(M.useMemo)((function(){return aa(u,Object(Vc.a)(r))}),[u,r]),m=Object(M.useMemo)((function(){return sa(r,f,u,h)}),[r,u,h]),x=Object(p.a)(m,2),g=x[0],y=x[1],S=Object(M.useMemo)((function(){return Jc(aa(u,Object(Vc.a)(n)),g)}),[n,u,g]),C=function(){var e=ia(y,"Visits",ea.c);return 0===n.length?[e]:[e,ia(S,s,ea.a)]},N={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:Xc}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:lr}},x:{title:{display:!0,text:ta[u]}}},onHover:Yc},k=function(){return Object(a.jsx)(Ec.c,{data:{labels:g,datasets:C()},options:N,getElementAtEvent:la(g,v,i)})};return Object(a.jsxs)(Fe.a,{children:[Object(a.jsxs)(hc.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(Ae.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(Q.a,{right:!0,children:Object.entries(ta).map((function(e){var t=Object(p.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)(Zc,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(Oc.a,{className:"line-chart-card__body",children:[n.length>0&&k(),0===n.length&&k()]})]})},da=r(598),ja=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!jr(e)&&n(e)}};return Object(a.jsxs)(nr.a,{listClassName:P()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(tr.a,{disabled:r<=1,children:Object(a.jsx)(rr.a,{previous:!0,tag:"span",onClick:i(r-1)})}),dr(r,t).map((function(e,t){return Object(a.jsx)(tr.a,{disabled:jr(e),active:r===e,children:Object(a.jsx)(rr.a,{tag:"span",onClick:i(e),children:br(e)})},hr(e,t))})),Object(a.jsx)(tr.a,{disabled:r>=t,children:Object(a.jsx)(rr.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},ba=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(y.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)}))},ha=function(e,t,r){var n=function(e,t){return Pe(t,e)}(r,t?ba(t,e):Object(De.a)(e)),c=n.length;return{visitsGroups:Object(da.a)(20,n),total:c}},Oa=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(M.useState)(h()),v=Object(p.a)(O,2),f=v[0],m=v[1],x=Object(M.useState)(void 0),g=Object(p.a)(x,2),y=g[0],S=g[1],C=Object(M.useState)({}),N=Object(p.a)(C,2),k=N[0],w=N[1],_=Object(M.useMemo)((function(){return ha(n,y,k)}),[y,k]),U=Object(M.useRef)(!0),T=Object(M.useState)(1),R=Object(p.a)(T,2),E=R[0],D=R[1],L=20*E,F=L-20,A=Object(Mt.a)(o),G=7+Number(A)+Number(j),H=function(e){return function(){return w({field:e,dir:Ge(e,k.field,k.dir)})}},W=function(e){return Object(a.jsx)(ze,{currentOrder:k,field:e,className:"visits-table__header-icon"})};return Object(M.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(M.useEffect)((function(){D(1),!U.current&&i([]),U.current=!1}),[y]),Object(a.jsxs)("table",{className:"table table-bordered table-hover table-sm table-responsive-sm visits-table",children:[Object(a.jsxs)("thead",{className:"visits-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{className:"".concat(b," text-center"),onClick:function(){return i(s.length<_.total?_.visitsGroups.flat():[])},children:Object(a.jsx)(I.a,{icon:V.h,className:P()({"text-primary":s.length>0})})}),A&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(I.a,{icon:V.G}),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=_.visitsGroups[E-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=_.visitsGroups[E-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(De.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(I.a,{icon:V.h,className:"text-primary"})}),A&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.G,id:"botIcon".concat(t)}),Object(a.jsx)(Cr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(Sr,{date:e.date})}),Object(a.jsx)("td",{children:e.country}),Object(a.jsx)("td",{children:e.city}),Object(a.jsx)("td",{children:e.browser}),Object(a.jsx)("td",{children:e.os}),Object(a.jsx)("td",{children:e.referer}),j&&Object(a.jsx)("td",{children:e.visitedUrl})]},t)}))]}),_.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan: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)(ja,{pagesCount:Math.ceil(_.total/20),currentPage:E,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:lr(F+1)})," to"," ",Object(a.jsx)("b",{children:lr(Object(sr.a)(L,_.total))})," of"," ",Object(a.jsx)("b",{children:lr(_.total)})]})})]})})})})]})},va=r(618),fa=r(599),ma=r(600),xa=r(601),ga=function(){return Object(a.jsx)(va.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},pa=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(p.a)(e,1)[0].latLong}},ya=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(Dr.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(Vr.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)(fa.a,Object(d.a)(Object(d.a)({},pa(s)),{},{children:[Object(a.jsx)(ga,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(ma.a,{position:n,children:Object(a.jsxs)(xa.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},Sa=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(K.e)(),i=Object(p.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(K.e)(),j=Object(p.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(M.useState)([]),f=Object(p.a)(v,2),m=f[0],x=f[1],g=Object(M.useRef)(),y=function(e){return function(){x(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:g,onClick:function(){if(!r)return x(c),void l();O()},children:Object(a.jsx)(I.a,{icon:V.x})}),Object(a.jsx)(Cr.a,{placement:"left",target:function(){return g.current},children:"Show in map"}),Object(a.jsx)(q.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(Q.a,{right:!0,children:[Object(a.jsx)(W.a,{onClick:y(!1),children:"Show all locations"}),Object(a.jsx)(W.a,{onClick:y(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(ya,{toggle:u,isOpen:o,title:t,locations:m})]})},Ca=r(602),Na=function(e){return e.hasOwnProperty("visitedUrl")},ka=Object(F.a)(Object(Ca.a)((function(e){return Na(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),wa=function(e,t){return Object(Lc.a)(Object(O.a)(t),e)},_a=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)&&le(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)&&le(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}},Ua=function(e,t){return!Object(C.a)(e)&&Object(Ar.c)(e[t])},Ta=function(e){return"number"===typeof e?e:e?parseFloat(e):0},Ra=function(e){return function(t,r){var n=Ua(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Ea=Ra("country"),Da=Ra("city"),La=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),Ea(e.countries,t),Da(e.cities,t),function(e,t){if(Ua(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[Ta(n),Ta(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:{}})},Va=Object(Kn.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(Ar.c)(e))return{browser:zc,os:zc};var t=Wc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:zc,browser:r&&Qc.includes(r)?r:zc}}(t)),{},{referer:Kc(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 Na(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Ia=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(Ar.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},Fa=function(e){var t,r,n=e.chart.config,c=null!==(t=n.data)&&void 0!==t?t:{},s=c.labels,i=void 0===s?[]:s,o=c.datasets,l=void 0===o?[]:o,u=Object(p.a)(l,1)[0].backgroundColor,d=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor;return Object(a.jsx)("ul",{className:"doughnut-chart-legend",children:i.map((function(e,t){var r;return Object(a.jsxs)("li",{className:"doughnut-chart-legend__item d-flex",children:[Object(a.jsx)("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:null!==(r=u[t])&&void 0!==r?r:d}}),Object(a.jsx)("small",{className:"doughnut-chart-legend__item-text flex-fill",children:e})]},e)}))})},Aa=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(ea.h)()?ea.e:ea.f,borderWidth:2}]},Ma=Object(M.memo)((function(e){var t=e.stats,r=Object(M.useState)(),n=Object(p.a)(r,2),c=n[0],s=n[1],i=Object(Ve.a)(t),o=Object(Ie.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:$c}}}},u=function(e,t){return{labels:e,datasets:Aa(t)}}(i,o);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-sm-12 col-md-7",children:Object(a.jsx)(Ec.b,{height:300,data:u,options:l,ref:function(e){s(null!==e&&void 0!==e?e:void 0)}})}),Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:c&&Object(a.jsx)(Fa,{chart:c})})]})})),Ga=r(603),Pa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(Fe.a,{children:[Object(a.jsx)(hc.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(Oc.a,{children:n}),r&&Object(a.jsx)(Ga.a,{className:"chart-card__footer--sticky",children:r})]})},Ba=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(Pa,{title:t,children:Object(a.jsx)(Ma,{stats:r})})},Ha=r(128),Wa=r(611),qa=r(604),za=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(Ae.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(Q.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"})})]})]})},Qa=function(e){return e.startsWith("hidden")?"":e},Ka=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:ea.d,borderColor:ea.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:ea.b,borderColor:ea.a,borderWidth:2}]},Ja=function(e,t){return function(r){var n=Object(p.a)(r,1)[0];t&&n&&t(e[n.index])}},Za=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ve.a)(t).map(Qa),o=Object(Ie.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ve.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=Jc(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:Xc}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:lr}},y:{stacked:!0}},onHover:Yc,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:Ka(t,r,n)}}(i,o,l,n),b=function(e){return e.length>20?10*e.length:void 0}(i),h=function(e){return Object(a.jsx)(Ec.a,{data:j,options:u,height:b,getElementAtEvent:Ja(i,c)},"".concat(b,"_").concat(e))};return Object(a.jsxs)(a.Fragment,{children:[void 0!==r&&h("with_stats"),void 0===r&&h("without_stats")]})},Ya=function(e){return"String"===Object(Ha.a)(e)?Object(Wa.a)(e):e},Xa=function(e){return Object(p.a)(e,1)[0]},$a=function(e){return Object(p.a)(e,2)[1]},es=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(y.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(M.useState)({}),j=Object(p.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(1),v=Object(p.a)(O,2),f=v[0],m=v[1],x=Object(M.useState)(50),g=Object(p.a)(x,2),S=g[0],C=g[1],N=function(e){var t=e[f-1];if(f0?r:void 0,c),w=k.currentPageStats,_=k.currentPageHighlightedStats,U=k.pagination,T=k.max,R=Object.keys(w);return Object(a.jsx)(Pa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Be,{isButton:!1,right:!0,items:c,order:b,onChange:function(e,t){h({field:e,dir:t}),m(1)}})}),o&&Object.keys(t).length>50&&Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(za,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:S,setValue:function(e){C(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(U?R:void 0)})]})},footer:U,children:Object(a.jsx)(Za,Object(d.a)({stats:w,highlightedStats:_,max:T},l))})},ts={byTime:{title:"By time",subPath:"",icon:V.d},byContext:{title:"By context",subPath:"/by-context",icon:V.g},byLocation:{title:"By location",subPath:"/by-location",icon:V.x},list:{title:"List",subPath:"/list",icon:V.w}},rs=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)(I.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},ns=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=c.visits,m=c.loading,x=c.loadingLarge,g=c.error,y=c.errorData,S=c.progress,C=c.fallbackInterval,k=Object(M.useState)(null!==(t=null!==C&&void 0!==C?C:null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days"),w=Object(p.a)(k,2),_=w[0],U=w[1],T=Object(M.useState)(pe(_)),R=Object(p.a)(T,2),E=R[0],D=R[1],L=Object(M.useState)([]),F=Object(p.a)(L,2),A=F[0],G=F[1],B=Object(M.useState)(),H=Object(p.a)(B,2),W=H[0],q=H[1],z=Object(M.useState)({}),Q=Object(p.a)(z,2),K=Q[0],J=Q[1],Z=Object(Mt.a)(h),Y=Object(M.useRef)(!0),X=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},$=Object(M.useMemo)((function(){return Va(f)}),[f]),ee=Object(M.useMemo)((function(){return La($)}),[$]),te=ee.os,re=ee.browsers,ne=ee.referrers,ce=ee.countries,ae=ee.cities,se=ee.citiesForMap,ie=ee.visitedUrls,oe=Object(Ie.a)(se),le=function(e){tt=void 0,G(e)},ue=function(e){return function(t){var r="".concat(e,"_").concat(t);tt===r?(G([]),q(void 0),tt=void 0):(G($.filter(Object(_c.a)(e,t))),q(t),tt=r)}};Object(M.useEffect)((function(){return i}),[]),Object(M.useEffect)((function(){s({dateRange:E,filter:K},Y.current),Y.current=!1}),[E,K]),Object(M.useEffect)((function(){C&&U(C)}),[C]);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)(Ue,{updatable:!0,disabled:m,initialDateRange:_,defaultText:"All visits",onDatesChange:D})}),Object(a.jsx)(Ia,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:Z,selected:K,onChange:J})]})}),f.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)(Kr.a,{outline:!0,disabled:0===A.length,className:"btn-md-block mr-2",onClick:function(){return le([])},children:["Clear selection ",A.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",lr(A.length),")"]})]}),Object(a.jsxs)(Kr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j($)},children:[Object(a.jsx)(I.a,{icon:V.q})," Export (",lr($.length),")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:x?Object(a.jsxs)(bn.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(Tc.a,{value:S,striped:100===S,className:"mt-3"})]}):m?Object(a.jsx)(bn.a,{loading:!0}):g?Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{errorData:y,fallbackMessage:"An error occurred while loading visits :("})}):Object(N.a)(f)?Object(a.jsx)(bn.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Fe.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(Rc.a,{pills:!0,fill:!0,children:Object.entries(ts).map((function(e){var t=Object(p.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(rs,Object(d.a)(Object(d.a)({},n),{},{to:X(n.subPath)}),r)}))})}),Object(a.jsx)(Mr.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:$,highlightedVisits:A,highlightedLabel:W,setSelectedVisits:le})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(ts.byContext.subPath),children:[Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ba,{title:"Operating systems",stats:te})}),Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ba,{title:"Browsers",stats:re})}),Object(a.jsx)("div",{className:P()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(es,{title:"Referrers",stats:ne,withPagination:!1,highlightedStats:wa(A,"referer"),highlightedLabel:W,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ue("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(es,{title:"Visited URLs",stats:ie,highlightedLabel:W,highlightedStats:wa(A,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ue("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(ts.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(es,{title:"Countries",stats:ce,highlightedStats:wa(A,"country"),highlightedLabel:W,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ue("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(es,{title:"Cities",stats:ae,highlightedStats:wa(A,"city"),highlightedLabel:W,extraHeaderContent:function(e){return oe.length>0&&Object(a.jsx)(Sa,{modalTitle:"Cities",locations:oe,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ue("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(ts.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(Oa,{visits:$,selectedVisits:A,setSelectedVisits:le,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},cs=function(e){var t=e.exportVisits;return We((function(e){var r=e.history.goBack,n=e.match,c=n.params,s=n.url,i=e.location.search,o=e.shortUrlVisits,l=e.shortUrlDetail,u=e.getShortUrlVisits,j=e.getShortUrlDetail,b=e.cancelGetShortUrlVisits,h=e.settings,O=e.selectedServer,v=c.shortCode,f=Object(k.a)(i).domain;return Object(M.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(ns,{getVisits:function(e,t){return u(v,Object(d.a)(Object(d.a)({},_a(e)),{},{domain:f}),t)},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)(wc,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[qe.shortUrlVisits(t.params.shortCode)]}))},as=r(616),ss=5e3,is=function(e){return e.currentPage>=e.pagesCount},os=function(e,t){return 100*t/e},ls=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n,c,a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a({type:c.start}),i=function(){var e=Object(x.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(x.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,ss).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(as.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(x.a)(m.a.mark((function e(t){var r,n,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,!s()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,i(t[r]);case 5:if(n=e.sent,a({type:c.progress,progress:os(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,ss);case 3:if(n=e.sent,s=n.pagination,i=n.data,s&&!is(s)){e.next=8;break}return e.abrupt("return",i);case 8:return l=Object(cr.a)(2,s.pagesCount+1),u=Object(da.a)(4,l),s.pagesCount-1>4&&a({type:c.large}),e.t0=i,e.next=14,o(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,Promise.all([l(),r()]);case 7:u=e.sent,j=Object(p.a)(u,2),b=j[0],h=j[1],a(!b.length&&h?{type:c.fallbackToInterval,fallbackInterval:ye(h.date)}:Object(d.a)(Object(d.a)({},n),{},{visits:b,type:c.finish})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),a({type:c.error,errorData:pt(e.t0)});case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t,r,n,c,a,s){return e.apply(this,arguments)}}(),us=function(e,t){return e?Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t({page:1,itemsPerPage:1}).then((function(e){return e.data[0]})));case 1:case"end":return e.stop()}}),e)}))):Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(void 0));case 1:case"end":return e.stop()}}),e)})))},ds="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",js="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",bs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",hs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",Os="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",vs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",fs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL",ms={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},xs=jt((rt={},Object(u.a)(rt,ds,(function(){return Object(d.a)(Object(d.a)({},ms),{},{loading:!0})})),Object(u.a)(rt,js,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ms),{},{error:!0,errorData:r})})),Object(u.a)(rt,bs,(function(e,t){var r=t.visits,n=t.query,c=t.shortCode,a=t.domain;return Object(d.a)(Object(d.a)({},e),{},{visits:r,shortCode:c,domain:a,query:n,loading:!1,error:!1})})),Object(u.a)(rt,hs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(rt,Os,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(rt,vs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(rt,fs,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(rt,xt,(function(e,t){var r=t.createdVisits,n=e.shortCode,c=e.domain,a=e.visits,s=e.query,i=void 0===s?{}:s,o=i.startDate,l=i.endDate,u=r.filter((function(e){var t=e.shortUrl,r=e.visit;return t&&mt(t,n,c)&&je(r.date,o,l)})).map((function(e){return e.visit}));return 0===u.length?e:Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(u),Object(De.a)(a))})})),rt),ms),gs=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getShortUrlVisits,l=function(){var e=Object(x.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",o(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)}}(),u=us(n,function(){var e=Object(x.a)(m.a.mark((function e(n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o(t,Object(d.a)(Object(d.a)({},n),{},{domain:r.domain})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().shortUrlVisits.cancelLoad},b={shortCode:t,query:r,domain:r.domain},h={start:ds,large:hs,finish:bs,error:js,progress:vs,fallbackToInterval:fs},c.abrupt("return",ls(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},ps=bt(Os),ys=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)(kc,{title:i,goBack:r,visits:c})},Ss=function(e,t){var r=t.exportVisits;return We((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)(ns,{getVisits:function(e,t){return o(b,_a(e),t)},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)(ys,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[qe.visits]}))},Cs="shlink/tagVisits/GET_TAG_VISITS_START",Ns="shlink/tagVisits/GET_TAG_VISITS_ERROR",ks="shlink/tagVisits/GET_TAG_VISITS",ws="shlink/tagVisits/GET_TAG_VISITS_LARGE",_s="shlink/tagVisits/GET_TAG_VISITS_CANCEL",Us="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",Ts="shlink/tagVisits/GET_TAG_VISITS_FALLBACK_TO_INTERVAL",Rs={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Es=jt((nt={},Object(u.a)(nt,Cs,(function(){return Object(d.a)(Object(d.a)({},Rs),{},{loading:!0})})),Object(u.a)(nt,Ns,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Rs),{},{error:!0,errorData:r})})),Object(u.a)(nt,ks,(function(e,t){var r=t.visits,n=t.tag,c=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,tag:n,query:c,loading:!1,error:!1})})),Object(u.a)(nt,ws,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(nt,_s,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(nt,Us,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(nt,Ts,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(nt,xt,(function(e,t){var r=t.createdVisits,n=e.tag,c=e.visits,a=e.query,s=void 0===a?{}:a,i=s.startDate,o=s.endDate,l=r.filter((function(e){var t=e.shortUrl,r=e.visit;return(null===t||void 0===t?void 0:t.tags.includes(n))&&je(r.date,i,o)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(l),Object(De.a)(c))})})),nt),Rs),Ds=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getTagVisits,l=function(){var e=Object(x.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",o(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)}}(),u=us(n,function(){var e=Object(x.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",o(t,r));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().tagVisits.cancelLoad},b={tag:t,query:r},h={start:Cs,large:ws,finish:ks,error:Ns,progress:Us,fallbackToInterval:Ts},c.abrupt("return",ls(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},Ls=bt(_s),Vs=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(kc,{title:"Orphan visits",goBack:r,visits:n})},Is=function(e){var t=e.exportVisits;return We((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)(ns,{getVisits:function(e,t){var r;return c(_a(e),null===(r=e.filter)||void 0===r?void 0:r.orphanVisitsType,t)},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)(Vs,{orphanVisits:s,goBack:r})})}),(function(){return[qe.orphanVisits]}))},Fs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",As="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",Ms="shlink/orphanVisits/GET_ORPHAN_VISITS",Gs="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",Ps="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",Bs="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",Hs="shlink/orphanVisits/GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL",Ws={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},qs=jt((ct={},Object(u.a)(ct,Fs,(function(){return Object(d.a)(Object(d.a)({},Ws),{},{loading:!0})})),Object(u.a)(ct,As,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ws),{},{error:!0,errorData:r})})),Object(u.a)(ct,Ms,(function(e,t){var r=t.visits,n=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,query:n,loading:!1,error:!1})})),Object(u.a)(ct,Gs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(ct,Ps,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(ct,Bs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(ct,Hs,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(ct,xt,(function(e,t){var r=t.createdVisits,n=e.visits,c=e.query,a=void 0===c?{}:c,s=a.startDate,i=a.endDate,o=r.filter((function(e){var t=e.visit;return je(t.date,s,i)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(o),Object(De.a)(n))})})),ct),Ws),zs=function(e,t){return!t||t===e.type},Qs=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getOrphanVisits,l=function(){var e=Object(x.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",o(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return Na(e)&&zs(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)}}(),u=us(n,o),j=function(){return s().orphanVisits.cancelLoad},b={query:t},h={start:Fs,large:Gs,finish:Ms,error:As,progress:Bs,fallbackToInterval:Hs},c.abrupt("return",ls(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},Ks=bt(Ps),Js="shlink/visitsOverview/GET_OVERVIEW_START",Zs="shlink/visitsOverview/GET_OVERVIEW_ERROR",Ys="shlink/visitsOverview/GET_OVERVIEW",Xs={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},$s=jt((at={},Object(u.a)(at,Js,(function(){return Object(d.a)(Object(d.a)({},Xs),{},{loading:!0})})),Object(u.a)(at,Zs,(function(){return Object(d.a)(Object(d.a)({},Xs),{},{error:!0})})),Object(u.a)(at,Ys,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},Xs),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(at,xt,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(y.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=ka(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),at),Xs),ei=function(e){return function(){return function(){var t=Object(x.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:Js}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:Ys},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:Zs});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},ti=function e(t,r){var n=this;Object(g.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(Sc.a)(n.window,r,e)}}},ri=function(e,t){e.serviceFactory("MapModal",(function(){return ya})),e.serviceFactory("ShortUrlVisits",cs,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",Ss,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Is,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",ti,"window","csvjson"),e.serviceFactory("getShortUrlVisits",gs,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return ps})),e.serviceFactory("getTagVisits",Ds,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return Ls})),e.serviceFactory("getOrphanVisits",Qs,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return Ks})),e.serviceFactory("createNewVisits",(function(){return gt})),e.serviceFactory("loadVisitsOverview",ei,"buildShlinkApiClient")},ni=r(294),ci=r.n(ni),ai=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},si=function(e){return{id:e,name:e}},ii=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(M.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)(ci.a,{tags:c.map(si),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(si),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(ai,{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(De.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(De.a)(new Set([].concat(Object(De.a)(c),Object(De.a)(t.toLowerCase().split(","))))))}})}},oi=r(553),li=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=n.displayed,l=n.toggle,u=Object(K.e)(),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(p.a)(h,2),f=O[0],m=O[1],x=Object(K.e)(),g=Object(p.a)(x,3),y=g[0],S=g[2],C=Object(M.useRef)(),N=Object(v.a)(s);return Object(M.useEffect)((function(){var e;(e=C.current)&&e.scrollWidth>e.clientWidth&&S()}),[C.current]),Object(a.jsxs)(Fe.a,{className:"tag-card",children:[Object(a.jsxs)(hc.a,{className:"tag-card__header",children:[Object(a.jsx)(Kr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:b,children:Object(a.jsx)(I.a,{icon:V.Q})}),Object(a.jsx)(Kr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:m,children:Object(a.jsx)(I.a,{icon:V.C})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:y?c.tag:void 0,ref:function(e){C.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(ai,{tag:c.tag,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:l,children:c.tag})]})]}),Object(a.jsx)(oi.a,{isOpen:i,children:Object(a.jsxs)(Oc.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center mb-1",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.v,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:lr(c.shortUrls)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/tag/").concat(c.tag,"/visits"),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:lr(c.visits)})]})]})}),Object(a.jsx)(e,{tag:c.tag,toggle:b,isOpen:j}),Object(a.jsx)(t,{tag:c.tag,toggle:m,isOpen:f})]})}},ui=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(x.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)(Dr.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(Lr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(Vr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(Pr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Br,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(Ir.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"})]})]})},di=r(607),ji=r(306),bi=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(M.useState)(r),u=Object(p.a)(l,2),d=u[0],j=u[1],b=Object(M.useState)(t(r)),h=Object(p.a)(b,2),O=h[0],v=h[1],f=Object(K.e)(),g=Object(p.a)(f,4),y=g[0],S=g[1],C=g[3],N=o.editing,k=o.error,w=o.errorData,_=Object(Ar.b)(Object(x.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)(Dr.a,{isOpen:i,toggle:c,centered:!0,onClosed:C,children:Object(a.jsxs)("form",{onSubmit:_,children:[Object(a.jsx)(Lr.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(Vr.a,{children:[Object(a.jsxs)("div",{className:"input-group",children:[Object(a.jsx)("div",{className:"input-group-prepend",id:"colorPickerBtn",onClick:S,children:Object(a.jsx)("div",{className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:O,borderColor:O},children:Object(a.jsx)(I.a,{icon:V.A,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(di.a,{isOpen:y,toggle:S,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(ji.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(Xr.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),k&&Object(a.jsx)(Pr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Br,{errorData:w,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Ir.a,{children:[Object(a.jsx)(Kr.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)(Kr.a,{color:"primary",disabled:N,children:N?"Saving...":"Save"})]})]})})}},hi={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Oi=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(J,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(W.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(I.a,{icon:V.O,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(W.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(I.a,{icon:V.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},vi=function(e,t){return We((function(r){var n,c,s=r.filterTags,i=r.forceListTags,o=r.tagsList,l=r.selectedServer,u=r.settings,d=Object(M.useState)(null!==(n=null===(c=u.ui)||void 0===c?void 0:c.tagsMode)&&void 0!==n?n:"cards"),j=Object(p.a)(d,2),b=j[0],h=j[1],O=Object(M.useState)({}),v=Object(p.a)(O,2),f=v[0],m=v[1],x=Object(F.a)((function(){return o.filteredTags.map((function(e){var t,r,n,c;return{tag:e,shortUrls:null!==(t=null===(r=o.stats[e])||void 0===r?void 0:r.shortUrlsCount)&&void 0!==t?t:0,visits:null!==(n=null===(c=o.stats[e])||void 0===c?void 0:c.visitsCount)&&void 0!==n?n:0}}))}),(function(e){return Pe(e,f)}));if(Object(M.useEffect)((function(){i()}),[]),o.loading)return Object(a.jsx)(bn.a,{loading:!0});if(o.error)return Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{errorData:o.errorData,fallbackMessage:"Error loading tags :("})});var g=function(e){return function(){var t=Ge(e,f.field,f.dir);m({field:t?e:void 0,dir:t})}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:s}),Object(a.jsxs)(Mr.a,{className:"mb-3",children:[Object(a.jsx)("div",{className:"col-lg-6",children:Object(a.jsx)(Oi,{mode:b,onChange:h})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3 mt-lg-0",children:Object(a.jsx)(Be,{items:hi,order:f,onChange:function(e,t){return m({field:e,dir:t})}})})]}),function(){if(o.filteredTags.length<1)return Object(a.jsx)(bn.a,{children:"No tags found"});var r=x();return"cards"===b?Object(a.jsx)(e,{sortedTags:r,selectedServer:l}):Object(a.jsx)(t,{sortedTags:r,selectedServer:l,currentOrder:f,orderByColumn:g})}()]})}),(function(){return[qe.visits]}))},fi="shlink/deleteTag/DELETE_TAG_START",mi="shlink/deleteTag/DELETE_TAG_ERROR",xi="shlink/deleteTag/DELETE_TAG",gi="shlink/deleteTag/TAG_DELETED",pi=jt((st={},Object(u.a)(st,fi,(function(){return{deleting:!0,error:!1}})),Object(u.a)(st,mi,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(st,xi,(function(){return{deleting:!1,error:!1}})),st),{deleting:!1,error:!1}),yi=function(e){return function(t){return function(){var r=Object(x.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:fi}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:xi}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:mi,errorData:pt(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},Si=function(e){return{type:gi,tag:e}},Ci="shlink/editTag/EDIT_TAG_START",Ni="shlink/editTag/EDIT_TAG_ERROR",ki="shlink/editTag/EDIT_TAG",wi="shlink/editTag/TAG_EDITED",_i=jt((it={},Object(u.a)(it,Ci,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(it,Ni,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(it,ki,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),it),{oldName:"",newName:"",editing:!1,error:!1}),Ui=function(e,t){return function(r,n,c){return function(){var a=Object(x.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:Ci}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:ki,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:Ni,errorData:pt(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},Ti=function(e,t,r){return{type:wi,oldName:e,newName:t,color:r}},Ri="shlink/tagsList/LIST_TAGS_START",Ei="shlink/tagsList/LIST_TAGS_ERROR",Di="shlink/tagsList/LIST_TAGS",Li="shlink/tagsList/FILTER_TAGS",Vi={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Ii=function(e,t){return function(r){return r===e?t:r}},Fi=function(e,t){return Object(S.a)((function(e){return e===t}),e)},Ai=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}),{}))},Mi=jt((ot={},Object(u.a)(ot,Ri,(function(){return Object(d.a)(Object(d.a)({},Vi),{},{loading:!0})})),Object(u.a)(ot,Ei,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Vi),{},{error:!0,errorData:r})})),Object(u.a)(ot,Di,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},Vi),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(ot,gi,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:Fi(e.tags,r),filteredTags:Fi(e.filteredTags,r)})})),Object(u.a)(ot,wi,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(Ii(r,n)).sort(),filteredTags:e.filteredTags.map(Ii(r,n)).sort()})})),Object(u.a)(ot,Li,(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)(ot,xt,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=Ai(c),n=e.stats,r.reduce((function(e,t){var r=Object(p.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)))})})),ot),Vi),Gi=function(e){return{type:Li,searchTerm:e}},Pi=Math.ceil,Bi=function(e){return function(t){var r=t.sortedTags,n=t.selectedServer,c=Object(M.useState)(),s=Object(p.a)(c,2),i=s[0],o=s[1],l=r.length,u=Object(da.a)(Pi(l/4),r);return Object(a.jsx)(Mr.a,{children:u.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,selectedServer:n,displayed:i===t.tag,toggle:function(){return o(i!==t.tag?t.tag:void 0)}},t.tag)}))},r)}))})}},Hi=function(e){return function(t){var r,n=t.sortedTags,c=t.selectedServer,s=t.location,i=t.orderByColumn,o=t.currentOrder,l=Object(M.useRef)(!0),u=Object(k.a)(s.search).page,d=void 0===u?1:u,j=Object(K.b)("page",Number(d)),b=Object(p.a)(j,2),h=b[0],O=b[1],v=Object(da.a)(20,n),f=v.length>1,m=null!==(r=v[h-1])&&void 0!==r?r:[];return Object(M.useEffect)((function(){!l.current&&O(1),l.current=!1}),[n]),Object(M.useEffect)((function(){scrollTo(0,0)}),[h]),Object(a.jsxs)(Gr.a,{bodyClassName:f?"pb-1":"",children:[Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsxs)("thead",{className:"responsive-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:"tags-table__header-cell",onClick:i("tag"),children:["Tag ",Object(a.jsx)(ze,{currentOrder:o,field:"tag"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("shortUrls"),children:["Short URLs ",Object(a.jsx)(ze,{currentOrder:o,field:"shortUrls"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("visits"),children:["Visits ",Object(a.jsx)(ze,{currentOrder:o,field:"visits"})]}),Object(a.jsx)("th",{className:"tags-table__header-cell"})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("th",{colSpan:4,className:"p-0 border-top-0"})})]}),Object(a.jsxs)("tbody",{children:[0===m.length&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:4,className:"text-center",children:"No results found"})}),m.map((function(t){return Object(a.jsx)(e,{tag:t,selectedServer:c},t.tag)}))]})]}),f&&Object(a.jsx)("div",{className:"sticky-card-paginator",children:Object(a.jsx)(ja,{pagesCount:v.length,currentPage:h,setCurrentPage:O})})]},h)}},Wi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=Object(K.e)(),l=Object(p.a)(i,2),u=l[0],d=l[1],j=Object(K.e)(),b=Object(p.a)(j,2),h=b[0],O=b[1],f=Object(K.e)(),m=Object(p.a)(f,2),x=m[0],g=m[1],y=Object(v.a)(s);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsxs)("th",{className:"responsive-table__cell","data-th":"Tag",children:[Object(a.jsx)(ai,{tag:c.tag,colorGenerator:r})," ",c.tag]}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Short URLs",children:Object(a.jsx)(o.b,{to:"/server/".concat(y,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),children:lr(c.shortUrls)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(o.b,{to:"/server/".concat(y,"/tag/").concat(c.tag,"/visits"),children:lr(c.visits)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)(Tr,{toggle:g,isOpen:x,children:[Object(a.jsxs)(W.a,{onClick:O,children:[Object(a.jsx)(I.a,{icon:V.C,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(W.a,{onClick:d,children:[Object(a.jsx)(I.a,{icon:V.Q,fixedWidth:!0,className:"mr-1"})," Delete"]})]})}),Object(a.jsx)(t,{tag:c.tag,toggle:O,isOpen:h}),Object(a.jsx)(e,{tag:c.tag,toggle:d,isOpen:u})]})}},qi=function(e,t){e.serviceFactory("TagsSelector",ii,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",li,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return ui})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",bi,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",Bi,"TagCard"),e.serviceFactory("TagsTableRow",Wi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Hi,"TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",vi,"TagsCards","TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"]));var r=function(e){return function(t){return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(){return function(){var r=Object(x.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:Ri}),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:Di}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:Ei,errorData:pt(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 Gi})),e.serviceFactory("tagDeleted",(function(){return Si})),e.serviceFactory("tagEdited",(function(){return Ti})),e.serviceFactory("deleteTag",yi,"buildShlinkApiClient"),e.serviceFactory("editTag",Ui,"buildShlinkApiClient","ColorGenerator")},zi=r(299),Qi="shlink/mercure/GET_MERCURE_INFO_START",Ki="shlink/mercure/GET_MERCURE_INFO_ERROR",Ji="shlink/mercure/GET_MERCURE_INFO",Zi=jt((lt={},Object(u.a)(lt,Qi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(lt,Ki,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(lt,Ji,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),lt),{loading:!0,error:!1}),Yi=function(e){return function(){return function(){var t=Object(x.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:Qi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:Ki}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:Ji,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:Ki});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},Xi=function(e){e.serviceFactory("loadMercureInfo",Yi,"buildShlinkApiClient")},$i=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(Gr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Qr.a,{children:Object(a.jsxs)(Zc,{checked:r.enabled,onChange:n,children:["Enable or disable real-time updates.",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)(Qr.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)(Xr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){var t=e.target;return c(Number(t.value))}}),r.enabled&&Object(a.jsxs)("small",{className:"form-text text-muted",children:[void 0!==r.interval&&r.interval>0&&Object(a.jsxs)("span",{children:["Updates will be reflected in the UI every ",Object(a.jsx)("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},eo=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(Mr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},to=function(e,t,r,n){return function(){return Object(a.jsx)(Cn.a,{children:Object(a.jsx)(eo,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},ro=r(614),no="shlink/realTimeUpdates/SET_SETTINGS",co=jt(Object(u.a)({},no,(function(e,t){return Object(ro.a)(e,Object(qn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),ao=function(e){return{type:no,realTimeUpdates:{enabled:e}}},so=function(e){return{type:no,realTimeUpdates:{interval:e}}},io=function(e){return{type:no,shortUrlCreation:e}},oo=function(e){return{type:no,ui:e}},lo=function(e){return{type:no,visits:e}},uo=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},jo=function(e){var t,r,n,c,s,i=e.settings,o=e.setShortUrlCreationSettings,l=null!==(t=i.shortUrlCreation)&&void 0!==t?t:{validateUrls:!1},u=function(e){return function(){return o(Object(d.a)(Object(d.a)({},null!==l&&void 0!==l?l:{validateUrls:!1}),{},{tagFilteringMode:e}))}};return Object(a.jsxs)(Gr.a,{title:"Short URLs form",className:"h-100",children:[Object(a.jsx)(Qr.a,{children:Object(a.jsxs)(Zc,{checked:null!==(r=l.validateUrls)&&void 0!==r&&r,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{validateUrls:e}))},children:["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:l.validateUrls?"checked":"unchecked"}),"."]})]})}),Object(a.jsx)(Qr.a,{children:Object(a.jsxs)(Zc,{checked:null===(n=l.forwardQuery)||void 0===n||n,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{forwardQuery:e}))},children:["Make all new short URLs forward their query params to the long URL.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Forward query params on redirect"})," checkbox will be ",Object(a.jsx)("b",{children:null===(c=l.forwardQuery)||void 0===c||c?"checked":"unchecked"}),"."]})]})}),Object(a.jsxs)(Qr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(J,{text:uo(l.tagFilteringMode),children:[Object(a.jsx)(W.a,{active:!l.tagFilteringMode||"startsWith"===l.tagFilteringMode,onClick:u("startsWith"),children:uo("startsWith")}),Object(a.jsx)(W.a,{active:"includes"===l.tagFilteringMode,onClick:u("includes"),children:uo("includes")})]}),Object(a.jsx)("small",{className:"form-text text-muted",children:(s=l.tagFilteringMode,"includes"===s?Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"including"})," provided input."]}):Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"starting with"})," provided input."]}))})]})]})},bo=function(e){var t,r,n=e.settings.ui,c=e.setUiSettings;return Object(a.jsxs)(Gr.a,{title:"User interface",className:"h-100",children:[Object(a.jsxs)(Qr.a,{children:[Object(a.jsx)(I.a,{icon:"dark"===(null===n||void 0===n?void 0:n.theme)?V.z:V.L,className:"user-interface__theme-icon"}),Object(a.jsx)(Zc,{checked:"dark"===(null===n||void 0===n?void 0:n.theme),onChange:function(e){var t=e?"dark":"light";c(Object(d.a)(Object(d.a)({},n),{},{theme:t})),Object(ea.g)(t)},children:"Use dark theme."})]}),Object(a.jsxs)(Qr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(Oi,{mode:null!==(t=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(Ar.a)(e)},onChange:function(e){return c(Object(d.a)(Object(d.a)({},null!==n&&void 0!==n?n:{theme:"light"}),{},{tagsMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==r?r:"cards"}),"."]})]})]})},ho=function(e){var t,r=e.onChange,n=e.active,c=e.allText;return Object(a.jsx)(J,{text:null!==(t=me(n))&&void 0!==t?t:c,children:Object(a.jsx)(_e,{allText:c,active:n,onChange:r})})},Oo=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(Gr.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Qr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(ho,{allText:"All visits",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})}})]})})},vo=function(e,t){e.serviceFactory("Settings",to,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",dc.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return $i})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return jo})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return bo})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return Oo})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return ao})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return so})),e.serviceFactory("setShortUrlCreationSettings",(function(){return io})),e.serviceFactory("setUiSettings",(function(){return oo})),e.serviceFactory("setVisitsSettings",(function(){return lo}))},fo="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",mo=function(e){return function(t,r){return function(){var n=Object(x.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:fo,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:pt(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},xo="shlink/domainsList/LIST_DOMAINS_START",go="shlink/domainsList/LIST_DOMAINS_ERROR",po="shlink/domainsList/LIST_DOMAINS",yo="shlink/domainsList/FILTER_DOMAINS",So={domains:[],filteredDomains:[],loading:!1,error:!1},Co=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},No=jt((ut={},Object(u.a)(ut,xo,(function(){return Object(d.a)(Object(d.a)({},So),{},{loading:!0})})),Object(u.a)(ut,go,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},So),{},{error:!0,errorData:t})})),Object(u.a)(ut,po,(function(e,t){var r=t.domains,n=t.defaultRedirects;return Object(d.a)(Object(d.a)({},So),{},{domains:r,filteredDomains:r,defaultRedirects:n})})),Object(u.a)(ut,yo,(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)(ut,fo,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(Co(r,n)),filteredDomains:e.filteredDomains.map(Co(r,n))})})),ut),So),ko=function(e){return function(){return function(){var t=Object(x.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:return r({type:xo}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,i=s.data,o=s.defaultRedirects,r({type:po,domains:i,defaultRedirects:o}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(2),r({type:go,errorData:pt(t.t0)});case 14:case"end":return t.stop()}}),t,null,[[2,11]])})));return function(e,r){return t.apply(this,arguments)}}()}},wo=function(e){return{type:yo,searchTerm:e}},_o=r(609),Uo=r(619),To=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(K.e)(),i=Object(p.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(M.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(_o.a,{children:[Object(a.jsx)(Xr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(Uo.a,{addonType:"append",children:[Object(a.jsx)(Kr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(F.a)(b,u),children:Object(a.jsx)(I.a,{icon:V.R})}),Object(a.jsx)(Cr.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(F.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},Ro=function(e){var t=e.isLast,r=Object(y.a)(e,["isLast"]);return Object(a.jsx)(Nn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},Eo=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(M.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(p.a)(j,2),h=b[0],O=b[1],v=Object(M.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(p.a)(v,2),g=f[0],y=f[1],S=Object(M.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),C=Object(p.a)(S,2),N=C[0],k=C[1],w=Object(Ar.b)(Object(x.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(Ar.d)(h),regular404Redirect:Object(Ar.d)(g),invalidShortUrlRedirect:Object(Ar.d)(N)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(Dr.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsxs)(Lr.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(Vr.a,{children:[Object(a.jsxs)(Ro,{value:h,onChange:O,children:[Object(a.jsxs)(sn,{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)(Ro,{value:g,onChange:y,children:[Object(a.jsxs)(sn,{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)(Ro,{value:N,isLast:!0,onChange:k,children:[Object(a.jsx)(sn,{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)(Ir.a,{children:[Object(a.jsx)(Kr.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)(Kr.a,{color:"primary",children:"Save"})]})]})})},Do=function(e){var t=e.fallback;return Object(a.jsxs)("span",{className:"text-muted",children:[!t&&Object(a.jsx)("small",{children:"No redirect"}),t&&Object(a.jsxs)(a.Fragment,{children:[t," ",Object(a.jsx)("small",{children:"(as fallback)"})]})]})},Lo=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(Cr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},Vo=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=e.selectedServer,l=Object(K.e)(),u=Object(p.a)(l,2),d=u[0],j=u[1],b=c.domain,h=c.isDefault,O=c.redirects,v=!h||Object(Mt.c)(o);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:h?Object(a.jsx)(Lo,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:b}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===O||void 0===O?void 0:O.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(Do,{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:v?void 0:"defaultDomainBtn",children:Object(a.jsx)(Kr.a,{outline:!0,size:"sm",disabled:!v,onClick:v?j:void 0,children:Object(a.jsx)(I.a,{fixedWidth:!0,icon:v?V.m:V.b})})}),!v&&Object(a.jsxs)(Cr.a,{target:"defaultDomainBtn",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)(Eo,{domain:c,isOpen:d,toggle:j,editDomainRedirects:s})]})},Io=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],Fo=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=e.selectedServer,o=n.filteredDomains,l=n.defaultRedirects,u=n.loading,d=n.error,j=n.errorData,b=null!==l&&void 0!==l?l:null===(t=o.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(M.useEffect)((function(){r()}),[]),u)return Object(a.jsx)(bn.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:c}),d?Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{errorData:j,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(Gr.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:Io.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[o.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:Io.length,className:"text-center",children:"No results found"})}),o.map((function(e){return Object(a.jsx)(Vo,{domain:e,editDomainRedirects:s,defaultRedirects:b,selectedServer:i},e.domain)}))]})]})})]})},Ao=function(e,t){e.serviceFactory("DomainSelector",(function(){return To})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return Fo})),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",ko,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return wo})),e.serviceFactory("editDomainRedirects",mo,"buildShlinkApiClient")},Mo="shlink/appUpdates/APP_UPDATE_AVAILABLE",Go="shlink/appUpdates/RESET_APP_UPDATE",Po=jt((dt={},Object(u.a)(dt,Mo,(function(){return!0})),Object(u.a)(dt,Go,(function(){return!1})),dt),!1),Bo=bt(Mo),Ho=bt(Go),Wo=r(153),qo=r(610),zo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(K.e)(),s=Object(p.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(qo.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:Gr.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)(Kr.a,{disabled:i,className:"ml-2",color:"secondary",size:"sm",onClick:function(){o(),n()},children:[!i&&Object(a.jsxs)(a.Fragment,{children:["Restart now ",Object(a.jsx)(I.a,{icon:V.M,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},Qo=r(33),Ko=function(){var e=Object(x.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(Qo.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)}}(),Jo=function(e,t,r,n,c,s,i,o){return function(l){var u=l.fetchServers,d=l.servers,j=l.settings,h=l.appUpdated,O=l.resetAppUpdate,v="/"===l.location.pathname;return Object(M.useEffect)((function(){var e,t;0===Object.keys(d).length&&u(),Object(ea.g)(null!==(e=null===(t=j.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:P()("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),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:"/manage-servers",component:i}),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:Wo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(o,{})})]}),Object(a.jsx)(zo,{isOpen:h,toggle:O,forceUpdate:Ko})]})}},Zo=function(e,t,r){e.serviceFactory("App",Jo,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.decorator("App",r),e.serviceFactory("appUpdateAvailable",(function(){return Bo})),e.serviceFactory("resetAppUpdate",(function(){return Ho}))},Yo=new j.a,Xo=Yo.container,$o=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)}}(Xo,t)))},el=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($o,{}))};Zo(Yo,el,b.h),Object(L.a)(Yo,el,b.h),D(Yo),pn(Yo,el,b.h),Nc(Yo,el,b.h),qi(Yo,el),ri(Yo,el),Object(zi.a)(Yo),Xi(Yo),vo(Yo,el),Ao(Yo,el);var tl=Xo,rl=r(302),nl=r(80),cl=r(223),al=Object(nl.c)({servers:$n,selectedServer:Bn,shortUrlsList:Kt,shortUrlsListParams:$t,shortUrlCreationResult:It,shortUrlDeletion:_t,shortUrlEdition:Ht,shortUrlVisits:xs,tagVisits:Es,orphanVisits:qs,shortUrlDetail:xn,tagsList:Mi,tagDelete:pi,tagEdit:_i,mercureInfo:Zi,settings:co,domainsList:No,visitsOverview:$s,appUpdated:Po}),sl=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||nl.d,il={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},ol=Object(nl.e)(al,Object(cl.load)(il),sl(Object(nl.a)(Object(cl.save)(il),rl.a))),ll=r(64),ul=r.n(ll),dl=r(303),jl=r(304),bl=r(305),hl=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 Ol(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(534),r(535);delete ul.a.Icon.Default.prototype._getIconUrl,ul.a.Icon.Default.mergeOptions({iconRetinaUrl:dl.a,iconUrl:jl.a,shadowUrl:bl.a});var vl=tl.App,fl=tl.ScrollToTop,ml=tl.ErrorHandler,xl=tl.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:ol,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(ml,{children:Object(a.jsx)(fl,{children:Object(a.jsx)(vl,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/feature/not-empty-resultsets")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/feature/not-empty-resultsets","/service-worker.js");hl?(!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()}))})):Ol(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")}))):Ol(t,e)}))}}({onUpdate:function(){ol.dispatch(xl())}})},54:function(e,t,r){"use strict";var n=r(0),c=r(541),a=r(316),s=r(8),i=r.n(s),o=r(11),l=r(12),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]})})})})}},60: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})}},70: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(542),a=r(547),s=r(31),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}}}},[[319,1,2]]]); -//# sourceMappingURL=main.407b3056.chunk.js.map \ No newline at end of file diff --git a/feature/not-empty-resultsets/static/js/main.407b3056.chunk.js.map b/feature/not-empty-resultsets/static/js/main.407b3056.chunk.js.map deleted file mode 100644 index 19a64b3c..00000000 --- a/feature/not-empty-resultsets/static/js/main.407b3056.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["servers/helpers/withoutSelectedServer.tsx","utils/helpers/files.ts","common/img/ShlinkLogo.tsx","servers/helpers/withSelectedServer.tsx","common/NotFound.tsx","servers/ServersListGroup.tsx","utils/helpers/hooks.ts","common/services/provideServices.ts","common/ScrollToTop.tsx","common/ErrorHandler.tsx","common/services/ImageDownloader.ts","utils/services/provideServices.ts","servers/data/index.ts","utils/services/LocalStorage.ts","utils/services/ColorGenerator.ts","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","utils/utils.ts","common/MainHeader.tsx","common/Home.tsx","common/MenuLayout.tsx","common/AsideMenu.tsx","utils/SimpleCard.tsx","utils/helpers/features.ts","utils/theme/index.ts","utils/helpers/query.ts","utils/SearchField.tsx","api/services/ShlinkApiClient.ts","api/services/ShlinkApiClientBuilder.ts","api/services/provideServices.ts","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/helpers/hooks.ts","short-urls/SearchBar.tsx","utils/helpers/ordering.ts","utils/SortingDropdown.tsx","mercure/helpers/boundToMercureHub.tsx","mercure/helpers/index.ts","mercure/helpers/Topics.ts","utils/table/TableOrderIcon.tsx","utils/helpers/redux.ts","visits/VisitsStats.tsx","short-urls/helpers/index.ts","visits/reducers/visitCreation.ts","api/utils/index.ts","short-urls/reducers/shortUrlDeletion.ts","short-urls/reducers/shortUrlCreation.ts","short-urls/reducers/shortUrlEdition.ts","short-urls/reducers/shortUrlsList.ts","short-urls/reducers/shortUrlsListParams.ts","utils/helpers/numbers.ts","utils/helpers/pagination.ts","short-urls/Paginator.tsx","short-urls/ShortUrlsList.tsx","utils/CopyToClipboardIcon.tsx","utils/Time.tsx","short-urls/helpers/ShortUrlDetailLink.tsx","short-urls/helpers/ShortUrlVisitsCount.tsx","short-urls/helpers/ShortUrlsRow.tsx","utils/DropdownBtnMenu.tsx","short-urls/helpers/ShortUrlsRowMenu.tsx","short-urls/CreateShortUrl.tsx","utils/Result.tsx","api/ShlinkApiError.tsx","short-urls/helpers/DeleteShortUrlModal.tsx","short-urls/helpers/CreateShortUrlResult.tsx","short-urls/ShortUrlsTable.tsx","short-urls/helpers/qr-codes/QrFormatDropdown.tsx","short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.tsx","short-urls/helpers/QrCodeModal.tsx","utils/helpers/qrCodes.ts","utils/BooleanControl.tsx","utils/Checkbox.tsx","short-urls/UseExistingIfFoundInfoIcon.tsx","utils/InfoTooltip.tsx","short-urls/helpers/ShortUrlFormCheckboxGroup.tsx","short-urls/ShortUrlForm.tsx","short-urls/EditShortUrl.tsx","short-urls/reducers/shortUrlDetail.ts","short-urls/services/provideServices.ts","utils/FormGroupContainer.tsx","servers/helpers/ServerForm.tsx","servers/CreateServer.tsx","servers/ServersDropdown.tsx","servers/DeleteServerModal.tsx","servers/DeleteServerButton.tsx","servers/EditServer.tsx","servers/helpers/ImportServersBtn.tsx","servers/reducers/selectedServer.ts","servers/reducers/servers.ts","servers/reducers/remoteServers.ts","servers/helpers/ForServerVersion.tsx","servers/helpers/ServerError.tsx","servers/Overview.tsx","servers/ManageServers.tsx","servers/ManageServersRow.tsx","servers/ManageServersRowDropdown.tsx","servers/services/ServersImporter.ts","servers/services/ServersExporter.ts","servers/services/provideServices.ts","visits/VisitsHeader.tsx","visits/ShortUrlVisitsHeader.tsx","utils/helpers/visits.ts","utils/ToggleSwitch.tsx","utils/helpers/charts.ts","visits/charts/LineChartCard.tsx","common/SimplePaginator.tsx","visits/VisitsTable.tsx","visits/helpers/MapModal.tsx","visits/helpers/OpenMapModalBtn.tsx","visits/types/helpers.ts","visits/services/VisitsParser.ts","visits/helpers/VisitsFilterDropdown.tsx","visits/charts/DoughnutChartLegend.tsx","visits/charts/DoughnutChart.tsx","visits/charts/ChartCard.tsx","visits/charts/DoughnutChartCard.tsx","utils/PaginationDropdown.tsx","visits/charts/HorizontalBarChart.tsx","visits/charts/SortableBarChartCard.tsx","visits/ShortUrlVisits.tsx","visits/reducers/common.ts","visits/reducers/shortUrlVisits.ts","visits/TagVisitsHeader.tsx","visits/TagVisits.tsx","visits/reducers/tagVisits.ts","visits/OrphanVisitsHeader.tsx","visits/OrphanVisits.tsx","visits/reducers/orphanVisits.ts","visits/reducers/visitsOverview.ts","visits/services/VisitsExporter.ts","visits/services/provideServices.ts","tags/helpers/TagBullet.tsx","tags/helpers/TagsSelector.tsx","tags/TagCard.tsx","tags/helpers/DeleteTagConfirmModal.tsx","tags/helpers/EditTagModal.tsx","tags/data/TagsListChildrenProps.ts","tags/TagsModeDropdown.tsx","tags/TagsList.tsx","tags/reducers/tagDelete.ts","tags/reducers/tagEdit.ts","tags/reducers/tagsList.ts","tags/TagsCards.tsx","tags/TagsTable.tsx","tags/TagsTableRow.tsx","tags/services/provideServices.ts","mercure/reducers/mercureInfo.ts","mercure/services/provideServices.ts","settings/RealTimeUpdates.tsx","settings/Settings.tsx","settings/reducers/settings.ts","settings/ShortUrlCreation.tsx","settings/UserInterface.tsx","utils/dates/DateIntervalSelector.tsx","settings/Visits.tsx","settings/services/provideServices.ts","domains/reducers/domainRedirects.ts","domains/reducers/domainsList.ts","domains/DomainSelector.tsx","domains/helpers/EditDomainRedirectsModal.tsx","domains/DomainRow.tsx","domains/ManageDomains.tsx","domains/services/provideServices.ts","app/reducers/appUpdates.ts","common/AppUpdateBanner.tsx","utils/helpers/sw.ts","app/App.tsx","app/services/provideServices.ts","container/index.ts","reducers/index.ts","container/store.ts","serviceWorkerRegistration.ts","utils/helpers/leaflet.ts","index.tsx","utils/Message.tsx","common/NoMenuLayout.tsx","utils/helpers/version.ts"],"names":["withoutSelectedServer","WrappedComponent","props","useEffect","resetSelectedServer","saveUrl","url","filename","document","link","createElement","setAttribute","style","visibility","body","appendChild","click","removeChild","saveCsv","window","csv","blob","Blob","type","URL","createObjectURL","ShlinkLogo","color","MAIN_COLOR","className","viewBox","version","xmlns","fill","d","withSelectedServer","ServerError","selectServer","selectedServer","match","params","serverId","isNotFoundServer","loading","NotFound","to","children","ServerListItem","id","name","ListGroupItem","tag","Link","icon","chevronIcon","ServersListGroup","servers","embedded","length","ListGroup","classNames","map","useStateFlagTimeout","setTimeout","clearTimeout","initialValue","delay","useState","flag","setFlag","timeout","useRef","undefined","callback","current","useToggle","useSwipeable","showSidebar","hideSidebar","swipeMenuIfNoModalExists","e","event","composedPath","some","classList","contains","querySelector","useReactSwipeable","delta","onSwipedLeft","onSwipedRight","useQueryState","paramName","initialState","value","setValue","location","history","query","parseQuery","search","pushState","pathname","stringifyQuery","useEffectExceptFirstTime","deps","isFirstLoad","provideServices","bottle","connect","withRouter","constant","global","console","axios","service","ImageDownloader","serviceFactory","ScrollToTop","decorator","MainHeader","Home","MenuLayout","AsideMenu","ShlinkVersionsContainer","ErrorHandler","scrollTo","error","state","hasError","this","outline","onClick","reload","Component","imgUrl","get","responseType","data","localStorage","LocalStorage","ColorGenerator","hasServerData","server","apiKey","isServerWithId","hasOwnProperty","isReachableServer","getServerId","serverWithIdToServerData","omit","buildPath","path","key","item","getItem","JSON","parse","set","setItem","stringify","floor","Math","random","letters","normalizeKey","toLowerCase","trim","storage","colors","getColorForKey","normalizedKey","setColorForKey","rangeOf","join","normalizeVersion","pipe","versionToSemVer","versionToPrintable","VersionLink","project","href","ShlinkVersions","clientVersion","normalizedClientVersion","printableVersion","classes","size","mappingFn","startAt","range","hasValue","isNil","isEmpty","handleEventPreventingDefault","handler","preventDefault","nonEmptyValueOrNull","capitalize","charAt","toUpperCase","slice","ServersDropdown","isOpen","toggleOpen","close","settingsPath","toggleClass","Navbar","dark","fixed","expand","NavbarBrand","NavbarToggler","arrowIcon","Collapse","navbar","Nav","NavItem","NavLink","active","cogsIcon","serversList","values","hasServers","autoConnectServer","find","autoConnect","push","Card","Row","noGutters","faPlus","faExternalLinkAlt","TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","Overview","EditShortUrl","ManageDomains","sidebarVisible","toggleSidebar","addOrphanVisitsRoute","supportsOrphanVisits","addManageDomainsRoute","supportsDomainRedirects","burgerClasses","swipeableProps","burgerIcon","showOnMobile","exact","from","component","render","AsideMenuItem","rest","activeClassName","DeleteServerButton","hasId","addManageDomainsLink","asideClass","suffix","fixedWidth","overviewIcon","isActive","_","listIcon","createIcon","flip","tagsIcon","domainsIcon","editIcon","textClassName","SimpleCard","title","bodyClassName","serverMatchesVersions","versions","versionMatch","supportsQrCodeSizeInQuery","minVersion","supportsShortUrlTitle","supportsQrCodeMargin","supportsTagsInPatch","supportsBotVisits","supportsCrawlableVisits","supportsQrErrorCorrection","supportsForwardQuery","supportsDefaultDomainRedirectsEdition","MAIN_COLOR_ALPHA","HIGHLIGHTED_COLOR","HIGHLIGHTED_COLOR_ALPHA","PRIMARY_LIGHT_COLOR","PRIMARY_DARK_COLOR","changeThemeInMarkup","theme","html","getElementsByTagName","isDarkThemeEnabled","getAttribute","qs","ignoreQueryPrefix","arrayFormat","timer","buildShlinkBaseUrl","apiVersion","rejectNilProps","reject","normalizeOrderByInParams","orderBy","Object","keys","firstKey","firstValue","ShlinkApiClient","baseUrl","listShortUrls","a","performRequest","then","shortUrls","createShortUrl","options","filteredOptions","resp","getShortUrlVisits","shortCode","visits","getTagVisits","getOrphanVisits","getVisitsOverview","getShortUrl","domain","deleteShortUrl","updateShortUrlTags","tags","updateShortUrl","listTags","withStats","stats","deleteTags","editTag","oldName","newName","health","mercureInfo","listDomains","domains","editDomainRedirects","domainRedirects","method","headers","paramsSerializer","response","apiClients","buildShlinkApiClient","getStateOrSelectedServer","getState","isGetState","prop","Error","clientKey","SearchField","onChange","large","noBorder","searchTerm","setSearchTerm","resetTimer","searchTermChanged","newSearchTerm","placeholder","target","searchIcon","hidden","Tag","text","clearable","colorGenerator","onClose","backgroundColor","cursor","DropdownBtn","disabled","dropdownClassName","right","minWidth","toggle","toggleClasses","Dropdown","DropdownToggle","caret","DropdownMenu","isDateObject","date","formatDateFromFormat","theFormat","format","formatISO","formatIsoDate","formatInternational","formatDate","parseISO","stdParseISO","isBetween","start","end","isWithinInterval","isBeforeOrEqual","dateToCompare","isEqual","isBefore","dateRangeIsEmpty","dateRange","filter","Boolean","rangeIsInterval","INTERVAL_TO_STRING_MAP","today","yesterday","last7Days","last30Days","last90Days","last180Days","last365Days","all","DATE_INTERVALS","rangeOrIntervalToString","startDate","endDate","dateRangeToString","startOfDaysAgo","daysAgo","startOfDay","subDays","Date","endingToday","endOfDay","intervalToDateRange","dateInterval","dateToMatchingInterval","theDate","cond","T","DateInput","isClearable","selected","showCalendarIcon","ref","dateFormat","calendarIcon","input","focus","DateRangeRow","onStartDateChange","onEndDateChange","placeholderText","maxDate","minDate","DateIntervalDropdownItems","allText","DropdownItem","divider","interval","DateRangeSelector","onDatesChange","initialDateRange","defaultText","updatable","initialIntervalIsRange","activeInterval","setActiveInterval","activeDateRange","setActiveDateRange","updateDateRange","updateInterval","header","useShortUrlsQuery","useMemo","extra","evolvedQuery","queryString","dateOrNull","SearchBar","toFirstPage","selectedTags","split","setDates","setSearch","removeTag","selectedTag","tagsList","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","sortList","list","field","dir","sort","b","greaterThan","smallerThan","SortingDropdown","items","order","isButton","handleItemClick","fieldKey","newOrderDir","UncontrolledDropdown","toPairs","fieldValue","sortAscIcon","sortDescIcon","boundToMercureHub","getTopicsForProps","pendingUpdates","Set","createNewVisits","loadMercureInfo","closeEventSource","topics","onMessage","onTokenExpired","mercureHubUrl","token","onEventSourceMessage","onEventSourceError","status","subscriptions","topic","hubUrl","searchParams","append","es","EventSource","Authorization","onmessage","onerror","forEach","bindToMercureTopic","visit","add","setInterval","clear","clearInterval","Topics","TableOrderIcon","currentOrder","caretUpIcon","caretDownIcon","orphanVisits","shortUrlVisits","selectedBar","buildReducer","action","actionHandler","currentState","buildActionCreator","shortUrlMatches","shortUrl","CREATE_VISITS","createdVisits","parseApiError","isInvalidDeletionError","DELETE_SHORT_URL_START","DELETE_SHORT_URL_ERROR","SHORT_URL_DELETED","RESET_DELETE_SHORT_URL","errorData","dispatch","resetDeleteShortUrl","CREATE_SHORT_URL_START","CREATE_SHORT_URL_ERROR","CREATE_SHORT_URL","RESET_CREATE_SHORT_URL","result","saving","resetCreateShortUrl","EDIT_SHORT_URL_START","EDIT_SHORT_URL_ERROR","SHORT_URL_EDITED","editShortUrl","sendTagsSeparately","Promise","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","page","resetShortUrlParams","ceil","formatter","Intl","NumberFormat","prettify","number","Number","ELLIPSIS","progressivePagination","currentPage","pageCount","pages","max","min","unshift","pageIsEllipsis","pageNumber","prettifyPageNumber","keyForPage","index","Paginator","paginator","currentQueryString","pagesCount","urlForPage","Pagination","listClassName","PaginationItem","PaginationLink","previous","next","ShortUrlsTable","shortUrlsListParams","shortUrlsList","head","setOrder","refreshList","extraParams","handleOrderBy","addTag","newTag","itemsPerPage","orderByColumn","renderOrderIcon","onTagClick","CopyToClipboardIcon","onCopy","copyIcon","Time","relative","dateObject","dateTime","getUnixTime","formatDistance","buildUrl","ShortUrlDetailLink","ShortUrlVisitsCount","maxVisits","meta","visitsLink","prettifiedMaxVisits","tooltipRef","el","infoIcon","UncontrolledTooltip","placement","ShortUrlsRow","ShortUrlsRowMenu","copiedToClipboard","setCopiedToClipboard","setActive","isFirstRun","data-th","DropdownBtnMenu","ButtonDropdown","menuIcon","DeleteShortUrlModal","QrCodeModal","isQrModalOpen","toggleQrCode","isDeleteModalOpen","toggleDelete","pieChartIcon","qrIcon","deleteIcon","ShortUrlForm","CreateShortUrlResult","shortUrlCreationResult","basicMode","shortUrlCreationSettings","settings","shortUrlCreation","customSlug","shortCodeLength","validSince","validUntil","findIfExists","validateUrl","validateUrls","forwardQuery","getInitialState","mode","onSave","canBeClosed","Result","small","ShlinkApiError","fallbackMessage","detail","invalidElements","shortUrlDeletion","inputValue","setInputValue","handleDeleteUrl","catch","identity","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","actionableFieldClasses","orderableColumnsClasses","tableClasses","supportsTitle","colSpan","QrFormatDropdown","setFormat","QrErrorCorrectionDropdown","errorCorrection","setErrorCorrection","imageDownloader","ForServerVersion","setSize","margin","setMargin","capabilities","useSizeInPath","marginIsSupported","errorCorrectionIsSupported","willRenderThreeControls","qrCodeUrl","buildQrCodeUrl","totalSize","modalSize","step","src","alt","Button","block","saveImage","downloadIcon","BooleanControl","checked","inline","uuid","typeClasses","display","htmlFor","Checkbox","InfoModal","UseExistingIfFoundInfoIcon","isModalOpen","toggleModal","InfoTooltip","ShortUrlFormCheckboxGroup","infoTooltip","normalizeTag","replace","toDate","dynamicColClasses","TagsSelector","DomainSelector","shortUrlData","setShortUrlData","isEdit","isBasicMode","hadTitleOriginally","resolveNewTitle","hasNewTitle","matcher","submit","renderOptionalInput","fromGroupProps","Input","renderDateInput","basicComponents","bsSize","required","showCustomizeCard","limitAccessCardClasses","showCrawlableControl","showForwardQueryControl","showBehaviorCard","extraChecksCardClasses","crawlable","goBack","shortUrlDetail","getShortUrlDetail","shortUrlEdition","savingError","savingErrorData","savingSucceeded","isSuccessful","isNotSuccessful","Message","faArrowLeft","GET_SHORT_URL_DETAIL_START","GET_SHORT_URL_DETAIL_ERROR","GET_SHORT_URL_DETAIL","FormGroupContainer","labelClassName","forId","FormGroup","ServerForm","initialValues","setName","setUrl","setApiKey","handleSubmit","ImportResult","CreateServer","ImportServersBtn","createServer","serversImported","setServersImported","errorImporting","setErrorImporting","NoMenuLayout","serverData","tooltipPlacement","onImport","onImportError","nav","inNavbar","serverIcon","plusIcon","DeleteServerModal","deleteServer","redirectHome","showModal","hideModal","EditServer","editServer","importServersFromFile","createServers","fileRef","files","importIcon","accept","SELECT_SERVER","RESET_SELECTED_SERVER","toSemVer","getServerVersion","memoizeWith","_serverId","serverNotFound","serverNotReachable","EDIT_SERVER","DELETE_SERVER","CREATE_SERVERS","SET_AUTO_CONNECT","newServers","dissoc","fromPairs","evaluatedServerId","serversListToMap","reduce","acc","setAutoConnect","responseToServersList","Array","isArray","fetchServers","homepage","remoteList","maxVersion","fullWidth","loadVisitsOverview","visitsOverview","loadingTags","loadingVisits","orphanVisitsCount","useHistory","CardTitle","CardText","CardHeader","CardBody","encodeURIComponent","ManageServers","serversExporter","ManageServersRow","allServers","setServersList","hasAutoConnect","exportServers","exportIcon","width","ManageServersRowDropdown","checkIcon","isMenuOpen","toggleMenu","serverUrl","isAutoConnect","autoConnectIcon","toggleOffIcon","toggleOnIcon","connectIcon","validateServer","validateServers","every","ServersImporter","csvJson","fileReaderFactory","file","reader","resolve","addEventListener","content","toString","toObject","readAsText","ServersExporter","csvjson","toCSV","FileReader","VisitsHeader","ShortUrlVisitsHeader","shortLink","longLink","visitsStatsTitle","DEFAULT","BROWSERS_WHITELIST","extractDomain","includes","fillTheGaps","labels","zipObj","ToggleSwitch","pointerOnHover","native","firstElement","renderChartLabel","dataset","formattedValue","label","renderPieChartLabel","STEPS_MAP","monthly","weekly","daily","hourly","STEP_TO_DURATION_MAP","hours","days","weeks","months","STEP_TO_DIFF_FUNC_MAP","differenceInHours","differenceInDays","differenceInWeeks","differenceInMonths","STEP_TO_DATE_FORMAT","firstWeekDay","startOfISOWeek","lastWeekDay","endOfISOWeek","groupVisitsByStep","countBy","generateLabelsAndGroupedVisits","groupedVisitsWithGaps","skipNoElements","diffFunc","newerDate","oldestDate","duration","num","generateLabels","generateDataset","tension","borderColor","selectedLabel","chartElementAtEvent","datasetsByPoint","setSelectedVisits","chart","LineChartCard","highlightedVisits","highlightedLabel","oldestVisitDate","now","always","determineInitialStep","setStep","skipNoVisits","toggleSkipNoVisits","visitsToDatasetGroups","reverse","groupedVisits","groupedHighlighted","generateChartDatasets","mainDataset","maintainAspectRatio","plugins","legend","tooltip","intersect","axis","callbacks","scales","y","beginAtZero","ticks","precision","x","onHover","renderLineChart","datasets","getElementAtEvent","entries","menuText","SimplePaginator","setCurrentPage","searchVisits","browser","os","referer","country","city","visitedUrl","visitMatchesSearch","calculateVisits","allVisits","sortedVisits","sortVisits","total","visitsGroups","splitEvery","VisitsTable","selectedVisits","matchMedia","isOrphanVisits","headerCellsClass","matchMobile","matches","isMobileDevice","setIsMobileDevice","resultSet","setPage","supportsBots","fullSizeColSpan","listener","removeEventListener","flat","botIcon","isSelected","v","potentialBot","OpenStreetMapTile","TileLayer","attribution","calculateMapProps","locations","bounds","zoom","center","latLong","MapModal","contentClassName","MapContainer","cityName","count","Marker","position","Popup","OpenMapModalBtn","modalTitle","activeCities","mapIsOpened","openMap","closeMap","dropdownIsOpened","toggleDropdown","openDropdown","locationsToShow","setLocationsToShow","buttonRef","openMapWithLocations","filtered","mapIcon","isOrphanVisit","groupNewVisitsByType","groupBy","newVisit","regularVisits","highlightedVisitsToStats","property","toApiParams","excludeBots","visitHasProperty","propertyName","optionalNumericToNumber","numeric","parseFloat","updateLocationsStatsForVisit","updateCountriesStatsForVisit","updateCitiesStatsForVisit","processStatsFromVisits","osStats","updateOsStatsForVisit","browsersStats","updateBrowsersStatsForVisit","browsers","referrersStats","updateReferrersStatsForVisit","referrers","countries","cities","citiesForMapStats","latitude","longitude","currentCity","updateCitiesForMapForVisit","citiesForMap","visitedUrlsStats","isNormalizedOrphanVisit","updateVisitedUrlsForVisit","visitedUrls","normalizeVisits","userAgent","visitLocation","common","bowser","parseUserAgent","countryName","VisitsFilterDropdown","botsSupported","orphanVisitsType","propsForOrphanVisitsTypeItem","DoughnutChartLegend","config","defaultColor","borderWidth","DoughnutChart","memo","chartRef","setChartRef","chartData","generateChartData","height","element","ChartCard","footer","CardFooter","DoughnutChartCard","PaginationDropdown","toggleClassName","ranges","Infinity","dropLabelIfHidden","startsWith","highlightedData","HorizontalBarChart","highlightedStats","statsAreDefined","highlightedKey","stacked","indexAxis","determineHeight","renderChartComponent","customKey","toLowerIfString","toLower","pickKeyFromPair","pickValueFromPair","SortableBarChartCard","sortingItems","extraHeaderContent","withPagination","setItemsPerPage","determineCurrentPagePairs","firstPageLength","i","sortedPairs","pairs","sortBy","getSortedPairsForStats","sortedKeys","sortedHighlightedPairs","currentPageStats","currentPageHighlightedStats","highlightedPages","determineStats","sections","byTime","subPath","faCalendarAlt","byContext","faChartPie","byLocation","faMapMarkedAlt","faList","VisitsNavLink","RouterNavLink","endsWith","VisitsStats","visitsInfo","getVisits","cancelGetVisits","exportCsv","loadingLarge","progress","fallbackInterval","defaultInterval","initialInterval","setInitialInterval","setDateRange","setHighlightedVisits","setHighlightedLabel","visitsFilter","setVisitsFilter","buildSectionUrl","normalizedVisits","mapLocations","highlightVisitsForProp","newSelectedBar","propEq","faFileDownload","Progress","striped","pills","section","amount","exportVisits","cancelGetShortUrlVisits","doFallbackRange","ITEMS_PER_PAGE","isLastPage","calcProgress","getVisitsWithLoader","visitsLoader","lastVisitLoader","extraFinishActionData","actionMap","shouldCancel","loadVisitsInParallel","flatten","loadPagesBlocks","pagesBlocks","concat","loadVisits","pagesRange","fallbackToInterval","finish","lastVisitLoaderForLoader","loader","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","GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL","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","GET_TAG_VISITS_FALLBACK_TO_INTERVAL","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","GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL","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","TagCard","DeleteTagConfirmModal","EditTagModal","displayed","isEditModalOpen","toggleEdit","hasTitle","displayTitle","titleRef","scrollWidth","clientWidth","faLink","faEye","deleteTag","tagDelete","tagDeleted","deleting","doDelete","tagEdited","tagEdit","newTagName","setNewTagName","setColor","showColorPicker","toggleColorPicker","hideColorPicker","editing","saveTag","onClosed","colorIcon","Popover","disableAlpha","hex","TagsModeDropdown","renderTitle","cardsIcon","TagsCards","TagsTable","filterTags","forceListTags","ui","tagsMode","setMode","resolveSortedTags","filteredTags","shortUrlsCount","normalizedTags","sortedTags","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","tagStats","displayedTag","setDisplayedTag","tagsCount","tagsGroups","group","TagsTableRow","pageFromQuery","showPaginator","isDropdownOpen","listTagsActionFactory","force","processedStats","factory","GET_MERCURE_INFO_START","GET_MERCURE_INFO_ERROR","GET_MERCURE_INFO","realTimeUpdates","enabled","info","RealTimeUpdates","toggleRealTimeUpdates","setRealTimeUpdatesInterval","SettingsSections","child","subChild","subIndex","Settings","ShortUrlCreation","UserInterface","Visits","SET_SETTINGS","mergeDeepRight","setShortUrlCreationSettings","setUiSettings","setVisitsSettings","tagFilteringModeText","changeTagsFilteringMode","faMoon","faSun","useDarkTheme","DateIntervalSelector","EDIT_DOMAIN_REDIRECTS","redirects","LIST_DOMAINS_START","LIST_DOMAINS_ERROR","LIST_DOMAINS","FILTER_DOMAINS","filteredDomains","replaceRedirectsOnDomain","defaultRedirects","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","authority","canEditDomain","forbiddenIcon","resolvedDefaultRedirects","column","APP_UPDATE_AVAILABLE","RESET_APP_UPDATE","appUpdateAvailable","resetAppUpdate","AppUpdateBanner","forceUpdate","isUpdating","setUpdating","Alert","reloadIcon","navigator","serviceWorker","getRegistrations","registrations","registration","waiting","postMessage","App","appUpdated","isHome","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","getClassForType","default","getTextClassForType","preloader","spin","versionToMatch","matchesMinVersion","compare","versionIsValidSemVer","defaultValue"],"mappings":"qJAMO,SAASA,EAA8BC,GAC5C,OAAO,SAACC,GAKN,OAJAC,qBAAU,WACRD,EAAME,wBACL,IAEI,cAACH,EAAD,eAAsBC,O,iCCZjC,oEAAO,IAAMG,EAAU,SAAC,EAAsBC,EAAaC,GAAsB,IAAvDC,EAAsD,EAAtDA,SAClBC,EAAOD,EAASE,cAAc,KAEpCD,EAAKE,aAAa,OAAQL,GAC1BG,EAAKE,aAAa,WAAYJ,GAC9BE,EAAKG,MAAMC,WAAa,SACxBL,EAASM,KAAKC,YAAYN,GAC1BA,EAAKO,QACLR,EAASM,KAAKG,YAAYR,IAGfS,EAAU,SAACC,EAAgBC,EAAab,GACnD,IAAMc,EAAO,IAAIC,KAAK,CAAEF,GAAO,CAAEG,KAAM,4BACjCjB,EAAMkB,IAAIC,gBAAgBJ,GAEhChB,EAAQc,EAAQb,EAAKC,K,uLCRVmB,EAAa,SAAC,GAAD,QAAGC,aAAH,MAAWC,IAAX,EAAuBC,EAAvB,EAAuBA,UAAvB,OACxB,qBAAKA,UAAWA,EAAWC,QAAQ,cAAcC,QAAQ,MAAMC,MAA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C,GAAqB1xC,GAAc2xC,kBAAQF,EAAgBzxC,EAAY,MAG7E,QAF2BimB,GAAc0rB,kBAAQF,EAAgBxrB,EAAY,QAEjDyrB,GAGxBE,EAAuBjtB,YAAYhJ,KAAU,SAACvrB,GAClD,IACE,OAAOuhD,kBAAQvhD,EAASA,EAAS,KACjC,MAAOiD,GACP,OAAO,MAIEkG,EAAqB,SAACnJ,GAAD,OAAsBwhD,EAAqBxhD,GAAtB,WAA+CA,GAAdA,GAE3EkJ,EAAkB,eAACu4C,EAAD,uDAAwB,SAAxB,OAC7B,SAACzhD,GAAD,OAA6BwhD,EAAqBxhD,GAAWA,EAAUyhD,M","file":"static/js/main.407b3056.chunk.js","sourcesContent":["import { FC, useEffect } from 'react';\n\ninterface WithoutSelectedServerProps {\n resetSelectedServer: Function;\n}\n\nexport function withoutSelectedServer(WrappedComponent: FC) {\n return (props: WithoutSelectedServerProps & T) => {\n useEffect(() => {\n props.resetSelectedServer();\n }, []);\n\n return ;\n };\n}\n","export const saveUrl = ({ document }: Window, url: string, filename: string) => {\n const link = document.createElement('a');\n\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n};\n\nexport const saveCsv = (window: Window, csv: string, filename: string) => {\n const blob = new Blob([ csv ], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n\n saveUrl(window, url, filename);\n};\n","import { MAIN_COLOR } from '../../utils/theme';\n\nexport interface ShlinkLogoProps {\n color?: string;\n className?: string;\n}\n\nexport const ShlinkLogo = ({ color = MAIN_COLOR, className }: ShlinkLogoProps) => (\n \n \n \n \n \n \n \n \n);\n","import { FC, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport Message from '../../utils/Message';\nimport { isNotFoundServer, SelectedServer } from '../data';\nimport NoMenuLayout from '../../common/NoMenuLayout';\n\ninterface WithSelectedServerProps extends RouteComponentProps<{ serverId: string }> {\n selectServer: (serverId: string) => void;\n selectedServer: SelectedServer;\n}\n\nexport function withSelectedServer(WrappedComponent: FC, ServerError: FC) {\n return (props: WithSelectedServerProps & T) => {\n const { selectServer, selectedServer, match } = props;\n\n useEffect(() => {\n selectServer(match.params.serverId);\n }, [ match.params.serverId ]);\n\n if (!selectedServer) {\n return (\n \n \n \n );\n }\n\n if (isNotFoundServer(selectedServer)) {\n return ;\n }\n\n return ;\n };\n}\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface NotFoundProps {\n to?: string;\n}\n\nconst NotFound: FC = ({ to = '/', children = 'Home' }) => (\n
\n \n

Oops! We could not find requested route.

\n

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

\n
\n {children}\n
\n
\n);\n\nexport default NotFound;\n","import { FC } from 'react';\nimport { ListGroup, ListGroupItem } from 'reactstrap';\nimport { Link } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronRight as chevronIcon } from '@fortawesome/free-solid-svg-icons';\nimport { ServerWithId } from './data';\nimport './ServersListGroup.scss';\n\ninterface ServersListGroupProps {\n servers: ServerWithId[];\n embedded?: boolean;\n}\n\nconst ServerListItem = ({ id, name }: { id: string; name: string }) => (\n \n {name}\n \n \n);\n\nconst ServersListGroup: FC = ({ servers, children, embedded = false }) => (\n <>\n {children &&
{children}
}\n {servers.length > 0 && (\n \n {servers.map(({ id, name }) => )}\n \n )}\n \n);\n\nexport default ServersListGroup;\n","import { useState, useRef, EffectCallback, DependencyList, useEffect } from 'react';\nimport { useSwipeable as useReactSwipeable } from 'react-swipeable';\nimport { parseQuery, stringifyQuery } from './query';\n\nconst DEFAULT_DELAY = 2000;\n\nexport type StateFlagTimeout = (initialValue?: boolean, delay?: number) => [ boolean, () => void ];\n\nexport const useStateFlagTimeout = (\n setTimeout: (callback: Function, timeout: number) => number,\n clearTimeout: (timer: number) => void,\n): StateFlagTimeout => (initialValue = false, delay = DEFAULT_DELAY) => {\n const [ flag, setFlag ] = useState(initialValue);\n const timeout = useRef(undefined);\n const callback = () => {\n setFlag(!initialValue);\n\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => setFlag(initialValue), delay);\n };\n\n return [ flag, callback ];\n};\n\ntype ToggleResult = [ boolean, () => void, () => void, () => void ];\n\nexport const useToggle = (initialValue = false): ToggleResult => {\n const [ flag, setFlag ] = useState(initialValue);\n\n return [ flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false) ];\n};\n\nexport const useSwipeable = (showSidebar: () => void, hideSidebar: () => void) => {\n const swipeMenuIfNoModalExists = (callback: () => void) => (e: any) => {\n const swippedOnVisitsTable = (e.event.composedPath() as HTMLElement[]).some( // eslint-disable-line @typescript-eslint/no-unsafe-call\n ({ classList }) => classList?.contains('visits-table'),\n );\n\n if (swippedOnVisitsTable || document.querySelector('.modal')) {\n return;\n }\n\n callback();\n };\n\n return useReactSwipeable({\n delta: 40,\n onSwipedLeft: swipeMenuIfNoModalExists(hideSidebar),\n onSwipedRight: swipeMenuIfNoModalExists(showSidebar),\n });\n};\n\nexport const useQueryState = (paramName: string, initialState: T): [ T, (newValue: T) => void ] => {\n const [ value, setValue ] = useState(initialState);\n const setValueWithLocation = (value: T) => {\n const { location, history } = window;\n const query = parseQuery(location.search);\n\n query[paramName] = value;\n history.pushState(null, '', `${location.pathname}?${stringifyQuery(query)}`);\n setValue(value);\n };\n\n return [ value, setValueWithLocation ];\n};\n\nexport const useEffectExceptFirstTime = (callback: EffectCallback, deps: DependencyList): void => {\n const isFirstLoad = useRef(true);\n\n useEffect(() => {\n !isFirstLoad.current && callback();\n isFirstLoad.current = false;\n }, deps);\n};\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', withRouter);\n bottle.decorator('Home', connect([ 'servers' ], [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory(\n 'MenuLayout',\n MenuLayout,\n 'TagsList',\n 'ShortUrlsList',\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' ], [ '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","import { omit } from 'ramda';\nimport { 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 autoConnect?: boolean;\n}\n\nexport interface ReachableServer extends ServerWithId {\n version: SemVer;\n printableVersion: string;\n}\n\nexport interface NonReachableServer extends ServerWithId {\n serverNotReachable: true;\n}\n\nexport interface NotFoundServer {\n serverNotFound: true;\n}\n\nexport type RegularServer = ReachableServer | NonReachableServer;\n\nexport type SelectedServer = RegularServer | NotFoundServer | null;\n\nexport type ServersMap = Record;\n\nexport const hasServerData = (server: SelectedServer | ServerData): server is ServerData =>\n !!(server as ServerData)?.url && !!(server as ServerData)?.apiKey;\n\nexport const isServerWithId = (server: SelectedServer | ServerWithId): server is ServerWithId =>\n !!server?.hasOwnProperty('id');\n\nexport const isReachableServer = (server: SelectedServer): server is ReachableServer =>\n !!server?.hasOwnProperty('version');\n\nexport const isNotFoundServer = (server: SelectedServer): server is NotFoundServer =>\n !!server?.hasOwnProperty('serverNotFound');\n\nexport const getServerId = (server: SelectedServer) => isServerWithId(server) ? server.id : '';\n\nexport const serverWithIdToServerData = (server: ServerWithId): ServerData =>\n omit([ 'id', 'autoConnect' ], server);\n","const PREFIX = 'shlink';\nconst buildPath = (path: string) => `${PREFIX}.${path}`;\n\nexport default class LocalStorage {\n public constructor(private readonly localStorage: Storage) {}\n\n public readonly get = (key: string): T | undefined => {\n const item = this.localStorage.getItem(buildPath(key));\n\n return item ? JSON.parse(item) as T : undefined;\n };\n\n public readonly set = (key: string, value: any) => this.localStorage.setItem(buildPath(key), JSON.stringify(value));\n}\n","import { rangeOf } from '../utils';\nimport LocalStorage from './LocalStorage';\n\nconst HEX_COLOR_LENGTH = 6;\nconst { floor, random } = Math;\nconst letters = '0123456789ABCDEF';\nconst buildRandomColor = () => `#${rangeOf(HEX_COLOR_LENGTH, () => letters[floor(random() * letters.length)]).join('')}`;\nconst normalizeKey = (key: string) => key.toLowerCase().trim();\n\nexport default class ColorGenerator {\n private readonly colors: Record;\n\n public constructor(private readonly storage: LocalStorage) {\n this.colors = this.storage.get>('colors') ?? {};\n }\n\n public readonly getColorForKey = (key: string) => {\n const normalizedKey = normalizeKey(key);\n const color = this.colors[normalizedKey];\n\n // If a color has not been set yet, generate a random one and save it\n if (!color) {\n return this.setColorForKey(normalizedKey, buildRandomColor());\n }\n\n return color;\n };\n\n public readonly setColorForKey = (key: string, color: string) => {\n const normalizedKey = normalizeKey(key);\n\n this.colors[normalizedKey] = color;\n this.storage.set('colors', this.colors);\n\n return color;\n };\n}\n","import { pipe } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport { versionToPrintable, versionToSemVer } from '../utils/helpers/version';\nimport { isReachableServer } from '../servers/data';\nimport { ShlinkVersionsContainerProps } from './ShlinkVersionsContainer';\n\nconst SHLINK_WEB_CLIENT_VERSION = '%_VERSION_%';\nconst normalizeVersion = pipe(versionToSemVer(), versionToPrintable);\n\nexport interface ShlinkVersionsProps extends ShlinkVersionsContainerProps {\n clientVersion?: string;\n}\n\nconst VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => (\n \n {version}\n \n);\n\nconst ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIENT_VERSION }: ShlinkVersionsProps) => {\n const normalizedClientVersion = normalizeVersion(clientVersion);\n\n return (\n \n {isReachableServer(selectedServer) &&\n <>Server: - \n }\n Client: \n \n );\n};\n\nexport default ShlinkVersions;\n","import classNames from 'classnames';\nimport { isReachableServer, SelectedServer } from '../servers/data';\nimport ShlinkVersions from './ShlinkVersions';\nimport './ShlinkVersionsContainer.scss';\n\nexport interface ShlinkVersionsContainerProps {\n selectedServer: SelectedServer;\n}\n\nconst ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => {\n const classes = classNames('text-center', {\n 'shlink-versions-container--with-server': isReachableServer(selectedServer),\n });\n\n return (\n
\n \n
\n );\n};\n\nexport default ShlinkVersionsContainer;\n","import { isEmpty, isNil, pipe, range } from 'ramda';\nimport { SyntheticEvent } from 'react';\n\nexport const rangeOf = (size: number, mappingFn: (value: number) => T, startAt = 1): T[] =>\n range(startAt, size + 1).map(mappingFn);\n\nexport type Empty = null | undefined | '' | never[];\n\nexport const hasValue = (value: T | Empty): value is T => !isNil(value) && !isEmpty(value);\n\nexport const handleEventPreventingDefault = (handler: () => T) => pipe(\n (e: SyntheticEvent) => e.preventDefault(),\n handler,\n);\n\nexport type Nullable = {\n [P in keyof T]: T[P] | null\n};\n\ntype Optional = T | null | undefined;\n\nexport type OptionalString = Optional;\n\nexport type RecursivePartial = {\n [P in keyof T]?: RecursivePartial;\n};\n\nexport const nonEmptyValueOrNull = (value: T): T | null => isEmpty(value) ? null : value;\n\nexport const capitalize = (value: T): string => `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n","import { 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 { useEffect } from 'react';\nimport { isEmpty, values } from 'ramda';\nimport { Link, RouteChildrenProps } 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 extends RouteChildrenProps {\n servers: ServersMap;\n}\n\nconst Home = ({ servers, history }: HomeProps) => {\n const serversList = values(servers);\n const hasServers = !isEmpty(serversList);\n\n useEffect(() => {\n // Try to redirect to the first server marked as auto-connect\n const autoConnectServer = serversList.find(({ autoConnect }) => autoConnect);\n\n autoConnectServer && history.push(`/server/${autoConnectServer.id}`);\n }, []);\n\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n
\n

Welcome!

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

This application will help you manage your Shlink servers.

\n

\n \n Add a server\n \n

\n

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

\n
\n )}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Home;\n","import { FC, useEffect } from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport { faBars as burgerIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport classNames from 'classnames';\nimport { withSelectedServer } from '../servers/helpers/withSelectedServer';\nimport { useSwipeable, useToggle } from '../utils/helpers/hooks';\nimport { supportsDomainRedirects, supportsOrphanVisits } from '../utils/helpers/features';\nimport { isReachableServer } from '../servers/data';\nimport NotFound from './NotFound';\nimport { AsideMenuProps } from './AsideMenu';\nimport './MenuLayout.scss';\n\nconst MenuLayout = (\n TagsList: FC,\n ShortUrlsList: FC,\n AsideMenu: FC,\n CreateShortUrl: FC,\n ShortUrlVisits: FC,\n TagVisits: FC,\n OrphanVisits: FC,\n ServerError: FC,\n Overview: FC,\n EditShortUrl: FC,\n ManageDomains: FC,\n) => withSelectedServer(({ location, selectedServer }) => {\n const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle();\n\n useEffect(() => hideSidebar(), [ location ]);\n\n if (!isReachableServer(selectedServer)) {\n return ;\n }\n\n const addOrphanVisitsRoute = supportsOrphanVisits(selectedServer);\n const addManageDomainsRoute = supportsDomainRedirects(selectedServer);\n const burgerClasses = classNames('menu-layout__burger-icon', { 'menu-layout__burger-icon--active': sidebarVisible });\n const swipeableProps = useSwipeable(showSidebar, hideSidebar);\n\n return (\n <>\n \n\n
\n
\n \n
hideSidebar()}>\n
\n \n \n \n \n \n \n \n \n {addOrphanVisitsRoute && }\n \n {addManageDomainsRoute && }\n List short URLs}\n />\n \n
\n
\n
\n
\n \n );\n}, ServerError);\n\nexport default MenuLayout;\n","import {\n faList as listIcon,\n faLink as createIcon,\n faTags as tagsIcon,\n faPen as editIcon,\n faHome as overviewIcon,\n faGlobe as domainsIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC } from 'react';\nimport { NavLink, NavLinkProps } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { Location } from 'history';\nimport { DeleteServerButtonProps } from '../servers/DeleteServerButton';\nimport { isServerWithId, SelectedServer } from '../servers/data';\nimport { supportsDomainRedirects } from '../utils/helpers/features';\nimport './AsideMenu.scss';\n\nexport interface AsideMenuProps {\n selectedServer: SelectedServer;\n className?: string;\n showOnMobile?: boolean;\n}\n\ninterface AsideMenuItemProps extends NavLinkProps {\n to: string;\n}\n\nconst AsideMenuItem: FC = ({ children, to, className, ...rest }) => (\n \n {children}\n \n);\n\nconst AsideMenu = (DeleteServerButton: FC) => (\n { selectedServer, showOnMobile = false }: AsideMenuProps,\n) => {\n const hasId = isServerWithId(selectedServer);\n const serverId = hasId ? selectedServer.id : '';\n const addManageDomainsLink = supportsDomainRedirects(selectedServer);\n const asideClass = classNames('aside-menu', {\n 'aside-menu--hidden': !showOnMobile,\n });\n const shortUrlsIsActive = (_: null, location: Location) => location.pathname.match('/list-short-urls') !== null;\n const buildPath = (suffix: string) => `/server/${serverId}${suffix}`;\n\n return (\n \n );\n};\n\nexport default AsideMenu;\n","import { CardProps } from 'reactstrap/lib/Card';\nimport { Card, CardBody, CardHeader } from 'reactstrap';\nimport { ReactNode } from 'react';\n\ninterface SimpleCardProps extends Omit {\n title?: ReactNode;\n bodyClassName?: string;\n}\n\nexport const SimpleCard = ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => (\n \n {title && {title}}\n {children}\n \n);\n","import { isReachableServer, SelectedServer } from '../../servers/data';\nimport { versionMatch, Versions } from './version';\n\nconst serverMatchesVersions = (versions: Versions) => (selectedServer: SelectedServer): boolean =>\n isReachableServer(selectedServer) && versionMatch(selectedServer.version, versions);\n\nexport const supportsQrCodeSizeInQuery = serverMatchesVersions({ minVersion: '2.5.0' });\n\nexport const supportsShortUrlTitle = serverMatchesVersions({ minVersion: '2.6.0' });\n\nexport const supportsOrphanVisits = supportsShortUrlTitle;\n\nexport const supportsQrCodeMargin = supportsShortUrlTitle;\n\nexport const supportsTagsInPatch = supportsShortUrlTitle;\n\nexport const supportsBotVisits = serverMatchesVersions({ minVersion: '2.7.0' });\n\nexport const supportsCrawlableVisits = supportsBotVisits;\n\nexport const supportsQrErrorCorrection = serverMatchesVersions({ minVersion: '2.8.0' });\n\nexport const supportsDomainRedirects = supportsQrErrorCorrection;\n\nexport const supportsForwardQuery = serverMatchesVersions({ minVersion: '2.9.0' });\n\nexport const supportsDefaultDomainRedirectsEdition = serverMatchesVersions({ minVersion: '2.10.0' });\n","export const MAIN_COLOR = '#4696e5';\n\nexport const MAIN_COLOR_ALPHA = 'rgba(70, 150, 229, 0.4)';\n\nexport const HIGHLIGHTED_COLOR = '#f77f28';\n\nexport const HIGHLIGHTED_COLOR_ALPHA = 'rgba(247, 127, 40, 0.4)';\n\nexport const PRIMARY_LIGHT_COLOR = 'white';\n\nexport const PRIMARY_DARK_COLOR = '#161b22';\n\nexport type Theme = 'dark' | 'light';\n\nexport const changeThemeInMarkup = (theme: Theme) => {\n const html = document.getElementsByTagName('html');\n\n html?.[0]?.setAttribute('data-theme', theme);\n};\n\nexport const isDarkThemeEnabled = (): boolean => {\n const html = document.getElementsByTagName('html');\n\n return html?.[0]?.getAttribute('data-theme') === 'dark';\n};\n","import qs from 'qs';\n\nexport const parseQuery = (search: string) => qs.parse(search, { ignoreQueryPrefix: true }) as unknown as T;\n\nexport const stringifyQuery = (query: any): string => qs.stringify(query, { arrayFormat: 'brackets' });\n","import { 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 initialValue?: string;\n}\n\nconst SearchField = ({ onChange, className, large = true, noBorder = false, initialValue = '' }: SearchFieldProps) => {\n const [ searchTerm, setSearchTerm ] = useState(initialValue);\n\n const resetTimer = () => {\n timer && clearTimeout(timer);\n timer = null;\n };\n const searchTermChanged = (newSearchTerm: string, timeout = DEFAULT_SEARCH_INTERVAL) => {\n setSearchTerm(newSearchTerm);\n\n resetTimer();\n\n timer = setTimeout(() => {\n onChange(newSearchTerm);\n resetTimer();\n }, timeout);\n };\n\n return (\n
\n searchTermChanged(e.target.value)}\n />\n \n
\n \n );\n};\n\nexport default SearchField;\n","import { isEmpty, isNil, reject } from 'ramda';\nimport { AxiosInstance, AxiosResponse, Method } from 'axios';\nimport { 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 ShlinkDomainsResponse,\n ShlinkVisitsOverview,\n ShlinkEditDomainRedirects,\n ShlinkDomainRedirects,\n ShlinkShortUrlsListParams,\n ShlinkShortUrlsListNormalizedParams,\n} from '../types';\nimport { stringifyQuery } from '../../utils/helpers/query';\n\nconst buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';\nconst rejectNilProps = reject(isNil);\nconst normalizeOrderByInParams = (params: ShlinkShortUrlsListParams): ShlinkShortUrlsListNormalizedParams => {\n const { orderBy = {}, ...rest } = params;\n const [ firstKey ] = Object.keys(orderBy);\n const [ firstValue ] = Object.values(orderBy);\n\n return !firstValue ? rest : {\n ...rest,\n orderBy: `${firstKey}-${firstValue}`,\n };\n};\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: ShlinkShortUrlsListParams = {}): Promise =>\n this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', normalizeOrderByInParams(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);\n\n public readonly editDomainRedirects = async (\n domainRedirects: ShlinkEditDomainRedirects,\n ): Promise =>\n this.performRequest('/domains/redirects', 'PATCH', {}, domainRedirects).then(({ data }) => data);\n\n private readonly performRequest = async (url: string, method: Method = 'GET', query = {}, body = {}): Promise> => {\n try {\n return await this.axios({\n method,\n url: `${buildShlinkBaseUrl(this.baseUrl, this.apiVersion)}${url}`,\n headers: { 'X-Api-Key': this.apiKey },\n params: rejectNilProps(query),\n data: body,\n paramsSerializer: stringifyQuery,\n });\n } catch (e: any) {\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, 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, isBefore, isEqual, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';\nimport { OptionalString } from '../utils';\n\nexport type DateOrString = Date | string;\n\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\nexport const parseISO = (date: DateOrString): Date => isDateObject(date) ? date : stdParseISO(date);\n\nexport const isBetween = (date: DateOrString, start?: DateOrString, end?: DateOrString): boolean => {\n try {\n return isWithinInterval(parseISO(date), { start: parseISO(start ?? date), end: parseISO(end ?? date) });\n } catch (e) {\n return false;\n }\n};\n\nexport const isBeforeOrEqual = (date: Date | number, dateToCompare: Date | number) =>\n isEqual(date, dateToCompare) || isBefore(date, dateToCompare);\n","import { subDays, startOfDay, endOfDay } from 'date-fns';\nimport { cond, filter, isEmpty, T } from 'ramda';\nimport { DateOrString, formatInternational, isBeforeOrEqual, parseISO } from '../../helpers/date';\n\nexport interface DateRange {\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport type DateInterval = 'all' | '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 =>\n 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 all: undefined,\n};\n\nexport const DATE_INTERVALS = Object.keys(INTERVAL_TO_STRING_MAP).filter((value) => value !== 'all') 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 || range === 'all') {\n return undefined;\n }\n\n if (!rangeIsInterval(range)) {\n return dateRangeToString(range);\n }\n\n return INTERVAL_TO_STRING_MAP[range];\n};\n\nconst startOfDaysAgo = (daysAgo: number) => startOfDay(subDays(new Date(), daysAgo));\nconst endingToday = (startDate: Date): DateRange => ({ startDate, endDate: endOfDay(new Date()) });\n\nexport const intervalToDateRange = (dateInterval?: DateInterval): DateRange => {\n if (!dateInterval || dateInterval === 'all') {\n return {};\n }\n\n switch (dateInterval) {\n case 'today':\n return endingToday(startOfDay(new Date()));\n case 'yesterday':\n return { startDate: startOfDaysAgo(1), endDate: endOfDay(subDays(new Date(), 1)) };\n case 'last7Days':\n return endingToday(startOfDaysAgo(7));\n case 'last30Days':\n return endingToday(startOfDaysAgo(30));\n case 'last90Days':\n return endingToday(startOfDaysAgo(90));\n case 'last180Days':\n return endingToday(startOfDaysAgo(180));\n case 'last365Days':\n return endingToday(startOfDaysAgo(365));\n }\n\n return {};\n};\n\nexport const dateToMatchingInterval = (date: DateOrString): DateInterval => {\n const theDate: Date = parseISO(date);\n\n return cond([\n [ () => isBeforeOrEqual(startOfDay(new Date()), theDate), () => 'today' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(1), theDate), () => 'yesterday' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(7), theDate), () => 'last7Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(30), theDate), () => 'last30Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(90), theDate), () => 'last90Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(180), theDate), () => 'last180Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(365), theDate), () => 'last365Days' ],\n [ T, () => 'all' ],\n ])();\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 allText: string;\n onChange: (interval: DateInterval) => void;\n}\n\nexport const DateIntervalDropdownItems: FC = ({ active, allText, onChange }) => (\n <>\n onChange('all')}>\n {allText}\n \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 { useEffectExceptFirstTime } from '../helpers/hooks';\nimport {\n DateInterval,\n DateRange,\n rangeOrIntervalToString,\n intervalToDateRange,\n rangeIsInterval,\n dateRangeIsEmpty,\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 updatable?: boolean;\n}\n\nexport const DateRangeSelector = (\n { onDatesChange, initialDateRange, defaultText, disabled, updatable = false }: DateRangeSelectorProps,\n) => {\n const initialIntervalIsRange = rangeIsInterval(initialDateRange);\n const [ activeInterval, setActiveInterval ] = useState(initialIntervalIsRange ? initialDateRange : undefined);\n const [ activeDateRange, setActiveDateRange ] = useState(initialIntervalIsRange ? undefined : initialDateRange);\n\n const updateDateRange = (dateRange: DateRange) => {\n setActiveInterval(dateRangeIsEmpty(dateRange) ? 'all' : 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 updatable && useEffectExceptFirstTime(() => {\n if (rangeIsInterval(initialDateRange)) {\n updateInterval(initialDateRange);\n } else if (initialDateRange) {\n updateDateRange(initialDateRange);\n }\n }, [ initialDateRange ]);\n\n return (\n \n \n \n Custom:\n \n updateDateRange({ ...activeDateRange, startDate })}\n onEndDateChange={(endDate) => updateDateRange({ ...activeDateRange, endDate })}\n />\n \n \n );\n};\n","import { RouteChildrenProps } from 'react-router-dom';\nimport { useMemo } from 'react';\nimport { isEmpty } from 'ramda';\nimport { parseQuery, stringifyQuery } from '../../utils/helpers/query';\n\ntype ServerIdRouteProps = RouteChildrenProps<{ serverId: string }>;\ntype ToFirstPage = (extra: Partial) => void;\n\nexport interface ShortUrlListRouteParams {\n page: string;\n serverId: string;\n}\n\ninterface ShortUrlsQuery {\n tags?: string;\n search?: string;\n startDate?: string;\n endDate?: string;\n}\n\nexport const useShortUrlsQuery = ({ history, location, match }: ServerIdRouteProps): [ShortUrlsQuery, ToFirstPage] => {\n const query = useMemo(() => parseQuery(location.search), [ location ]);\n const toFirstPageWithExtra = (extra: Partial) => {\n const evolvedQuery = stringifyQuery({ ...query, ...extra });\n const queryString = isEmpty(evolvedQuery) ? '' : `?${evolvedQuery}`;\n\n history.push(`/server/${match?.params.serverId}/list-short-urls/1${queryString}`);\n };\n\n return [ query, toFirstPageWithExtra ];\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 { RouteChildrenProps } from 'react-router-dom';\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 { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\nimport './SearchBar.scss';\n\nexport type SearchBarProps = RouteChildrenProps;\n\nconst dateOrNull = (date?: string) => date ? parseISO(date) : null;\n\nconst SearchBar = (colorGenerator: ColorGenerator) => (props: SearchBarProps) => {\n const [{ search, tags, startDate, endDate }, toFirstPage ] = useShortUrlsQuery(props);\n const selectedTags = tags?.split(',') ?? [];\n const setDates = pipe(\n ({ startDate, endDate }: DateRange) => ({\n startDate: formatIsoDate(startDate) ?? undefined,\n endDate: formatIsoDate(endDate) ?? undefined,\n }),\n toFirstPage,\n );\n const setSearch = pipe(\n (searchTerm: string) => isEmpty(searchTerm) ? undefined : searchTerm,\n (search) => toFirstPage({ search }),\n );\n const removeTag = pipe(\n (tag: string) => selectedTags.filter((selectedTag) => selectedTag !== tag),\n (tagsList) => tagsList.length === 0 ? undefined : tagsList.join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n return (\n
\n \n\n
\n
\n
\n \n
\n
\n
\n\n {selectedTags.length > 0 && (\n

\n \n  \n {selectedTags.map((tag) =>\n removeTag(tag)} />)}\n

\n )}\n
\n );\n};\n\nexport default SearchBar;\n","export type OrderDir = 'ASC' | 'DESC' | undefined;\n\nexport interface Order {\n field?: Fields;\n dir?: OrderDir;\n}\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 sortList = (list: List[], { field, dir }: Order>) => !field || !dir\n ? list\n : list.sort((a, b) => {\n const greaterThan = dir === 'ASC' ? 1 : -1;\n const smallerThan = dir === 'ASC' ? -1 : 1;\n\n return a[field] > b[field] ? greaterThan : smallerThan;\n });\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, Order, OrderDir } from './helpers/ordering';\nimport './SortingDropdown.scss';\n\nexport interface SortingDropdownProps {\n items: Record;\n order: Order;\n onChange: (orderField?: T, orderDir?: OrderDir) => void;\n isButton?: boolean;\n right?: boolean;\n}\n\nexport default function SortingDropdown(\n { items, order, onChange, isButton = true, right = false }: SortingDropdownProps,\n) {\n const handleItemClick = (fieldKey: T) => () => {\n const newOrderDir = determineOrderDir(fieldKey, order.field, order.dir);\n\n onChange(newOrderDir ? fieldKey : undefined, newOrderDir);\n };\n\n return (\n \n \n {!isButton && <>Order by}\n {isButton && !order.field && <>Order by...}\n {isButton && order.field && `Order by: \"${items[order.field]}\" - \"${order.dir ?? 'DESC'}\"`}\n \n \n {toPairs(items).map(([ fieldKey, fieldValue ]) => (\n \n {fieldValue}\n {order.field === fieldKey && (\n \n )}\n \n ))}\n \n onChange()}>\n Clear selection\n \n \n \n );\n}\n","import { FC, useEffect } from 'react';\nimport { pipe } from 'ramda';\nimport { CreateVisit } from '../../visits/types';\nimport { MercureInfo } from '../reducers/mercureInfo';\nimport { bindToMercureTopic } from './index';\n\nexport interface MercureBoundProps {\n createNewVisits: (createdVisits: CreateVisit[]) => void;\n loadMercureInfo: () => void;\n mercureInfo: MercureInfo;\n}\n\nexport function boundToMercureHub(\n WrappedComponent: FC,\n getTopicsForProps: (props: T) => string[],\n) {\n const pendingUpdates = new Set();\n\n return (props: MercureBoundProps & T) => {\n const { createNewVisits, loadMercureInfo, mercureInfo } = props;\n const { interval } = mercureInfo;\n\n useEffect(() => {\n const onMessage = (visit: CreateVisit) => interval ? pendingUpdates.add(visit) : createNewVisits([ visit ]);\n const closeEventSource = bindToMercureTopic(mercureInfo, getTopicsForProps(props), onMessage, loadMercureInfo);\n\n if (!interval) {\n return closeEventSource;\n }\n\n const timer = setInterval(() => {\n createNewVisits([ ...pendingUpdates ]);\n pendingUpdates.clear();\n }, interval * 1000 * 60);\n\n return pipe(() => clearInterval(timer), () => closeEventSource?.());\n }, [ mercureInfo ]);\n\n return ;\n };\n}\n","import { EventSourcePolyfill as EventSource } from 'event-source-polyfill';\nimport { MercureInfo } from '../reducers/mercureInfo';\n\nexport const bindToMercureTopic = (mercureInfo: MercureInfo, topics: string[], onMessage: (message: T) => void, onTokenExpired: () => void) => { // eslint-disable-line max-len\n const { mercureHubUrl, token, loading, error } = mercureInfo;\n\n if (loading || error || !mercureHubUrl) {\n return undefined;\n }\n\n const onEventSourceMessage = ({ data }: { data: string }) => onMessage(JSON.parse(data) as T);\n const onEventSourceError = ({ status }: { status: number }) => status === 401 && onTokenExpired();\n\n const subscriptions = topics.map((topic) => {\n const hubUrl = new URL(mercureHubUrl);\n\n hubUrl.searchParams.append('topic', topic);\n const es = new EventSource(hubUrl, {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n });\n\n es.onmessage = onEventSourceMessage;\n es.onerror = onEventSourceError;\n\n return es;\n });\n\n return () => subscriptions.forEach((es) => es.close());\n};\n","export class Topics {\n public static readonly visits = 'https://shlink.io/new-visit';\n\n public static readonly orphanVisits = 'https://shlink.io/new-orphan-visit';\n\n public static readonly shortUrlVisits = (shortCode: string) => `https://shlink.io/new-visit/${shortCode}`;\n}\n","import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCaretDown as caretDownIcon, faCaretUp as caretUpIcon } from '@fortawesome/free-solid-svg-icons';\nimport { Order } from '../helpers/ordering';\n\ninterface TableOrderIconProps {\n currentOrder: Order;\n field: T;\n className?: string;\n}\n\nexport function TableOrderIcon(\n { currentOrder, field, className = 'ml-1' }: TableOrderIconProps,\n) {\n if (!currentOrder.dir || currentOrder.field !== field) {\n return null;\n }\n\n return ;\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, useRef } 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 { prettify } from '../utils/helpers/numbers';\nimport LineChartCard from './charts/LineChartCard';\nimport VisitsTable from './VisitsTable';\nimport { NormalizedOrphanVisit, NormalizedVisit, VisitsFilter, VisitsInfo, VisitsParams } from './types';\nimport OpenMapModalBtn from './helpers/OpenMapModalBtn';\nimport { normalizeVisits, processStatsFromVisits } from './services/VisitsParser';\nimport { VisitsFilterDropdown } from './helpers/VisitsFilterDropdown';\nimport { HighlightableProps, highlightedVisitsToStats } from './types/helpers';\nimport { DoughnutChartCard } from './charts/DoughnutChartCard';\nimport { SortableBarChartCard } from './charts/SortableBarChartCard';\nimport './VisitsStats.scss';\n\nexport interface VisitsStatsProps {\n getVisits: (params: VisitsParams, doFallbackRange?: boolean) => 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 { visits, loading, loadingLarge, error, errorData, progress, fallbackInterval } = visitsInfo;\n const [ initialInterval, setInitialInterval ] = useState(\n fallbackInterval ?? settings.visits?.defaultInterval ?? 'last30Days',\n );\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 const isFirstLoad = useRef(true);\n\n const buildSectionUrl = (subPath?: string) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return !subPath ? `${baseUrl}${query}` : `${baseUrl}${subPath}${query}`;\n };\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 }, isFirstLoad.current);\n isFirstLoad.current = false;\n }, [ dateRange, visitsFilter ]);\n useEffect(() => {\n fallbackInterval && setInitialInterval(fallbackInterval);\n }, [ fallbackInterval ]);\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 && <>({prettify(highlightedVisits.length)})}\n \n exportCsv(normalizedVisits)}\n >\n Export ({prettify(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: any) {\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: any) {\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: any) {\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 { ShlinkShortUrlsListParams, 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: ShlinkShortUrlsListParams = {},\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/helpers/ordering';\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 type OrderBy = Partial>;\n\nexport interface ShortUrlsListParams {\n page?: string;\n itemsPerPage?: number;\n orderBy?: OrderBy;\n}\n\nconst initialState: ShortUrlsListParams = {\n page: '1',\n orderBy: { dateCreated: 'DESC' },\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS]: (state, { params }) => ({ ...state, ...params }),\n [RESET_SHORT_URL_PARAMS]: () => initialState,\n}, initialState);\n\nexport const resetShortUrlParams = buildActionCreator(RESET_SHORT_URL_PARAMS);\n","const TEN_ROUNDING_NUMBER = 10;\nconst { ceil } = Math;\nconst formatter = new Intl.NumberFormat('en-US');\n\nexport const prettify = (number: number | string) => formatter.format(Number(number));\n\nexport const roundTen = (number: number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;\n","import { max, min, range } from 'ramda';\nimport { prettify } from './numbers';\n\nconst DELTA = 2;\n\nexport const ELLIPSIS = '...';\n\ntype Ellipsis = typeof ELLIPSIS;\n\nexport type NumberOrEllipsis = number | Ellipsis;\n\nexport const progressivePagination = (currentPage: number, pageCount: number): NumberOrEllipsis[] => {\n const pages: NumberOrEllipsis[] = range(\n max(DELTA, currentPage - DELTA),\n min(pageCount - 1, currentPage + DELTA) + 1,\n );\n\n if (currentPage - DELTA > DELTA) {\n pages.unshift(ELLIPSIS);\n }\n if (currentPage + DELTA < pageCount - 1) {\n pages.push(ELLIPSIS);\n }\n\n pages.unshift(1);\n pages.push(pageCount);\n\n return pages;\n};\n\nexport const pageIsEllipsis = (pageNumber: NumberOrEllipsis): pageNumber is Ellipsis => pageNumber === ELLIPSIS;\n\nexport const prettifyPageNumber = (pageNumber: NumberOrEllipsis): string =>\n pageIsEllipsis(pageNumber) ? pageNumber : prettify(pageNumber);\n\nexport const keyForPage = (pageNumber: NumberOrEllipsis, index: number) => !pageIsEllipsis(pageNumber) ? `${pageNumber}` : `${pageNumber}_${index}`;\n","import { Link } from 'react-router-dom';\nimport { Pagination, PaginationItem, PaginationLink } from 'reactstrap';\nimport {\n pageIsEllipsis,\n keyForPage,\n progressivePagination,\n prettifyPageNumber,\n NumberOrEllipsis,\n} from '../utils/helpers/pagination';\nimport { ShlinkPaginator } from '../api/types';\n\ninterface PaginatorProps {\n paginator?: ShlinkPaginator;\n serverId: string;\n currentQueryString?: string;\n}\n\nconst Paginator = ({ paginator, serverId, currentQueryString = '' }: PaginatorProps) => {\n const { currentPage = 0, pagesCount = 0 } = paginator ?? {};\n const urlForPage = (pageNumber: NumberOrEllipsis) =>\n `/server/${serverId}/list-short-urls/${pageNumber}${currentQueryString}`;\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 { head, keys, pipe, values } from 'ramda';\nimport { FC, useEffect, useMemo, useState } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport { Card } from 'reactstrap';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { determineOrderDir, Order, OrderDir } from '../utils/helpers/ordering';\nimport { getServerId, SelectedServer } from '../servers/data';\nimport { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';\nimport { Topics } from '../mercure/helpers/Topics';\nimport { TableOrderIcon } from '../utils/table/TableOrderIcon';\nimport { ShlinkShortUrlsListParams } from '../api/types';\nimport { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';\nimport { OrderableFields, ShortUrlsListParams, SORTABLE_FIELDS } from './reducers/shortUrlsListParams';\nimport { ShortUrlsTableProps } from './ShortUrlsTable';\nimport Paginator from './Paginator';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\n\ninterface ShortUrlsListProps extends RouteComponentProps {\n selectedServer: SelectedServer;\n shortUrlsList: ShortUrlsListState;\n listShortUrls: (params: ShortUrlsListParams) => void;\n shortUrlsListParams: ShortUrlsListParams;\n resetShortUrlParams: () => void;\n}\n\ntype ShortUrlsOrder = Order;\n\nconst ShortUrlsList = (ShortUrlsTable: FC, SearchBar: FC) => boundToMercureHub(({\n listShortUrls,\n resetShortUrlParams,\n shortUrlsListParams,\n match,\n location,\n history,\n shortUrlsList,\n selectedServer,\n}: ShortUrlsListProps) => {\n const serverId = getServerId(selectedServer);\n const { orderBy } = shortUrlsListParams;\n const [ order, setOrder ] = useState({\n field: orderBy && (head(keys(orderBy)) as OrderableFields),\n dir: orderBy && head(values(orderBy)),\n });\n const [{ tags, search, startDate, endDate }, toFirstPage ] = useShortUrlsQuery({ history, match, location });\n const selectedTags = useMemo(() => tags?.split(',') ?? [], [ tags ]);\n const { pagination } = shortUrlsList?.shortUrls ?? {};\n\n const refreshList = (extraParams: ShlinkShortUrlsListParams) => listShortUrls(\n { ...shortUrlsListParams, ...extraParams },\n );\n const handleOrderBy = (field?: OrderableFields, dir?: OrderDir) => {\n setOrder({ field, dir });\n refreshList({ orderBy: field ? { [field]: dir } : undefined });\n };\n const orderByColumn = (field: OrderableFields) => () =>\n handleOrderBy(field, determineOrderDir(field, order.field, order.dir));\n const renderOrderIcon = (field: OrderableFields) => ;\n const addTag = pipe(\n (newTag: string) => [ ...new Set([ ...selectedTags, newTag ]) ].join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n useEffect(() => resetShortUrlParams, []);\n useEffect(() => {\n refreshList(\n { page: match.params.page, searchTerm: search, tags: selectedTags, itemsPerPage: undefined, startDate, endDate },\n );\n }, [ match.params.page, search, selectedTags, startDate, endDate ]);\n\n return (\n <>\n
\n
\n \n
\n \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
\n \n \n {tagFilteringModeHint(shortUrlCreation.tagFilteringMode)}\n \n \n \n );\n};\n","import { FC } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSun, faMoon } from '@fortawesome/free-solid-svg-icons';\nimport { FormGroup } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport ToggleSwitch from '../utils/ToggleSwitch';\nimport { changeThemeInMarkup, Theme } from '../utils/theme';\nimport { TagsModeDropdown } from '../tags/TagsModeDropdown';\nimport { capitalize } from '../utils/utils';\nimport { Settings, UiSettings } from './reducers/settings';\nimport './UserInterface.scss';\n\ninterface UserInterfaceProps {\n settings: Settings;\n setUiSettings: (settings: UiSettings) => void;\n}\n\nexport const UserInterface: FC = ({ settings: { ui }, setUiSettings }) => (\n \n \n \n {\n const theme: Theme = useDarkTheme ? 'dark' : 'light';\n\n setUiSettings({ ...ui, theme });\n changeThemeInMarkup(theme);\n }}\n >\n Use dark theme.\n \n \n \n \n capitalize(tagsMode)}\n onChange={(tagsMode) => setUiSettings({ ...ui ?? { theme: 'light' }, tagsMode })}\n />\n Tags will be displayed as {ui?.tagsMode ?? 'cards'}.\n \n \n);\n","import { FC } from 'react';\nimport { DropdownBtn } from '../DropdownBtn';\nimport { rangeOrIntervalToString } from './types';\nimport { DateIntervalDropdownItems, DateIntervalDropdownProps } from './DateIntervalDropdownItems';\n\nexport const DateIntervalSelector: FC = ({ onChange, active, allText }) => (\n \n \n \n);\n","import { FormGroup } from 'reactstrap';\nimport { FC } from 'react';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { DateIntervalSelector } from '../utils/dates/DateIntervalSelector';\nimport { Settings, VisitsSettings } from './reducers/settings';\n\ninterface VisitsProps {\n settings: Settings;\n setVisitsSettings: (settings: VisitsSettings) => void;\n}\n\nexport const Visits: FC = ({ settings, setVisitsSettings }) => (\n \n \n \n setVisitsSettings({ defaultInterval })}\n />\n \n \n);\n","import Bottle from 'bottlejs';\nimport RealTimeUpdates from '../RealTimeUpdates';\nimport Settings from '../Settings';\nimport {\n setRealTimeUpdatesInterval,\n setShortUrlCreationSettings,\n setUiSettings,\n setVisitsSettings,\n toggleRealTimeUpdates,\n} from '../reducers/settings';\nimport { ConnectDecorator } from '../../container/types';\nimport { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServer';\nimport { ShortUrlCreation } from '../ShortUrlCreation';\nimport { UserInterface } from '../UserInterface';\nimport { Visits } from '../Visits';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('Settings', Settings, 'RealTimeUpdates', 'ShortUrlCreation', 'UserInterface', 'Visits');\n bottle.decorator('Settings', withoutSelectedServer);\n bottle.decorator('Settings', connect(null, [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory('RealTimeUpdates', () => RealTimeUpdates);\n bottle.decorator(\n 'RealTimeUpdates',\n connect([ 'settings' ], [ 'toggleRealTimeUpdates', 'setRealTimeUpdatesInterval' ]),\n );\n\n bottle.serviceFactory('ShortUrlCreation', () => ShortUrlCreation);\n bottle.decorator('ShortUrlCreation', connect([ 'settings' ], [ 'setShortUrlCreationSettings' ]));\n\n bottle.serviceFactory('UserInterface', () => UserInterface);\n bottle.decorator('UserInterface', connect([ 'settings' ], [ 'setUiSettings' ]));\n\n bottle.serviceFactory('Visits', () => Visits);\n bottle.decorator('Visits', connect([ 'settings' ], [ 'setVisitsSettings' ]));\n\n // Actions\n bottle.serviceFactory('toggleRealTimeUpdates', () => toggleRealTimeUpdates);\n bottle.serviceFactory('setRealTimeUpdatesInterval', () => setRealTimeUpdatesInterval);\n bottle.serviceFactory('setShortUrlCreationSettings', () => setShortUrlCreationSettings);\n bottle.serviceFactory('setUiSettings', () => setUiSettings);\n bottle.serviceFactory('setVisitsSettings', () => setVisitsSettings);\n};\n\nexport default provideServices;\n","import { Action, Dispatch } from 'redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ShlinkDomainRedirects } from '../../api/types';\nimport { GetState } from '../../container/types';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { parseApiError } from '../../api/utils';\n\n/* eslint-disable padding-line-between-statements */\nexport const EDIT_DOMAIN_REDIRECTS_START = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START';\nexport const EDIT_DOMAIN_REDIRECTS_ERROR = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR';\nexport const EDIT_DOMAIN_REDIRECTS = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface EditDomainRedirectsAction extends Action {\n domain: string;\n redirects: ShlinkDomainRedirects;\n}\n\nexport const editDomainRedirects = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n domain: string,\n domainRedirects: Partial,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_START });\n const { editDomainRedirects } = buildShlinkApiClient(getState);\n\n try {\n const redirects = await editDomainRedirects({ domain, ...domainRedirects });\n\n dispatch({ type: EDIT_DOMAIN_REDIRECTS, domain, redirects });\n } catch (e: any) {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_ERROR, errorData: parseApiError(e) });\n }\n};\n","import { Action, Dispatch } from 'redux';\nimport { ProblemDetailsError, ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { GetState } from '../../container/types';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { EDIT_DOMAIN_REDIRECTS, EditDomainRedirectsAction } from './domainRedirects';\n\n/* eslint-disable padding-line-between-statements */\nexport const LIST_DOMAINS_START = 'shlink/domainsList/LIST_DOMAINS_START';\nexport const LIST_DOMAINS_ERROR = 'shlink/domainsList/LIST_DOMAINS_ERROR';\nexport const LIST_DOMAINS = 'shlink/domainsList/LIST_DOMAINS';\nexport const FILTER_DOMAINS = 'shlink/domainsList/FILTER_DOMAINS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface DomainsList {\n domains: ShlinkDomain[];\n filteredDomains: ShlinkDomain[];\n defaultRedirects?: ShlinkDomainRedirects;\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ListDomainsAction extends Action {\n domains: ShlinkDomain[];\n defaultRedirects?: ShlinkDomainRedirects;\n}\n\ninterface FilterDomainsAction extends Action {\n searchTerm: string;\n}\n\nconst initialState: DomainsList = {\n domains: [],\n filteredDomains: [],\n loading: false,\n error: false,\n};\n\nexport type DomainsCombinedAction = ListDomainsAction\n& ApiErrorAction\n& FilterDomainsAction\n& EditDomainRedirectsAction;\n\nexport const replaceRedirectsOnDomain = (domain: string, redirects: ShlinkDomainRedirects) =>\n (d: ShlinkDomain): ShlinkDomain => d.domain !== domain ? d : { ...d, redirects };\n\nexport default buildReducer({\n [LIST_DOMAINS_START]: () => ({ ...initialState, loading: true }),\n [LIST_DOMAINS_ERROR]: ({ errorData }) => ({ ...initialState, error: true, errorData }),\n [LIST_DOMAINS]: (_, { domains, defaultRedirects }) =>\n ({ ...initialState, domains, filteredDomains: domains, defaultRedirects }),\n [FILTER_DOMAINS]: (state, { searchTerm }) => ({\n ...state,\n filteredDomains: state.domains.filter(({ domain }) => domain.toLowerCase().match(searchTerm)),\n }),\n [EDIT_DOMAIN_REDIRECTS]: (state, { domain, redirects }) => ({\n ...state,\n domains: state.domains.map(replaceRedirectsOnDomain(domain, redirects)),\n filteredDomains: state.filteredDomains.map(replaceRedirectsOnDomain(domain, redirects)),\n }),\n}, initialState);\n\nexport const listDomains = (buildShlinkApiClient: ShlinkApiClientBuilder) => () => async (\n dispatch: Dispatch,\n getState: GetState,\n) => {\n dispatch({ type: LIST_DOMAINS_START });\n const { listDomains } = buildShlinkApiClient(getState);\n\n try {\n const { data: domains, defaultRedirects } = await listDomains();\n\n dispatch({ type: LIST_DOMAINS, domains, defaultRedirects });\n } catch (e: any) {\n dispatch({ type: LIST_DOMAINS_ERROR, errorData: parseApiError(e) });\n }\n};\n\nexport const filterDomains = (searchTerm: string): FilterDomainsAction => ({ type: FILTER_DOMAINS, searchTerm });\n","import { useEffect } from 'react';\nimport { Button, DropdownItem, Input, InputGroup, InputGroupAddon, UncontrolledTooltip } from 'reactstrap';\nimport { InputProps } from 'reactstrap/lib/Input';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faUndo } from '@fortawesome/free-solid-svg-icons';\nimport { isEmpty, pipe } from 'ramda';\nimport { DropdownBtn } from '../utils/DropdownBtn';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { DomainsList } from './reducers/domainsList';\nimport './DomainSelector.scss';\n\nexport interface DomainSelectorProps extends Omit {\n value?: string;\n onChange: (domain: string) => void;\n}\n\ninterface DomainSelectorConnectProps extends DomainSelectorProps {\n listDomains: Function;\n domainsList: DomainsList;\n}\n\nexport const DomainSelector = ({ listDomains, value, domainsList, onChange }: DomainSelectorConnectProps) => {\n const [ inputDisplayed,, showInput, hideInput ] = useToggle();\n const { domains } = domainsList;\n const valueIsEmpty = isEmpty(value);\n const unselectDomain = () => onChange('');\n\n useEffect(() => {\n listDomains();\n }, []);\n\n return inputDisplayed ? (\n \n onChange(e.target.value)}\n />\n \n \n \n \n \n Existing domains\n \n \n \n ) : (\n \n {domains.map(({ domain, isDefault }) => (\n onChange(domain)}\n >\n {domain}\n {isDefault && default}\n \n ))}\n \n \n New domain\n \n \n );\n};\n","import { FC, useState } from 'react';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { FormGroupContainer, FormGroupContainerProps } from '../../utils/FormGroupContainer';\nimport { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../utils/utils';\nimport { InfoTooltip } from '../../utils/InfoTooltip';\n\ninterface EditDomainRedirectsModalProps {\n domain: ShlinkDomain;\n isOpen: boolean;\n toggle: () => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n}\n\nconst FormGroup: FC = ({ isLast, ...rest }) => (\n \n);\n\nexport const EditDomainRedirectsModal: FC = (\n { isOpen, toggle, domain, editDomainRedirects },\n) => {\n const [ baseUrlRedirect, setBaseUrlRedirect ] = useState(domain.redirects?.baseUrlRedirect ?? '');\n const [ regular404Redirect, setRegular404Redirect ] = useState(domain.redirects?.regular404Redirect ?? '');\n const [ invalidShortUrlRedirect, setInvalidShortUrlRedirect ] = useState(\n domain.redirects?.invalidShortUrlRedirect ?? '',\n );\n const handleSubmit = handleEventPreventingDefault(async () => editDomainRedirects(domain.domain, {\n baseUrlRedirect: nonEmptyValueOrNull(baseUrlRedirect),\n regular404Redirect: nonEmptyValueOrNull(regular404Redirect),\n invalidShortUrlRedirect: nonEmptyValueOrNull(invalidShortUrlRedirect),\n }).then(toggle));\n\n return (\n \n
\n Edit redirects for {domain.domain}\n \n \n \n Visitors accessing the base url, as in https://{domain.domain}/, will be redirected to this URL.\n \n Base URL\n \n \n \n Visitors accessing a url not matching a short URL pattern, as in https://{domain.domain}/???/[...],\n will be redirected to this URL.\n \n Regular 404\n \n \n \n Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be\n redirected to this URL.\n \n Invalid short URL\n \n \n \n \n \n \n
\n
\n );\n};\n","import { FC } from 'react';\nimport { Button, UncontrolledTooltip } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n faBan as forbiddenIcon,\n faCheck as defaultDomainIcon,\n faEdit as editIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../api/types';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { OptionalString } from '../utils/utils';\nimport { SelectedServer } from '../servers/data';\nimport { supportsDefaultDomainRedirectsEdition } from '../utils/helpers/features';\nimport { EditDomainRedirectsModal } from './helpers/EditDomainRedirectsModal';\n\ninterface DomainRowProps {\n domain: ShlinkDomain;\n defaultRedirects?: ShlinkDomainRedirects;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n selectedServer: SelectedServer;\n}\n\nconst Nr: FC<{ fallback: OptionalString }> = ({ fallback }) => (\n \n {!fallback && No redirect}\n {fallback && <>{fallback} (as fallback)}\n \n);\nconst DefaultDomain: FC = () => (\n <>\n \n Default domain\n \n);\n\nexport const DomainRow: FC = ({ domain, editDomainRedirects, defaultRedirects, selectedServer }) => {\n const [ isOpen, toggle ] = useToggle();\n const { domain: authority, isDefault, redirects } = domain;\n const canEditDomain = !isDefault || supportsDefaultDomainRedirectsEdition(selectedServer);\n\n return (\n \n {isDefault ? : ''}\n {authority}\n \n {redirects?.baseUrlRedirect ?? }\n \n \n {redirects?.regular404Redirect ?? }\n \n \n {redirects?.invalidShortUrlRedirect ?? }\n \n \n \n \n \n {!canEditDomain && (\n \n Redirects for default domain cannot be edited here.\n
\n Use config options or env vars directly on the server.\n
\n )}\n \n \n \n );\n};\n","import { FC, useEffect } from 'react';\nimport Message from '../utils/Message';\nimport { Result } from '../utils/Result';\nimport { ShlinkApiError } from '../api/ShlinkApiError';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport SearchField from '../utils/SearchField';\nimport { ShlinkDomainRedirects } from '../api/types';\nimport { SelectedServer } from '../servers/data';\nimport { DomainsList } from './reducers/domainsList';\nimport { DomainRow } from './DomainRow';\n\ninterface ManageDomainsProps {\n listDomains: Function;\n filterDomains: (searchTerm: string) => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n domainsList: DomainsList;\n selectedServer: SelectedServer;\n}\n\nconst headers = [ '', 'Domain', 'Base path redirect', 'Regular 404 redirect', 'Invalid short URL redirect', '' ];\n\nexport const ManageDomains: FC = (\n { listDomains, domainsList, filterDomains, editDomainRedirects, selectedServer },\n) => {\n const { filteredDomains: domains, defaultRedirects, loading, error, errorData } = domainsList;\n const resolvedDefaultRedirects = defaultRedirects ?? domains.find(({ isDefault }) => isDefault)?.redirects;\n\n useEffect(() => {\n listDomains();\n }, []);\n\n if (loading) {\n return ;\n }\n\n const renderContent = () => {\n if (error) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n {headers.map((column, index) => )}\n \n \n {domains.length < 1 && }\n {domains.map((domain) => (\n \n ))}\n \n
{column}
No results found
\n
\n );\n };\n\n return (\n <>\n \n {renderContent()}\n \n );\n};\n","import Bottle from 'bottlejs';\nimport { ConnectDecorator } from '../../container/types';\nimport { filterDomains, listDomains } from '../reducers/domainsList';\nimport { DomainSelector } from '../DomainSelector';\nimport { ManageDomains } from '../ManageDomains';\nimport { editDomainRedirects } from '../reducers/domainRedirects';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('DomainSelector', () => DomainSelector);\n bottle.decorator('DomainSelector', connect([ 'domainsList' ], [ 'listDomains' ]));\n\n bottle.serviceFactory('ManageDomains', () => ManageDomains);\n bottle.decorator('ManageDomains', connect(\n [ 'domainsList', 'selectedServer' ],\n [ 'listDomains', 'filterDomains', 'editDomainRedirects' ],\n ));\n\n // Actions\n bottle.serviceFactory('listDomains', listDomains, 'buildShlinkApiClient');\n bottle.serviceFactory('filterDomains', () => filterDomains);\n bottle.serviceFactory('editDomainRedirects', editDomainRedirects, 'buildShlinkApiClient');\n};\n\nexport default provideServices;\n","import { Action } from 'redux';\nimport { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\n\n/* eslint-disable padding-line-between-statements */\nexport const APP_UPDATE_AVAILABLE = 'shlink/appUpdates/APP_UPDATE_AVAILABLE';\nexport const RESET_APP_UPDATE = 'shlink/appUpdates/RESET_APP_UPDATE';\n/* eslint-enable padding-line-between-statements */\n\nconst initialState = false;\n\nexport default buildReducer>({\n [APP_UPDATE_AVAILABLE]: () => true,\n [RESET_APP_UPDATE]: () => false,\n}, initialState);\n\nexport const appUpdateAvailable = buildActionCreator(APP_UPDATE_AVAILABLE);\n\nexport const resetAppUpdate = buildActionCreator(RESET_APP_UPDATE);\n","import { FC, MouseEventHandler } from 'react';\nimport { Alert, Button } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSyncAlt as reloadIcon } from '@fortawesome/free-solid-svg-icons';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { useToggle } from '../utils/helpers/hooks';\nimport './AppUpdateBanner.scss';\n\ninterface AppUpdateBannerProps {\n isOpen: boolean;\n toggle: MouseEventHandler;\n forceUpdate: Function;\n}\n\nexport const AppUpdateBanner: FC = ({ isOpen, toggle, forceUpdate }) => {\n const [ isUpdating,, setUpdating ] = useToggle();\n const update = () => {\n setUpdating();\n forceUpdate();\n };\n\n return (\n \n

This app has just been updated!

\n

\n Restart it to enjoy the new features.\n \n

\n
\n );\n};\n","export const forceUpdate = async () => {\n const registrations = await navigator.serviceWorker?.getRegistrations() ?? [];\n\n for (const registration of registrations) {\n const { waiting } = registration;\n\n waiting?.addEventListener('statechange', (event) => {\n if ((event.target as any)?.state === 'activated') {\n window.location.reload();\n }\n });\n\n // The logic that makes skipWaiting to be called when this message is posted is in service-worker.ts\n waiting?.postMessage({ type: 'SKIP_WAITING' });\n }\n};\n","import { useEffect, FC } from 'react';\nimport { Route, RouteChildrenProps, Switch } from 'react-router-dom';\nimport classNames from 'classnames';\nimport NotFound from '../common/NotFound';\nimport { ServersMap } from '../servers/data';\nimport { Settings } from '../settings/reducers/settings';\nimport { changeThemeInMarkup } from '../utils/theme';\nimport { AppUpdateBanner } from '../common/AppUpdateBanner';\nimport { forceUpdate } from '../utils/helpers/sw';\nimport './App.scss';\n\ninterface AppProps extends RouteChildrenProps {\n fetchServers: () => void;\n servers: ServersMap;\n settings: Settings;\n resetAppUpdate: () => void;\n appUpdated: boolean;\n}\n\nconst App = (\n MainHeader: FC,\n Home: FC,\n MenuLayout: FC,\n CreateServer: FC,\n EditServer: FC,\n Settings: FC,\n ManageServers: FC,\n ShlinkVersionsContainer: FC,\n) => ({ fetchServers, servers, settings, appUpdated, resetAppUpdate, location }: AppProps) => {\n const isHome = location.pathname === '/';\n\n useEffect(() => {\n // On first load, try to fetch the remote servers if the list is empty\n if (Object.keys(servers).length === 0) {\n fetchServers();\n }\n\n changeThemeInMarkup(settings.ui?.theme ?? 'light');\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
\n );\n};\n\nexport default App;\n","import Bottle, { Decorator } from 'bottlejs';\nimport { appUpdateAvailable, resetAppUpdate } from '../reducers/appUpdates';\nimport App from '../App';\nimport { ConnectDecorator } from '../../container/types';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {\n // Components\n bottle.serviceFactory(\n 'App',\n App,\n 'MainHeader',\n 'Home',\n 'MenuLayout',\n 'CreateServer',\n 'EditServer',\n 'Settings',\n 'ManageServers',\n 'ShlinkVersionsContainer',\n );\n bottle.decorator('App', connect([ 'servers', 'settings', 'appUpdated' ], [ 'fetchServers', 'resetAppUpdate' ]));\n bottle.decorator('App', withRouter);\n\n // Actions\n bottle.serviceFactory('appUpdateAvailable', () => appUpdateAvailable);\n bottle.serviceFactory('resetAppUpdate', () => resetAppUpdate);\n};\n\nexport default provideServices;\n","import Bottle, { IContainer } from 'bottlejs';\nimport { withRouter } from 'react-router-dom';\nimport { connect as reduxConnect } from 'react-redux';\nimport { pick } from 'ramda';\nimport provideApiServices from '../api/services/provideServices';\nimport provideCommonServices from '../common/services/provideServices';\nimport provideShortUrlsServices from '../short-urls/services/provideServices';\nimport provideServersServices from '../servers/services/provideServices';\nimport provideVisitsServices from '../visits/services/provideServices';\nimport provideTagsServices from '../tags/services/provideServices';\nimport provideUtilsServices from '../utils/services/provideServices';\nimport provideMercureServices from '../mercure/services/provideServices';\nimport provideSettingsServices from '../settings/services/provideServices';\nimport provideDomainsServices from '../domains/services/provideServices';\nimport provideAppServices from '../app/services/provideServices';\nimport { ConnectDecorator } from './types';\n\ntype LazyActionMap = Record;\n\nconst bottle = new Bottle();\nconst { container } = bottle;\n\nconst lazyService = (container: IContainer, serviceName: string) =>\n (...args: any[]) => (container[serviceName] as T)(...args) as K;\nconst mapActionService = (map: LazyActionMap, actionName: string): LazyActionMap => ({\n ...map,\n // Wrap actual action service in a function so that it is lazily created the first time it is called\n [actionName]: lazyService(container, actionName),\n});\nconst connect: ConnectDecorator = (propsFromState: string[] | null, actionServiceNames: string[] = []) =>\n reduxConnect(\n propsFromState ? pick(propsFromState) : null,\n actionServiceNames.reduce(mapActionService, {}),\n );\n\nprovideAppServices(bottle, connect, withRouter);\nprovideCommonServices(bottle, connect, withRouter);\nprovideApiServices(bottle);\nprovideShortUrlsServices(bottle, connect, withRouter);\nprovideServersServices(bottle, connect, withRouter);\nprovideTagsServices(bottle, connect);\nprovideVisitsServices(bottle, connect);\nprovideUtilsServices(bottle);\nprovideMercureServices(bottle);\nprovideSettingsServices(bottle, connect);\nprovideDomainsServices(bottle, connect);\n\nexport default container;\n","import { combineReducers } from 'redux';\nimport serversReducer from '../servers/reducers/servers';\nimport selectedServerReducer from '../servers/reducers/selectedServer';\nimport shortUrlsListReducer from '../short-urls/reducers/shortUrlsList';\nimport shortUrlsListParamsReducer from '../short-urls/reducers/shortUrlsListParams';\nimport shortUrlCreationReducer from '../short-urls/reducers/shortUrlCreation';\nimport shortUrlDeletionReducer from '../short-urls/reducers/shortUrlDeletion';\nimport shortUrlEditionReducer from '../short-urls/reducers/shortUrlEdition';\nimport shortUrlVisitsReducer from '../visits/reducers/shortUrlVisits';\nimport tagVisitsReducer from '../visits/reducers/tagVisits';\nimport orphanVisitsReducer from '../visits/reducers/orphanVisits';\nimport shortUrlDetailReducer from '../short-urls/reducers/shortUrlDetail';\nimport tagsListReducer from '../tags/reducers/tagsList';\nimport tagDeleteReducer from '../tags/reducers/tagDelete';\nimport tagEditReducer from '../tags/reducers/tagEdit';\nimport mercureInfoReducer from '../mercure/reducers/mercureInfo';\nimport settingsReducer from '../settings/reducers/settings';\nimport domainsListReducer from '../domains/reducers/domainsList';\nimport visitsOverviewReducer from '../visits/reducers/visitsOverview';\nimport appUpdatesReducer from '../app/reducers/appUpdates';\nimport { ShlinkState } from '../container/types';\n\nexport default combineReducers({\n servers: serversReducer,\n selectedServer: selectedServerReducer,\n shortUrlsList: shortUrlsListReducer,\n shortUrlsListParams: shortUrlsListParamsReducer,\n shortUrlCreationResult: shortUrlCreationReducer,\n shortUrlDeletion: shortUrlDeletionReducer,\n shortUrlEdition: shortUrlEditionReducer,\n shortUrlVisits: shortUrlVisitsReducer,\n tagVisits: tagVisitsReducer,\n orphanVisits: orphanVisitsReducer,\n shortUrlDetail: shortUrlDetailReducer,\n tagsList: tagsListReducer,\n tagDelete: tagDeleteReducer,\n tagEdit: tagEditReducer,\n mercureInfo: mercureInfoReducer,\n settings: settingsReducer,\n domainsList: domainsListReducer,\n visitsOverview: visitsOverviewReducer,\n appUpdated: appUpdatesReducer,\n});\n","import ReduxThunk from 'redux-thunk';\nimport { applyMiddleware, compose, createStore } from 'redux';\nimport { save, load, RLSOptions } from 'redux-localstorage-simple';\nimport reducers from '../reducers';\n\nconst isProduction = process.env.NODE_ENV !== 'production';\nconst composeEnhancers: Function = !isProduction && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst localStorageConfig: RLSOptions = {\n states: [ 'settings', 'servers' ],\n namespace: 'shlink',\n namespaceSeparator: '.',\n debounce: 300,\n};\n\nconst store = createStore(reducers, load(localStorageConfig), composeEnhancers(\n applyMiddleware(save(localStorageConfig), ReduxThunk),\n));\n\nexport default store;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL ?? '', window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://cra.link/PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://cra.link/PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import L from 'leaflet';\nimport marker2x from 'leaflet/dist/images/marker-icon-2x.png';\nimport marker from 'leaflet/dist/images/marker-icon.png';\nimport markerShadow from 'leaflet/dist/images/marker-shadow.png';\n\nexport const fixLeafletIcons = () => {\n delete (L.Icon.Default.prototype as any)._getIconUrl;\n\n L.Icon.Default.mergeOptions({\n iconRetinaUrl: marker2x,\n iconUrl: marker,\n shadowUrl: markerShadow,\n });\n};\n","import { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrowserRouter } from 'react-router-dom';\nimport { homepage } from '../package.json';\nimport container from './container';\nimport store from './container/store';\nimport { fixLeafletIcons } from './utils/helpers/leaflet';\nimport { register as registerServiceWorker } from './serviceWorkerRegistration';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport 'leaflet/dist/leaflet.css';\nimport './index.scss';\n\n// This overwrites icons used for leaflet maps, fixing some issues caused by webpack while processing the CSS\nfixLeafletIcons();\n\nconst { App, ScrollToTop, ErrorHandler, appUpdateAvailable } = container;\n\nrender(\n \n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nregisterServiceWorker({\n onUpdate() {\n store.dispatch(appUpdateAvailable()); // eslint-disable-line @typescript-eslint/no-unsafe-call\n },\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"],"sourceRoot":""} \ No newline at end of file diff --git a/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js b/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js new file mode 100644 index 00000000..94d9e077 --- /dev/null +++ b/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{103: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))}}},104: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)}},147:function(e){e.exports=JSON.parse('{"a":"/shlink-web-client/feature/not-empty-resultsets"}')},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),a=function(e){var t=e.color,r=void 0===t?c.c:t,a=e.className;return Object(n.jsx)("svg",{className:a,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsxs)("g",{fill:r,children:[Object(n.jsx)("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),Object(n.jsx)("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),Object(n.jsx)("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),Object(n.jsx)("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})})}},151:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(0),a=r(1),s=r(54),i=r(30),o=r(60);function l(e,t){return function(r){var l=r.selectServer,u=r.selectedServer,d=r.match;return Object(a.useEffect)((function(){l(d.params.serverId)}),[d.params.serverId]),u?Object(i.c)(u)?Object(c.jsx)(t,{}):Object(c.jsx)(e,Object(n.a)({},r)):Object(c.jsx)(o.a,{children:Object(c.jsx)(s.a,{loading:!0})})}}},153:function(e,t,r){"use strict";var n=r(0),c=r(22),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(557),a=r(558),s=r(22),i=r(8),o=r.n(i),l=r(12),u=r(11),d=function(e){var t=e.id,r=e.name;return Object(n.jsxs)(c.a,{tag:s.b,to:"/server/".concat(t),className:"servers-list__server-item",children:[r,Object(n.jsx)(l.a,{icon:u.j,className:"servers-list__server-item-icon"})]})};t.a=function(e){var t=e.servers,r=e.children,c=e.embedded,s=void 0!==c&&c;return Object(n.jsxs)(n.Fragment,{children:[r&&Object(n.jsx)("h5",{className:"mb-md-3",children:r}),t.length>0&&Object(n.jsx)(a.a,{className:o()("servers-list__list-group",{"servers-list__list-group--embedded":s}),children:t.map((function(e){var t=e.id,r=e.name;return Object(n.jsx)(d,{id:t,name:r},t)}))})]})}},25:function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(7),c=r(1),a=r(280),s=r(51),i=function(e,t){return function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,s=Object(c.useState)(r),i=Object(n.a)(s,2),o=i[0],l=i[1],u=Object(c.useRef)(void 0),d=function(){l(!r),u.current&&t(u.current),u.current=e((function(){return l(r)}),a)};return[o,d]}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(c.useState)(e),r=Object(n.a)(t,2),a=r[0],s=r[1];return[a,function(){return s(!a)},function(){return s(!0)},function(){return s(!1)}]},l=function(e,t){var r=function(e){return function(t){t.event.composedPath().some((function(e){var t=e.classList;return null===t||void 0===t?void 0:t.contains("visits-table")}))||document.querySelector(".modal")||e()}};return Object(a.useSwipeable)({delta:40,onSwipedLeft:r(t),onSwipedRight:r(e)})},u=function(e,t){var r=Object(c.useState)(t),a=Object(n.a)(r,2),i=a[0],o=a[1];return[i,function(t){var r=window,n=r.location,c=r.history,a=Object(s.a)(n.search);a[e]=t,c.pushState(null,"","".concat(n.pathname,"?").concat(Object(s.b)(a))),o(t)}]},d=function(e,t){var r=Object(c.useRef)(!0);Object(c.useEffect)((function(){!r.current&&e(),r.current=!1}),t)}},277:function(e,t,r){"use strict";(function(e){var n=r(278),c=r.n(n),a=r(279),s=r(310),i=r(311),o=r(312),l=r(313),u=r(281),d=r(308),j=r(103),b=r(283);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",n),t.decorator("Home",r(["servers"],["resetSelectedServer"])),t.serviceFactory("MenuLayout",o.a,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),t.decorator("MenuLayout",r(["selectedServer"],["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(49))},279: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})}}},281:function(e,t,r){"use strict";var n=r(19),c=r(27),a=r(37),s=r(36),i=r(0),o=r(1),l=r(217),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)}},283:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r.n(n),a=r(15),s=r(19),i=r(27),o=r(104),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}()},299:function(e,t,r){"use strict";(function(e){var n=r(25),c=r(300),a=r(301);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.c,"setTimeout","clearTimeout")}}).call(this,r(49))},30:function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"e",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"f",(function(){return l}));var n=r(540),c=function(e){return!(null===e||void 0===e||!e.url)&&!(null===e||void 0===e||!e.apiKey)},a=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("id"))},s=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("version"))},i=function(e){return!(null===e||void 0===e||!e.hasOwnProperty("serverNotFound"))},o=function(e){return a(e)?e.id:""},l=function(e){return Object(n.a)(["id","autoConnect"],e)}},300:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(19),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))}}},301:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(19),c=r(31),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:{}}},308:function(e,t,r){"use strict";var n=r(0),c=r(8),a=r.n(c),s=r(30),i=r(545),o=r(52),l=r(70),u=Object(i.a)(Object(l.c)(),l.b),d=function(e){var t=e.project,r=e.version;return Object(n.jsx)(o.a,{href:"https://github.com/shlinkio/".concat(t,"/releases/").concat(r),className:"text-muted",children:Object(n.jsx)("b",{children:r})})},j=function(e){var t=e.selectedServer,r=e.clientVersion,c=u(void 0===r?"%_VERSION_%":r);return Object(n.jsxs)("small",{className:"text-muted",children:[Object(s.d)(t)&&Object(n.jsxs)(n.Fragment,{children:["Server: ",Object(n.jsx)(d,{project:"shlink",version:t.printableVersion})," - "]}),"Client: ",Object(n.jsx)(d,{project:"shlink-web-client",version:c})]})};t.a=function(e){var t=e.selectedServer,r=a()("text-center",{"shlink-versions-container--with-server":Object(s.d)(t)});return Object(n.jsx)("div",{className:r,children:Object(n.jsx)(j,{selectedServer:t})})}},31:function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(546),c=r(213),a=r(318),s=r(545),i=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Object(n.a)(r,e+1).map(t)},o=function(e){return!Object(c.a)(e)&&!Object(a.a)(e)},l=function(e){return Object(s.a)((function(e){return e.preventDefault()}),e)},u=function(e){return Object(a.a)(e)?null:e},d=function(e){return"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}},310:function(e,t,r){"use strict";var n=r(7),c=r(0),a=r(11),s=r(12),i=r(1),o=r(22),l=r(550),u=r(551),d=r(552),j=r(553),b=r(554),h=r(555),O=r(556),v=r(8),f=r.n(v),m=r(25),x=r(150);t.a=function(e){return function(t){var r=t.location,v=Object(m.e)(),g=Object(n.a)(v,4),p=g[0],y=g[1],S=g[3],C=r.pathname;Object(i.useEffect)(S,[r]);var N="/settings",k=f()("main-header__toggle-icon",{"main-header__toggle-icon--opened":p});return Object(c.jsxs)(l.a,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[Object(c.jsxs)(u.a,{tag:o.b,to:"/",children:[Object(c.jsx)(x.a,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),Object(c.jsx)(d.a,{onClick:y,children:Object(c.jsx)(s.a,{icon:a.i,className:k})}),Object(c.jsx)(j.a,{navbar:!0,isOpen:p,children:Object(c.jsxs)(b.a,{navbar:!0,className:"ml-auto",children:[Object(c.jsx)(h.a,{children:Object(c.jsxs)(O.a,{tag:o.b,to:N,active:C===N,children:[Object(c.jsx)(s.a,{icon:a.l}),"\xa0 Settings"]})}),Object(c.jsx)(e,{})]})})]})}}},311:function(e,t,r){"use strict";var n=r(0),c=r(1),a=r(559),s=r(318),i=r(22),o=r(316),l=r(541),u=r(52),d=r(12),j=r(11),b=r(165),h=r(150);t.a=function(e){var t=e.servers,r=e.history,O=Object(a.a)(t),v=!Object(s.a)(O);return Object(c.useEffect)((function(){var e=O.find((function(e){return e.autoConnect}));e&&r.push("/server/".concat(e.id))}),[]),Object(n.jsx)("div",{className:"home",children:Object(n.jsx)(o.a,{className:"home__main-card",children:Object(n.jsxs)(l.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)(h.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)(b.a,{embedded:!0,servers:O,children:!v&&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)(i.b,{to:"/server/create",className:"btn btn-outline-primary btn-lg mr-2",children:[Object(n.jsx)(d.a,{icon:j.E})," ",Object(n.jsx)("span",{className:"ml-1",children:"Add a server"})]})}),Object(n.jsx)("p",{className:"mb-0 mt-5",children:Object(n.jsx)(u.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)(d.a,{icon:j.o})]})})})]})})]})]})})})}},312:function(e,t,r){"use strict";var n=r(3),c=r(7),a=r(0),s=r(1),i=r(43),o=r(11),l=r(12),u=r(8),d=r.n(u),j=r(151),b=r(25),h=r(38),O=r(30),v=r(153);t.a=function(e,t,r,u,f,m,x,g,p,y,S){return Object(j.a)((function(j){var C=j.location,N=j.selectedServer,k=Object(b.e)(),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.d)(N))return Object(a.jsx)(g,{});var E=Object(h.f)(N),D=Object(h.d)(N),L=d()("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),V=Object(b.d)(T,R);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(l.a,{icon:o.c,className:L,onClick:U}),Object(a.jsx)("div",Object(n.a)(Object(n.a)({},V),{},{className:"menu-layout__swipeable",children:Object(a.jsxs)("div",{className:"menu-layout__swipeable-inner",children:[Object(a.jsx)(r,{selectedServer:N,showOnMobile:_}),Object(a.jsx)("div",{className:"menu-layout__container",onClick:function(){return R()},children:Object(a.jsx)("div",{className:"container-xl",children:Object(a.jsxs)(i.d,{children:[Object(a.jsx)(i.a,{exact:!0,from:"/server/:serverId",to:"/server/:serverId/overview"}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/overview",component:p}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/list-short-urls/:page",component:t}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/create-short-url",component:u}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/visits",component:f}),Object(a.jsx)(i.b,{path:"/server/:serverId/short-code/:shortCode/edit",component:y}),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:x}),Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-tags",component:e}),D&&Object(a.jsx)(i.b,{exact:!0,path:"/server/:serverId/manage-domains",component:S}),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"})}})]})})})]})}))]})}),g)}},313:function(e,t,r){"use strict";var n=r(3),c=r(40),a=r(0),s=r(11),i=r(12),o=r(22),l=r(8),u=r.n(l),d=r(30),j=r(38),b=function(e){var t=e.children,r=e.to,s=e.className,i=Object(c.a)(e,["children","to","className"]);return Object(a.jsx)(o.c,Object(n.a)(Object(n.a)({className:u()("aside-menu__item",s),activeClassName:"aside-menu__item--selected",to:r},i),{},{children:t}))};t.a=function(e){return function(t){var r=t.selectedServer,n=t.showOnMobile,c=void 0!==n&&n,o=Object(d.e)(r),l=o?r.id:"",h=Object(j.d)(r),O=u()("aside-menu",{"aside-menu--hidden":!c}),v=function(e){return"/server/".concat(l).concat(e)};return Object(a.jsx)("aside",{className:O,children:Object(a.jsxs)("nav",{className:"nav flex-column aside-menu__nav",children:[Object(a.jsxs)(b,{to:v("/overview"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.t}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Overview"})]}),Object(a.jsxs)(b,{to:v("/list-short-urls/1"),isActive:function(e,t){return null!==t.pathname.match("/list-short-urls")},children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.w}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),Object(a.jsxs)(b,{to:v("/create-short-url"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.v,flip:"horizontal"}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),Object(a.jsxs)(b,{to:v("/manage-tags"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.N}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),h&&Object(a.jsxs)(b,{to:v("/manage-domains"),children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.s}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),Object(a.jsxs)(b,{to:v("/edit"),className:"aside-menu__item--push",children:[Object(a.jsx)(i.a,{fixedWidth:!0,icon:s.B}),Object(a.jsx)("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),o&&Object(a.jsx)(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:r})]})})}}},319:function(e,t,r){e.exports=r(536)},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(3),c=r(40),a=r(0),s=r(316),i=r(543),o=r(544),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})]}))}},38:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"j",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"k",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return j})),r.d(t,"i",(function(){return b})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return O})),r.d(t,"c",(function(){return v}));var n=r(30),c=r(70),a=function(e){return function(t){return Object(n.d)(t)&&Object(c.a)(t.version,e)}},s=a({minVersion:"2.5.0"}),i=a({minVersion:"2.6.0"}),o=i,l=i,u=i,d=a({minVersion:"2.7.0"}),j=d,b=a({minVersion:"2.8.0"}),h=b,O=a({minVersion:"2.9.0"}),v=a({minVersion:"2.10.0"})},405:function(e,t){},407:function(e,t){},46:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return c})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"f",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return u}));var n="#4696e5",c="rgba(70, 150, 229, 0.4)",a="#f77f28",s="rgba(247, 127, 40, 0.4)",i="white",o="#161b22",l=function(e){var t,r=document.getElementsByTagName("html");null===r||void 0===r||null===(t=r[0])||void 0===t||t.setAttribute("data-theme",e)},u=function(){var e,t=document.getElementsByTagName("html");return"dark"===(null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.getAttribute("data-theme"))}},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(212),c=r.n(n),a=function(e){return c.a.parse(e,{ignoreQueryPrefix:!0})},s=function(e){return c.a.stringify(e,{arrayFormat:"brackets"})}},536:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"processStatsFromVisits",(function(){return La})),r.d(n,"normalizeVisits",(function(){return Va}));var c,a=r(0),s=r(48),i=r(163),o=r(22),l=r(147),u=r(10),d=r(3),j=r(276),b=r(43),h=r(608),O=r(613),v=r(30),f=r(6),m=r.n(f),x=r(15),g=r(19),p=r(7),y=r(40),S=r(309),C=r(213),N=r(318),k=r(51),w=function(e,t){return e?"".concat(e,"/rest/v").concat(t):""},_=Object(S.a)(C.a),U=function(e){var t=e.orderBy,r=void 0===t?{}:t,n=Object(y.a)(e,["orderBy"]),c=Object.keys(r),a=Object(p.a)(c,1)[0],s=Object.values(r),i=Object(p.a)(s,1)[0];return i?Object(d.a)(Object(d.a)({},n),{},{orderBy:"".concat(a,"-").concat(i)}):n},T=function e(t,r,n){var c=this;Object(g.a)(this,e),this.axios=t,this.baseUrl=r,this.apiKey=n,this.apiVersion=void 0,this.listShortUrls=Object(x.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",U(t)).then((function(e){return e.data.shortUrls})));case 2:case"end":return e.stop()}}),e)}))),this.createShortUrl=function(){var e=Object(x.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(S.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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(x.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})));case 1:case"end":return e.stop()}}),e)}))),this.editDomainRedirects=function(){var e=Object(x.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(x.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(w(c.baseUrl,c.apiVersion)).concat(t),headers:{"X-Api-Key":c.apiKey},params:_(n),data:a,paramsSerializer:k.b});case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),s=e.t0.response,!s&&2!==c.apiVersion){e.next=15;break}throw e.t0;case 15:return c.apiVersion=c.apiVersion-1,e.next=18,c.performRequest(t,r,n,a);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),this.apiVersion=2},R={},E=function(e){return function(t){var r,n=function(e){return"function"===typeof e}(t)?(r=t,Object(O.a)("selectedServer",r())):t;if(!Object(v.b)(n))throw new Error("There's no selected server or it is not found");var c=n.url,a=n.apiKey,s="".concat(c,"_").concat(a);return R[s]||(R[s]=new T(e,c,a)),R[s]}},D=function(e){e.serviceFactory("buildShlinkApiClient",E,"axios")},L=r(277),V=r(11),I=r(12),F=r(545),A=r(361),M=r(1),G=r(8),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=e.initialValue,u=void 0===l?"":l,d=Object(M.useState)(u),j=Object(p.a)(d,2),b=j[0],h=j[1],O=function(){c&&clearTimeout(c),c=null},v=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;h(e),O(),c=setTimeout((function(){t(e),O()}),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:b,onChange:function(e){return v(e.target.value)}}),Object(a.jsx)(I.a,{icon:V.H,className:"search-field__icon"}),Object(a.jsx)("div",{className:"close search-field__close",hidden:""===b,id:"search-field__close",onClick:function(){return v("",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(565),q=r(130),z=r(560),Q=r(561),K=r(25),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(K.e)(),b=Object(p.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)(Q.a,{className:"w-100",right:u,style:f,children:i})]})},Z=r(91),Y=r(365),X=r(200),$=r(307),ee=r(563),te=r(564),re=r(538),ne=r(562),ce=(r(537),r(362)),ae=r(363),se=r(364),ie=function(e){return"string"!==typeof e},oe=function(e,t){return e&&ie(e)?t?Object(re.default)(e,t):Object(ne.a)(e):e},le=function(e){return oe(e,void 0)},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return function(t){return oe(t,e)}}(),de=function(e){return ie(e)?e:Object(A.default)(e)},je=function(e,t,r){try{return Object(ce.default)(de(e),{start:de(null!==t&&void 0!==t?t:e),end:de(null!==r&&void 0!==r?r:e)})}catch(n){return!1}},be=function(e,t){return Object(ae.default)(e,t)||Object(se.default)(e,t)},he=function(e){return void 0===e||Object(N.a)(Object($.a)(Boolean,e))},Oe=function(e){return"string"===typeof e},ve={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",all:void 0},fe=Object.keys(ve).filter((function(e){return"all"!==e})),me=function(e){if(e&&"all"!==e)return Oe(e)?ve[e]:function(e){if(e&&!he(e))return e.startDate&&!e.endDate?"Since ".concat(ue(e.startDate)):!e.startDate&&e.endDate?"Until ".concat(ue(e.endDate)):"".concat(ue(e.startDate)," - ").concat(ue(e.endDate))}(e)},xe=function(e){return Object(Z.default)(Object(Y.default)(new Date,e))},ge=function(e){return{startDate:e,endDate:Object(X.default)(new Date)}},pe=function(e){if(!e||"all"===e)return{};switch(e){case"today":return ge(Object(Z.default)(new Date));case"yesterday":return{startDate:xe(1),endDate:Object(X.default)(Object(Y.default)(new Date,1))};case"last7Days":return ge(xe(7));case"last30Days":return ge(xe(30));case"last90Days":return ge(xe(90));case"last180Days":return ge(xe(180));case"last365Days":return ge(xe(365))}return{}},ye=function(e){var t=de(e);return Object(ee.a)([[function(){return be(Object(Z.default)(new Date),t)},function(){return"today"}],[function(){return be(xe(1),t)},function(){return"yesterday"}],[function(){return be(xe(7),t)},function(){return"last7Days"}],[function(){return be(xe(30),t)},function(){return"last30Days"}],[function(){return be(xe(90),t)},function(){return"last90Days"}],[function(){return be(xe(180),t)},function(){return"last180Days"}],[function(){return be(xe(365),t)},function(){return"last365Days"}],[te.a,function(){return"all"}]])()},Se=r(286),Ce=r.n(Se),Ne=r(78),ke=function(e){var t=e.className,r=e.isClearable,n=e.selected,c=!r||Object(C.a)(n),s=Object(M.useRef)();return Object(a.jsxs)("div",{className:"date-input-container",children:[Object(a.jsx)(Ce.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)(I.a,{icon:Ne.a,className:"date-input-container__icon",onClick:function(){var e;return null===(e=s.current)||void 0===e?void 0:e.input.focus()}})]})},we=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)(ke,{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)(ke,{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})})]})},_e=function(e){var t=e.active,r=e.allText,n=e.onChange;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(W.a,{active:"all"===t,onClick:function(){return n("all")},children:r}),Object(a.jsx)(W.a,{divider:!0}),fe.map((function(e){return Object(a.jsx)(W.a,{active:t===e,onClick:function(){return n(e)},children:me(e)},e)}))]})},Ue=function(e){var t,r=e.onDatesChange,n=e.initialDateRange,c=e.defaultText,s=e.disabled,i=e.updatable,o=void 0!==i&&i,l=Oe(n),u=Object(M.useState)(l?n:void 0),j=Object(p.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(l?void 0:n),v=Object(p.a)(O,2),f=v[0],m=v[1],x=function(e){h(he(e)?"all":void 0),m(e),r(e)},g=function(e){h(e),m(void 0),r(pe(e))};return o&&Object(K.a)((function(){var e=Oe(n);e&&g(n),n&&!e&&x(n)}),[n]),Object(a.jsxs)(J,{disabled:s,text:null!==(t=me(null!==b&&void 0!==b?b:f))&&void 0!==t?t:c,children:[Object(a.jsx)(_e,{allText:c,active:b,onChange:g}),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)(we,Object(d.a)(Object(d.a)({},f),{},{onStartDateChange:function(e){return x(Object(d.a)(Object(d.a)({},f),{},{startDate:e}))},onEndDateChange:function(e){return x(Object(d.a)(Object(d.a)({},f),{},{endDate:e}))}}))})]})},Te=function(e){var t=e.history,r=e.location,n=e.match,c=Object(M.useMemo)((function(){return Object(k.a)(r.search)}),[r]);return[c,function(e){var r=Object(k.b)(Object(d.a)(Object(d.a)({},c),e)),a=Object(N.a)(r)?"":"?".concat(r);t.push("/server/".concat(null===n||void 0===n?void 0:n.params.serverId,"/list-short-urls/1").concat(a))}]},Re=function(e){return e?Object(A.default)(e):null},Ee=function(e){return function(t){var r,n=Te(t),c=Object(p.a)(n,2),s=c[0],i=s.search,o=s.tags,l=s.startDate,u=s.endDate,d=c[1],j=null!==(r=null===o||void 0===o?void 0:o.split(","))&&void 0!==r?r:[],b=Object(F.a)((function(e){var t,r,n=e.startDate,c=e.endDate;return{startDate:null!==(t=le(n))&&void 0!==t?t:void 0,endDate:null!==(r=le(c))&&void 0!==r?r:void 0}}),d),h=Object(F.a)((function(e){return Object(N.a)(e)?void 0:e}),(function(e){return d({search:e})})),O=Object(F.a)((function(e){return j.filter((function(t){return t!==e}))}),(function(e){return 0===e.length?void 0:e.join(",")}),(function(e){return d({tags:e})}));return Object(a.jsxs)("div",{className:"search-bar-container",children:[Object(a.jsx)(B,{initialValue:i,onChange:h}),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)(Ue,{defaultText:"All short URLs",initialDateRange:{startDate:Re(l),endDate:Re(u)},onDatesChange:b})})})}),j.length>0&&Object(a.jsxs)("h4",{className:"search-bar__selected-tag mt-3",children:[Object(a.jsx)(I.a,{icon:V.N,className:"search-bar__tags-icon"}),"\xa0",j.map((function(t){return Object(a.jsx)(H,{colorGenerator:e,text:t,clearable:!0,onClose:function(){return O(t)}},t)}))]})]})}},De=r(26),Le=r(575),Ve=r(61),Ie=r(559),Fe=r(316),Ae=r(566),Me=r(567),Ge=function(e,t,r){return e!==t?"ASC":r?{ASC:"DESC",DESC:void 0}[r]:"ASC"},Pe=function(e,t){var r=t.field,n=t.dir;return r&&n?e.sort((function(e,t){var c="ASC"===n?1:-1,a="ASC"===n?-1:1;return e[r]>t[r]?c:a})):e};function Be(e){var t,r=e.items,n=e.order,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=Ge(e,n.field,n.dir);c(t?e:void 0,t)}};return Object(a.jsxs)(Ae.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&&!n.field&&Object(a.jsx)(a.Fragment,{children:"Order by..."}),i&&n.field&&'Order by: "'.concat(r[n.field],'" - "').concat(null!==(t=n.dir)&&void 0!==t?t:"DESC",'"')]}),Object(a.jsxs)(Q.a,{right:l,className:P()("w-100",{"sorting-dropdown__menu--link":!i}),children:[Object(Me.a)(r).map((function(e){var t=Object(p.a)(e,2),r=t[0],c=t[1];return Object(a.jsxs)(W.a,{active:n.field===r,onClick:u(r),children:[c,n.field===r&&Object(a.jsx)(I.a,{icon:"ASC"===n.dir?V.K:V.J,className:"sorting-dropdown__sort-icon"})]},r)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsx)(W.a,{disabled:!n.field,onClick:function(){return c()},children:Object(a.jsx)("i",{children:"Clear selection"})})]})]})}var He=r(287);function We(e,t){var r=new Set;return function(n){var c=n.createNewVisits,s=n.loadMercureInfo,i=n.mercureInfo,o=i.interval;return Object(M.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 He.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(De.a)(r)),r.clear()}),1e3*o*60);return Object(F.a)((function(){return clearInterval(a)}),(function(){return null===e||void 0===e?void 0:e()}))}),[i]),Object(a.jsx)(e,Object(d.a)({},n))}}var qe=function e(){Object(g.a)(this,e)};function ze(e){var t=e.currentOrder,r=e.field,n=e.className,c=void 0===n?"ml-1":n;return t.dir&&t.field===r?Object(a.jsx)(I.a,{icon:"ASC"===t.dir?V.f:V.e,className:c}):null}qe.visits="https://shlink.io/new-visit",qe.orphanVisits="https://shlink.io/new-orphan-visit",qe.shortUrlVisits=function(e){return"https://shlink.io/new-visit/".concat(e)};var Qe,Ke,Je,Ze,Ye,Xe,$e,et,tt,rt,nt,ct,at,st,it,ot,lt,ut,dt,jt=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}},bt=function(e){return function(){return{type:e}}},ht=r(568),Ot=r(569),vt=r(288),ft=r(570),mt=function(e,t,r){return Object(C.a)(r)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===r},xt="shlink/visitCreation/CREATE_VISITS",gt=function(e){return{type:xt,createdVisits:e}},pt=function(e){var t;return null===(t=e.response)||void 0===t?void 0:t.data},yt=function(e){return"INVALID_SHORTCODE_DELETION"===(null===e||void 0===e?void 0:e.type)},St="shlink/deleteShortUrl/DELETE_SHORT_URL_START",Ct="shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR",Nt="shlink/deleteShortUrl/SHORT_URL_DELETED",kt="shlink/deleteShortUrl/RESET_DELETE_SHORT_URL",wt={shortCode:"",loading:!1,error:!1},_t=jt((Qe={},Object(u.a)(Qe,St,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Qe,Ct,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{errorData:r,loading:!1,error:!0})})),Object(u.a)(Qe,Nt,(function(e,t){var r=t.shortCode;return Object(d.a)(Object(d.a)({},e),{},{shortCode:r,loading:!1,error:!1})})),Object(u.a)(Qe,kt,(function(){return wt})),Qe),wt),Ut=function(e){return function(t,r){return function(){var n=Object(x.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:St}),s=e(a),i=s.deleteShortUrl,n.prev=2,n.next=5,i(t,r);case 5:c({type:Nt,shortCode:t,domain:r}),n.next=12;break;case 8:throw n.prev=8,n.t0=n.catch(2),c({type:Ct,errorData:pt(n.t0)}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e,t){return n.apply(this,arguments)}}()}},Tt=bt(kt),Rt="shlink/createShortUrl/CREATE_SHORT_URL_START",Et="shlink/createShortUrl/CREATE_SHORT_URL_ERROR",Dt="shlink/createShortUrl/CREATE_SHORT_URL",Lt="shlink/createShortUrl/RESET_CREATE_SHORT_URL",Vt={result:null,saving:!1,error:!1},It=jt((Ke={},Object(u.a)(Ke,Rt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Ke,Et,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Ke,Dt,(function(e,t){return{result:t.result,saving:!1,error:!1}})),Object(u.a)(Ke,Lt,(function(){return Vt})),Ke),Vt),Ft=function(e){return function(t){return function(){var r=Object(x.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:Rt}),a=e(c),s=a.createShortUrl,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Dt,result:i}),r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),n({type:Et,errorData:pt(r.t0)}),r.t0;case 13:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},At=bt(Lt),Mt=r(38),Gt="shlink/shortUrlEdition/EDIT_SHORT_URL_START",Pt="shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR",Bt="shlink/shortUrlEdition/SHORT_URL_EDITED",Ht=jt((Je={},Object(u.a)(Je,Gt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{saving:!0,error:!1})})),Object(u.a)(Je,Pt,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{saving:!1,error:!0,errorData:r})})),Object(u.a)(Je,Bt,(function(e,t){return{shortUrl:t.shortUrl,saving:!1,error:!1}})),Je),{saving:!1,error:!1}),Wt=function(e){return function(t,r,n){return function(){var c=Object(x.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:Gt}),i=s(),o=i.selectedServer,l=!Object(Mt.k)(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(p.a)(b,1),O=h[0],a({shortUrl:O,type:Bt}),c.next=17;break;case 13:throw c.prev=13,c.t0=c.catch(4),a({type:Pt,errorData:pt(c.t0)}),c.t0;case 17:case"end":return c.stop()}}),c,null,[[4,13]])})));return function(e,t){return c.apply(this,arguments)}}()}},qt="shlink/shortUrlsList/LIST_SHORT_URLS_START",zt="shlink/shortUrlsList/LIST_SHORT_URLS_ERROR",Qt="shlink/shortUrlsList/LIST_SHORT_URLS",Kt=jt((Ze={},Object(u.a)(Ze,qt,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(Ze,zt,(function(){return{loading:!1,error:!0}})),Object(u.a)(Ze,Qt,(function(e,t){return{loading:!1,error:!1,shortUrls:t.shortUrls}})),Object(u.a)(Ze,Nt,Object(F.a)((function(e,t){var r=t.shortCode,n=t.domain;return e.shortUrls?Object(ht.a)(["shortUrls","data"],Object(S.a)((function(e){return mt(e,r,n)}),e.shortUrls.data),e):e}),(function(e){return e.shortUrls?Object(ht.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems-1,e):e}))),Object(u.a)(Ze,xt,(function(e,t){var r,n,c=t.createdVisits;return Object(ht.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(Ot.a)(c.filter((function(t){var r=t.shortUrl;return r&&mt(e,r.shortCode,r.domain)})));return null!==t&&void 0!==t&&t.shortUrl?Object(vt.a)("visitsCount",t.shortUrl.visitsCount,e):e})),e)})),Object(u.a)(Ze,Dt,Object(F.a)((function(e,t){var r=t.result;return e.shortUrls?Object(ht.a)(["shortUrls","data"],[r].concat(Object(De.a)(Object(ft.a)(e.shortUrls.data))),e):e}),(function(e){return e.shortUrls?Object(ht.a)(["shortUrls","pagination","totalItems"],e.shortUrls.pagination.totalItems+1,e):e}))),Object(u.a)(Ze,Bt,(function(e,t){var r=t.shortUrl;return e.shortUrls?Object(ht.a)(["shortUrls","data"],e.shortUrls.data.map((function(e){var t=r.shortCode,n=r.domain;return mt(e,t,n)?r:e})),e):e})),Ze),{loading:!0,error:!1}),Jt=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var r=Object(x.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:qt}),a=e(c),s=a.listShortUrls,r.prev=2,r.next=5,s(t);case 5:i=r.sent,n({type:Qt,shortUrls:i,params:t}),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),n({type:zt,params:t});case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(e,t){return r.apply(this,arguments)}}()}},Zt="shlink/shortUrlsListParams/RESET_SHORT_URL_PARAMS",Yt={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Xt={page:"1",orderBy:{dateCreated:"DESC"}},$t=jt((Ye={},Object(u.a)(Ye,Qt,(function(e,t){var r=t.params;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(Ye,Zt,(function(){return Xt})),Ye),Xt),er=bt(Zt),tr=r(572),rr=r(573),nr=r(574),cr=r(546),ar=r(285),sr=r(571),ir=Math.ceil,or=new Intl.NumberFormat("en-US"),lr=function(e){return or.format(Number(e))},ur="...",dr=function(e,t){var r=Object(cr.a)(Object(ar.a)(2,e-2),Object(sr.a)(t-1,e+2)+1);return e-2>2&&r.unshift(ur),e+2=d,children:Object(a.jsx)(rr.a,{next:!0,tag:o.b,to:j(l+1)})})]})},vr=function(e,t){return We((function(r){var n,c=r.listShortUrls,s=r.resetShortUrlParams,i=r.shortUrlsListParams,o=r.match,l=r.location,j=r.history,b=r.shortUrlsList,h=r.selectedServer,O=Object(v.a)(h),f=i.orderBy,m=Object(M.useState)({field:f&&Object(Le.a)(Object(Ve.a)(f)),dir:f&&Object(Le.a)(Object(Ie.a)(f))}),x=Object(p.a)(m,2),g=x[0],y=x[1],S=Te({history:j,match:o,location:l}),C=Object(p.a)(S,2),N=C[0],k=N.tags,w=N.search,_=N.startDate,U=N.endDate,T=C[1],R=Object(M.useMemo)((function(){var e;return null!==(e=null===k||void 0===k?void 0:k.split(","))&&void 0!==e?e:[]}),[k]),E=(null!==(n=null===b||void 0===b?void 0:b.shortUrls)&&void 0!==n?n:{}).pagination,D=function(e){return c(Object(d.a)(Object(d.a)({},i),e))},L=function(e,t){y({field:e,dir:t}),D({orderBy:e?Object(u.a)({},e,t):void 0})},V=Object(F.a)((function(e){return Object(De.a)(new Set([].concat(Object(De.a)(R),[e]))).join(",")}),(function(e){return T({tags:e})}));return Object(M.useEffect)((function(){return s}),[]),Object(M.useEffect)((function(){D({page:o.params.page,searchTerm:w,tags:R,itemsPerPage:void 0,startDate:_,endDate:U})}),[o.params.page,w,R,_,U]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("div",{className:"mb-3",children:Object(a.jsx)(t,{})}),Object(a.jsx)("div",{className:"d-block d-lg-none mb-3",children:Object(a.jsx)(Be,{items:Yt,order:g,onChange:L})}),Object(a.jsxs)(Fe.a,{body:!0,className:"pb-1",children:[Object(a.jsx)(e,{selectedServer:h,shortUrlsList:b,orderByColumn:function(e){return function(){return L(e,Ge(e,g.field,g.dir))}},renderOrderIcon:function(e){return Object(a.jsx)(ze,{currentOrder:g,field:e})},onTagClick:V}),Object(a.jsx)(Or,{paginator:E,serverId:O,currentQueryString:l.search})]})]})}),(function(){return[qe.visits]}))},fr=r(52),mr=r(160),xr=r.n(mr),gr=function(e){var t=e.text,r=e.onCopy;return Object(a.jsx)(xr.a,{text:t,onCopy:r,children:Object(a.jsx)(I.a,{icon:Ne.c,className:"ml-2 copy-to-clipboard-icon"})})},pr=r(576),yr=r(615),Sr=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=ie(t)?t:Object(A.default)(t);return Object(a.jsx)("time",{dateTime:"".concat(Object(pr.a)(i),"000"),children:s?"".concat(Object(yr.a)(new Date,i)," ago"):Object(re.default)(i,n)})},Cr=r(577),Nr=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)},kr=function(e){var t=e.selectedServer,r=e.shortUrl,n=e.suffix,c=e.children,s=Object(y.a)(e,["selectedServer","shortUrl","suffix","children"]);return t&&Object(v.e)(t)&&r?Object(a.jsx)(o.b,Object(d.a)(Object(d.a)({to:Nr(t,r,n)},s),{},{children:c})):Object(a.jsx)("span",Object(d.a)(Object(d.a)({},s),{},{children:c}))},wr=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)(kr,{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:lr(r)})});if(!o)return l;var u=lr(o),d=Object(M.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:"indivisible",children:[l,Object(a.jsxs)("small",{className:"short-urls-visits-count__max-visits-control",ref:function(e){d.current=e},children:[" ","/ ",u," ",Object(a.jsx)("sup",{children:Object(a.jsx)(I.a,{icon:V.u})})]})]}),Object(a.jsxs)(Cr.a,{target:function(){return d.current},placement:"bottom",children:["This short URL will not accept more than ",Object(a.jsx)("b",{children:u})," visits."]})]})},_r=function(e,t,r){return function(n){var c,s,i=n.shortUrl,o=n.selectedServer,l=n.onTagClick,u=r(),d=Object(p.a)(u,2),j=d[0],b=d[1],h=r(!1,500),O=Object(p.a)(h,2),v=O[0],f=O[1],m=Object(M.useRef)(!0);return Object(M.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)(Sr,{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)(fr.a,{href:i.shortUrl}),Object(a.jsx)(gr,{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)(fr.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)(fr.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)(wr,{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})})]})}},Ur=r(578),Tr=function(e){var t=e.isOpen,r=e.toggle,n=e.children,c=e.right,s=void 0===c||c;return Object(a.jsxs)(Ur.a,{toggle:r,isOpen:t,children:[Object(a.jsxs)(z.a,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:["\xa0",Object(a.jsx)(I.a,{icon:V.n}),"\xa0"]}),Object(a.jsx)(Q.a,{right:s,children:n})]})},Rr=function(e,t){return function(r){var n=r.shortUrl,c=r.selectedServer,s=Object(K.e)(),i=Object(p.a)(s,2),o=i[0],l=i[1],u=Object(K.e)(),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(p.a)(h,2),v=O[0],f=O[1];return Object(a.jsxs)(Tr,{toggle:l,isOpen:o,children:[Object(a.jsxs)(W.a,{tag:kr,selectedServer:c,shortUrl:n,suffix:"visits",children:[Object(a.jsx)(I.a,{icon:V.g,fixedWidth:!0})," Visit stats"]}),Object(a.jsxs)(W.a,{tag:kr,selectedServer:c,shortUrl:n,suffix:"edit",children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit short URL"]}),Object(a.jsxs)(W.a,{onClick:b,children:[Object(a.jsx)(I.a,{icon:V.F,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:"dropdown-item--danger",onClick:f,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Delete short URL"]}),Object(a.jsx)(e,{shortUrl:n,isOpen:v,toggle:f})]})}},Er=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(M.useMemo)((function(){return function(e){var t,r;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,forwardQuery:null===(r=null===e||void 0===e?void 0:e.forwardQuery)||void 0===r||r}}(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(x.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}))]})}},Dr=r(617),Lr=r(579),Vr=r(580),Ir=r(581),Fr=r(547),Ar=r(31),Mr=r(541),Gr=r(32),Pr=function(e){var t=e.children,r=e.type,n=e.className,c=e.small,s=void 0!==c&&c;return Object(a.jsx)(Mr.a,{className:n,children:Object(a.jsx)("div",{className:P()({"col-md-10 offset-md-1":!s,"col-12":s}),children:Object(a.jsx)(Gr.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})})})},Br=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(", "),"]"]}))]})},Hr=function(e){var t=e.shortUrl,r=e.toggle,n=e.isOpen,c=e.shortUrlDeletion,s=e.resetDeleteShortUrl,i=e.deleteShortUrl,o=Object(M.useState)(""),l=Object(p.a)(o,2),u=l[0],d=l[1];Object(M.useEffect)((function(){return s}),[]);var j=c.error,b=c.errorData,h=Object(F.a)(s,r),O=Object(Ar.b)((function(){var e=t.shortCode,n=t.domain;i(e,n).then(r).catch(Fr.a)}));return Object(a.jsx)(Dr.a,{isOpen:n,toggle:h,centered:!0,children:Object(a.jsxs)("form",{onSubmit:O,children:[Object(a.jsx)(Lr.a,{toggle:h,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete short URL"})}),Object(a.jsxs)(Vr.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)(Pr,{type:yt(b)?"warning":"error",small:!0,className:"mt-2",children:Object(a.jsx)(Br,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),Object(a.jsxs)(Ir.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"})]})]})})},Wr=r(220),qr=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(p.a)(l,2),d=u[0],j=u[1];if(Object(M.useEffect)((function(){s()}),[]),r)return Object(a.jsxs)(Pr,{type:"error",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.P,className:"float-right pointer",onClick:s}),Object(a.jsx)(Br,{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)(Pr,{type:"success",className:"mt-3",children:[o&&Object(a.jsx)(I.a,{icon:V.P,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)(xr.a,{text:b,onCopy:j,children:Object(a.jsxs)("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[Object(a.jsx)(I.a,{icon:Ne.c})," Copy"]})}),Object(a.jsx)(Wr.a,{placement:"left",isOpen:d,target:"copyBtn",children:"Copied!"})]})}},zr=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(Mt.j)(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 text-dark",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)}))})]})}},Qr=r(582),Kr=r(217),Jr=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"})]})},Zr=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"]})]})},Yr=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(M.useState)(300),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(0),O=Object(p.a)(h,2),v=O[0],f=O[1],g=Object(M.useState)("png"),y=Object(p.a)(g,2),S=y[0],C=y[1],w=Object(M.useState)("L"),_=Object(p.a)(w,2),U=_[0],T=_[1],R=Object(M.useMemo)((function(){return{useSizeInPath:!Object(Mt.h)(l),marginIsSupported:Object(Mt.g)(l),errorCorrectionIsSupported:Object(Mt.i)(l)}}),[l]),E=R.marginIsSupported!==R.errorCorrectionIsSupported,D=Object(M.useMemo)((function(){return function(e,t,r){var n=t.size,c=t.format,a=t.margin,s=t.errorCorrection,i=r.useSizeInPath,o=r.marginIsSupported,l=r.errorCorrectionIsSupported,u="".concat(e,"/qr-code").concat(i?"/".concat(n):""),d=Object(k.b)({size:i?void 0:n,format:c,margin:o&&a>0?a:void 0,errorCorrection:l?s:void 0});return"".concat(u).concat(Object(N.a)(d)?"":"?".concat(d))}(c,{size:j,format:S,margin:v,errorCorrection:U},R)}),[c,j,S,v,U,R]),L=Object(M.useMemo)((function(){return j+v}),[j,v]),F=Object(M.useMemo)((function(){if(!(L<500))return L<800?"lg":"xl"}),[L]);return Object(a.jsxs)(Dr.a,{isOpen:o,toggle:i,centered:!0,size:F,children:[Object(a.jsxs)(Lr.a,{toggle:i,children:["QR code for ",Object(a.jsx)(fr.a,{href:c,children:c})]}),Object(a.jsxs)(Vr.a,{children:[Object(a.jsxs)(Mr.a,{children:[Object(a.jsxs)(Qr.a,{className:P()({"col-md-4":E,"col-md-6":!E}),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))}})]}),R.marginIsSupported&&Object(a.jsxs)(Qr.a,{className:E?"col-md-4":"col-md-6",children:[Object(a.jsxs)("label",{className:"mb-0",children:["Margin: ",v,"px"]}),Object(a.jsx)("input",{type:"range",className:"form-control-range",value:v,step:1,min:0,max:100,onChange:function(e){return f(Number(e.target.value))}})]}),Object(a.jsx)(Qr.a,{className:E?"col-md-4":"col-md-6",children:Object(a.jsx)(Jr,{format:S,setFormat:C})}),R.errorCorrectionIsSupported&&Object(a.jsx)(Qr.a,{className:"col-md-6",children:Object(a.jsx)(Zr,{errorCorrection:U,setErrorCorrection:T})})]}),Object(a.jsxs)("div",{className:"text-center",children:[Object(a.jsxs)("div",{className:"mb-3",children:[Object(a.jsx)(fr.a,{href:D}),Object(a.jsx)(gr,{text:D})]}),Object(a.jsx)("img",{src:D,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)(Kr.a,{block:!0,color:"primary",onClick:Object(x.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(D,"".concat(s,"-qr-code.").concat(S)));case 1:case"end":return t.stop()}}),t)}))),children:["Download ",Object(a.jsx)(I.a,{icon:V.q,className:"ml-1"})]})})})]})]})]})}},Xr=r(585),$r=r(583),en=r(584),tn=r(612),rn=function(e){var t=e.checked,r=void 0!==t&&t,n=e.onChange,c=void 0===n?Fr.a:n,s=e.className,i=e.children,o=e.type,l=e.inline,u=void 0!==l&&l,d=Object(M.useRef)(Object(tn.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})]})},nn=function(e){return Object(a.jsx)(rn,Object(d.a)({type:"checkbox"},e))},cn=function(e){var t=e.isOpen,r=e.toggle;return Object(a.jsxs)(Dr.a,{isOpen:t,toggle:r,centered:!0,size:"lg",children:[Object(a.jsx)(Lr.a,{toggle:r,children:"Info"}),Object(a.jsxs)(Vr.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"})]})]})]})},an=function(){var e=Object(K.e)(),t=Object(p.a)(e,2),r=t[0],n=t[1];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{title:"What does this mean?",children:Object(a.jsx)(I.a,{icon:V.u,style:{cursor:"pointer"},onClick:n})}),Object(a.jsx)(cn,{isOpen:r,toggle:n})]})},sn=function(e){var t=e.className,r=void 0===t?"":t,n=e.placement,c=e.children,s=Object(M.useRef)();return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("span",{className:r,ref:function(e){s.current=e},children:Object(a.jsx)(I.a,{icon:V.u})}),Object(a.jsx)(Cr.a,{target:function(){return s.current},placement:n,children:c})]})},on=function(e){var t=e.children,r=e.infoTooltip,n=e.checked,c=e.onChange;return Object(a.jsxs)("p",{children:[Object(a.jsx)(nn,{inline:!0,checked:n,className:r?"mr-2":"",onChange:c,children:t}),r&&Object(a.jsx)(sn,{placement:"right",children:r})]})},ln=Object(F.a)($r.a,Object(en.a)(/ /g,"-")),un=function(e){return"string"===typeof e?Object(A.default)(e):e},dn=function(e){return{"col-sm-6":e,"col-sm-12":!e}},jn=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(M.useState)(o),b=Object(p.a)(j,2),h=b[0],O=b[1],v="edit"===c,f="create-basic"===c,g=Object(Ar.c)(o.title),y=function(){var e=Object(Ar.c)(h.title);return Object(ee.a)([[function(){return!e&&!g},function(){}],[function(){return!e&&g},function(){return null}],[te.a,function(){return h.title}]])()},S=Object(Ar.b)(Object(x.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=le(h.validSince))&&void 0!==t?t:null,validUntil:null!==(r=le(h.validUntil))&&void 0!==r?r:null,maxVisits:Object(Ar.c)(h.maxVisits)?Number(h.maxVisits):null,title:y()})).then((function(){return!v&&O(o)})).catch((function(){})));case 1:case"end":return e.stop()}}),e)}))));Object(M.useEffect)((function(){O(o)}),[o]);var C=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]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Object(a.jsx)(Qr.a,Object(d.a)(Object(d.a)({},s),{},{children:Object(a.jsx)(Xr.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))}))},k=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)(ke,Object(d.a)({selected:h[e]?un(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))})},w=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Qr.a,{children:Object(a.jsx)(Xr.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.jsxs)(Mr.a,{children:[f&&C("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),Object(a.jsx)(Qr.a,{className:f?"col-lg-6":"col-12 mb-0",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(ln)}))}})})]})]}),_=Object(Mt.j)(l),U=_||!v,T=P()("mb-3",dn(U)),R=Object(Mt.b)(l),E=Object(Mt.e)(l),D=R||E,L=P()("mb-3",dn(D));return Object(a.jsxs)("form",{className:"short-url-form",onSubmit:S,children:[f&&w,!f&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Gr.a,{title:"Basic options",className:"mb-3",children:w}),Object(a.jsxs)(Mr.a,{children:[U&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Gr.a,{title:"Customize the short URL",children:[_&&C("title","Title"),!v&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Mr.a,{children:[Object(a.jsx)("div",{className:"col-lg-6",children:C("customSlug","Custom slug","text",{disabled:Object(Ar.c)(h.shortCodeLength)})}),Object(a.jsx)("div",{className:"col-lg-6",children:C("shortCodeLength","Short code length","number",{min:4,disabled:Object(Ar.c)(h.customSlug)})})]}),Object(a.jsx)(Qr.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:T,children:Object(a.jsxs)(Gr.a,{title:"Limit access to the short URL",children:[C("maxVisits","Maximum number of visits allowed","number",{min:1}),k("validSince","Enabled since...",{maxDate:h.validUntil?un(h.validUntil):void 0}),k("validUntil","Enabled until...",{minDate:h.validSince?un(h.validSince):void 0})]})})]}),Object(a.jsxs)(Mr.a,{children:[Object(a.jsx)("div",{className:L,children:Object(a.jsxs)(Gr.a,{title:"Extra checks",children:[Object(a.jsx)(on,{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"}),!v&&Object(a.jsxs)("p",{children:[Object(a.jsx)(nn,{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)(an,{})]})]})}),D&&Object(a.jsx)("div",{className:"col-sm-6 mb-3",children:Object(a.jsxs)(Gr.a,{title:"Configure behavior",children:[R&&Object(a.jsx)(on,{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"}),E&&Object(a.jsx)(on,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:h.forwardQuery,onChange:function(e){return O(Object(d.a)(Object(d.a)({},h),{},{forwardQuery:e}))},children:"Forward query params on redirect"})]})})]})]}),Object(a.jsx)("div",{className:"text-center",children:Object(a.jsx)(Kr.a,{outline:!0,color:"primary",disabled:s||Object(N.a)(h.longUrl),className:"btn-xs-block",children:s?"Saving...":"Save"})})]})}},bn=r(54),hn=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,g=d.error,y=d.errorData,S=Object(k.a)(s).domain,C=Object(M.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,forwardQuery:e.forwardQuery,validateUrl:o}:{longUrl:"",validateUrl:o}}(v,i)}),[v,i]),N=Object(K.e)(),w=Object(p.a)(N,4),_=w[0],U=w[2],T=w[3];return Object(M.useEffect)((function(){u(c.shortCode,S)}),[]),b?Object(a.jsx)(bn.a,{loading:!0}):h?Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{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)(Fe.a,{body:!0,children:Object(a.jsxs)("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Kr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:n,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center",children:Object(a.jsxs)("small",{children:["Edit ",Object(a.jsx)(fr.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:C,saving:f,selectedServer:o,mode:"edit",onSave:function(){var e=Object(x.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:T(),j(v.shortCode,v.domain,t).then(U).catch(T);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),g&&Object(a.jsx)(Pr,{type:"error",className:"mt-3",children:Object(a.jsx)(Br,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),_&&Object(a.jsx)(Pr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})}},On="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START",vn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR",fn="shlink/shortUrlDetail/GET_SHORT_URL_DETAIL",mn={loading:!1,error:!1},xn=jt((Xe={},Object(u.a)(Xe,On,(function(){return{loading:!0,error:!1}})),Object(u.a)(Xe,vn,(function(e,t){return{loading:!1,error:!0,errorData:t.errorData}})),Object(u.a)(Xe,fn,(function(e,t){var r=t.shortUrl;return Object(d.a)({shortUrl:r},mn)})),Xe),mn),gn=function(e){return function(t,r){return function(){var n=Object(x.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:On}),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 mt(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:fn}),n.next=17;break;case 14:n.prev=14,n.t1=n.catch(1),c({type:vn,errorData:pt(n.t1)});case 17:case"end":return n.stop()}}),n,null,[[1,14]])})));return function(e,t){return n.apply(this,arguments)}}()}},pn=function(e,t,r){e.serviceFactory("ShortUrlsList",vr,"ShortUrlsTable","SearchBar"),e.decorator("ShortUrlsList",t(["selectedServer","shortUrlsListParams","mercureInfo","shortUrlsList"],["listShortUrls","resetShortUrlParams","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",zr,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",_r,"ShortUrlsRowMenu","ColorGenerator","useStateFlagTimeout"),e.serviceFactory("ShortUrlsRowMenu",Rr,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",qr,"useStateFlagTimeout"),e.serviceFactory("ShortUrlForm",jn,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Er,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreationResult","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",hn,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",(function(){return Hr})),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",Yr,"ImageDownloader","ForServerVersion"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("SearchBar",Ee,"ColorGenerator"),e.decorator("SearchBar",r),e.serviceFactory("listShortUrls",Jt,"buildShlinkApiClient"),e.serviceFactory("resetShortUrlParams",(function(){return er})),e.serviceFactory("createShortUrl",Ft,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",(function(){return At})),e.serviceFactory("deleteShortUrl",Ut,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",(function(){return Tt})),e.serviceFactory("getShortUrlDetail",gn,"buildShlinkApiClient"),e.serviceFactory("editShortUrl",Wt,"buildShlinkApiClient")},yn=r(289),Sn=r.n(yn),Cn=r(60),Nn=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(M.useRef)(null!==c&&void 0!==c?c:Object(tn.a)());return Object(a.jsxs)(Qr.a,{className: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)}})]})},kn=function(e){return Object(a.jsx)(Nn,Object(d.a)(Object(d.a)({},e),{},{labelClassName:"create-server__label"}))},wn=function(e){var t=e.onSubmit,r=e.initialValues,n=e.children,c=e.title,s=Object(M.useState)(""),i=Object(p.a)(s,2),o=i[0],l=i[1],u=Object(M.useState)(""),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(M.useState)(""),O=Object(p.a)(h,2),v=O[0],f=O[1],m=Object(Ar.b)((function(){return t({name:o,url:j,apiKey:v})}));return Object(M.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)(Gr.a,{className:"mb-3",title:c,children:[Object(a.jsx)(kn,{value:o,onChange:l,children:"Name"}),Object(a.jsx)(kn,{type:"url",value:j,onChange:b,children:"URL"}),Object(a.jsx)(kn,{value:v,onChange:f,children:"API key"})]}),Object(a.jsx)("div",{className:"text-right",children:n})]})},_n=function(e){var t=e.type;return Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsxs)(Pr,{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."]})})},Un=function(e,t){return function(r){var n=r.servers,c=r.createServer,s=r.history,i=s.push,o=s.goBack,l=!!Object.keys(n).length,u=t(!1,4e3),j=Object(p.a)(u,2),b=j[0],h=j[1],O=t(!1,4e3),v=Object(p.a)(O,2),f=v[0],m=v[1];return Object(a.jsxs)(Cn.a,{children:[Object(a.jsxs)(wn,{title:Object(a.jsx)("h5",{className:"mb-0",children:"Add new server"}),onSubmit:function(e){var t=Object(tn.a)();c(Object(d.a)(Object(d.a)({},e),{},{id:t})),i("/server/".concat(t))},children:[!l&&Object(a.jsx)(e,{tooltipPlacement:"top",onImport:h,onImportError:m}),l&&Object(a.jsx)(Kr.a,{outline:!0,onClick:o,children:"Cancel"}),Object(a.jsx)(Kr.a,{outline:!0,color:"primary",className:"ml-2",children:"Create server"})]}),b&&Object(a.jsx)(_n,{type:"success"}),f&&Object(a.jsx)(_n,{type:"error"})]})}},Tn=function(e){var t=e.servers,r=e.selectedServer,n=Object(Ie.a)(t);return Object(a.jsxs)(Ae.a,{nav:!0,inNavbar:!0,children:[Object(a.jsxs)(z.a,{nav:!0,caret:!0,children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Servers"})]}),Object(a.jsx)(Q.a,{right:!0,children:Object(N.a)(n)?Object(a.jsxs)(W.a,{tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.E})," ",Object(a.jsx)("span",{className:"ml-1",children:"Add a server"})]}):Object(a.jsxs)(a.Fragment,{children:[n.map((function(e){var t=e.name,n=e.id;return Object(a.jsx)(W.a,{tag:o.b,to:"/server/".concat(n),active:Object(v.a)(r)===n,children:t},n)})),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{tag:o.b,to:"/manage-servers",children:[Object(a.jsx)(I.a,{icon:V.I})," ",Object(a.jsx)("span",{className:"ml-1",children:"Manage servers"})]})]})})]})},Rn=function(e){var t=e.server,r=e.toggle,n=e.isOpen,c=e.deleteServer,s=e.history,i=e.redirectHome,o=void 0===i||i;return Object(a.jsxs)(Dr.a,{isOpen:n,toggle:r,centered:!0,children:[Object(a.jsx)(Lr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Remove server"})}),Object(a.jsxs)(Vr.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)(Ir.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(o&&s.push("/"))},children:"Delete"})]})]})},En=function(e){return function(t){var r=t.server,n=t.className,c=t.children,s=t.textClassName,i=Object(K.e)(),o=Object(p.a)(i,4),l=o[0],u=o[2],d=o[3];return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)("span",{className:n,onClick:u,children:[!c&&Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.y}),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})]})}},Dn=r(151),Ln=function(e){return Object(Dn.a)((function(e){var t=e.editServer,r=e.selectedServer,n=e.history.goBack;if(!Object(v.e)(r))return null;return Object(a.jsx)(Cn.a,{children:Object(a.jsxs)(wn,{title:Object(a.jsxs)("h5",{className:"mb-0",children:['Edit "',r.name,'"']}),initialValues:r,onSubmit:function(e){t(r.id,e),n()},children:[Object(a.jsx)(Kr.a,{outline:!0,className:"mr-2",onClick:n,children:"Cancel"}),Object(a.jsx)(Kr.a,{outline:!0,color:"primary",children:"Save"})]})})}),e)},Vn=function(e){var t=e.importServersFromFile;return function(e){var r=e.createServers,n=e.fileRef,c=e.children,s=e.onImport,i=void 0===s?function(){}:s,o=e.onImportError,l=void 0===o?function(){}:o,u=e.tooltipPlacement,d=void 0===u?"bottom":u,j=e.className,b=void 0===j?"":j,h=null!==n&&void 0!==n?n:Object(M.useRef)(),O=function(){var e=Object(x.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(Object(F.a)(r,i)).then((function(){a.value=null})).catch(l));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.jsxs)(Kr.a,{outline:!0,id:"importBtn",className:b,onClick:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.click()},children:[Object(a.jsx)(I.a,{icon:V.r,fixedWidth:!0})," ",null!==c&&void 0!==c?c:"Import from file"]}),Object(a.jsxs)(Cr.a,{placement:d,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:"import-servers-btn__csv-select",ref:h,onChange:O})]})}},In=r(542),Fn=r(70),An="shlink/selectedServer/SELECT_SERVER",Mn="shlink/selectedServer/RESET_SELECTED_SERVER",Gn=Object(F.a)((function(e){return"latest"===e?"999.999.999":e}),Object(Fn.c)("1.0.0")),Pn=Object(In.a)(Fr.a,function(){var e=Object(x.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:Gn(t),printableVersion:Object(Fn.b)(t)}})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),Bn=jt(($e={},Object(u.a)($e,Mn,(function(){return null})),Object(u.a)($e,An,(function(e,t){return t.selectedServer})),$e),null),Hn=bt(Mn),Wn=function(e,t){return function(r){return function(){var n=Object(x.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(Hn()),c(er()),s=a(),i=s.servers,o=i[r]){n.next=7;break}return c({type:An,selectedServer:{serverNotFound:!0}}),n.abrupt("return");case 7:return n.prev=7,l=e(o),u=l.health,n.next=11,Pn(r,u);case 11:j=n.sent,b=j.version,h=j.printableVersion,c({type:An,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:An,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)}}()}},qn=r(586),zn=r(587),Qn=r(152),Kn=r(314),Jn="shlink/servers/EDIT_SERVER",Zn="shlink/servers/DELETE_SERVER",Yn="shlink/servers/CREATE_SERVERS",Xn="shlink/servers/SET_AUTO_CONNECT",$n=jt((et={},Object(u.a)(et,Yn,(function(e,t){var r=t.newServers;return Object(d.a)(Object(d.a)({},e),r)})),Object(u.a)(et,Zn,(function(e,t){var r=t.serverId;return Object(qn.a)(r,e)})),Object(u.a)(et,Jn,(function(e,t){var r=t.serverId,n=t.serverData;return e[r]?Object(vt.a)(r,Object(d.a)(Object(d.a)({},e[r]),n),e):e})),Object(u.a)(et,Xn,(function(e,t){var r=t.serverId,n=t.autoConnect;return e[r]?n?Object(zn.a)(Object(Me.a)(e).map((function(e){var t=Object(p.a)(e,2),n=t[0],c=t[1];return[n,Object(d.a)(Object(d.a)({},c),{},{autoConnect:n===r})]}))):Object(vt.a)(r,Object(d.a)(Object(d.a)({},e[r]),{},{autoConnect:n}),e):e})),et),{}),ec=Object(Qn.a)((function(e,t){return Object(vt.a)(t.id,t,e)}),{}),tc=Object(F.a)(Object(Kn.a)((function(e){return e.id?e:Object(vt.a)("id",Object(tn.a)(),e)})),ec,(function(e){return{type:Yn,newServers:e}})),rc=function(e){return tc([e])},nc=function(e,t){return{type:Jn,serverId:e,serverData:t}},cc=function(e){var t=e.id;return{type:Zn,serverId:t}},ac=function(e,t){var r=e.id;return{type:Xn,serverId:r,autoConnect:t}},sc=Object(F.a)(Object(O.a)("data"),(function(e){return Array.isArray(e)?e.filter(v.b):[]})),ic=function(e){var t=e.get;return function(){return function(){var e=Object(x.a)(m.a.mark((function e(r){var n,c;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("".concat(l.a,"/servers.json"));case 2:n=e.sent,c=sc(n),r(tc(c));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}},oc=function(e){var t=e.minVersion,r=e.maxVersion,n=e.selectedServer,c=e.children;if(!Object(v.d)(n))return null;var s=n.version;return Object(Fn.a)(s,{maxVersion:r,minVersion:t})?Object(a.jsx)(a.Fragment,{children:c}):null},lc=r(165),uc=function(e){return function(t){var r=t.servers,n=t.selectedServer;return Object(a.jsx)(Cn.a,{children:Object(a.jsxs)("div",{className:"server-error__container flex-column",children:[Object(a.jsxs)(bn.a,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Object(v.e)(n)&&"Could not find this Shlink server.",Object(v.e)(n)&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),Object(a.jsxs)(lc.a,{servers:Object.values(r),children:["These are the Shlink servers currently configured. Choose one of them or ",Object(a.jsx)(o.b,{to:"/server/create",children:"add a new one"}),"."]}),Object(v.e)(n)&&Object(a.jsx)("div",{className:"container mt-3 mt-md-5",children:Object(a.jsxs)("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",Object(a.jsx)(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or\xa0",Object(a.jsx)(o.b,{to:"/server/".concat(n.id,"/edit"),children:"edit it"}),"."]})})]})})}},dc=r(103),jc=r(588),bc=r(589),hc=r(543),Oc=r(544),vc=function(e,t,r){return We((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,x=h.loading,g=h.visitsCount,p=h.orphanVisitsCount,y=Object(v.a)(d),S=Object(b.g)();return Object(M.useEffect)((function(){i({itemsPerPage:5,orderBy:{dateCreated:"DESC"}}),l(),j()}),[]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(Mr.a,{children:[Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Fe.a,{className:"overview__card mb-3",body:!0,children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Visits"}),Object(a.jsx)(bc.a,{tag:"h2",children:x?"Loading...":lr(g)})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Fe.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/orphan-visits"),children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Orphan visits"}),Object(a.jsxs)(bc.a,{tag:"h2",children:[Object(a.jsx)(r,{minVersion:"2.6.0",children:x?"Loading...":lr(null!==p&&void 0!==p?p:0)}),Object(a.jsx)(r,{maxVersion:"2.5.*",children:Object(a.jsx)("small",{className:"text-muted",children:Object(a.jsx)("i",{children:"Shlink 2.6 is needed"})})})]})]})}),Object(a.jsx)("div",{className:"col-md-6 col-xl-3",children:Object(a.jsxs)(Fe.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/list-short-urls/1"),children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Short URLs"}),Object(a.jsx)(bc.a,{tag:"h2",children:O?"Loading...":lr(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)(Fe.a,{className:"overview__card mb-3",body:!0,tag:o.b,to:"/server/".concat(y,"/manage-tags"),children:[Object(a.jsx)(jc.a,{tag:"h5",className:"overview__card-title",children:"Tags"}),Object(a.jsx)(bc.a,{tag:"h2",children:m?"Loading...":lr(u.tags.length)})]})})]}),Object(a.jsxs)(Fe.a,{className:"mb-3",children:[Object(a.jsxs)(hc.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(y,"/create-short-url"),children:"Advanced options \xbb"})]}),Object(a.jsx)(Oc.a,{children:Object(a.jsx)(t,{basicMode:!0})})]}),Object(a.jsxs)(Fe.a,{children:[Object(a.jsxs)(hc.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(y,"/list-short-urls/1"),children:"See all \xbb"})]}),Object(a.jsx)(Oc.a,{children:Object(a.jsx)(e,{shortUrlsList:s,selectedServer:d,className:"mb-0",onTagClick:function(e){return S.push("/server/".concat(y,"/list-short-urls/1?tags=").concat(encodeURIComponent(e)))}})})]})]})}),(function(){return[qe.visits,qe.orphanVisits]}))},fc=function(e,t,r,n){return function(c){var s=c.servers,i=Object.values(s),l=Object(M.useState)(i),u=Object(p.a)(l,2),d=u[0],j=u[1],b=d.some((function(e){return!!e.autoConnect})),h=r(!1,4e3),O=Object(p.a)(h,2),v=O[0],f=O[1];return Object(M.useEffect)((function(){j(Object.values(s))}),[s]),Object(a.jsxs)(Cn.a,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:function(e){return j(i.filter((function(t){var r=t.name,n=t.url;return"".concat(r," ").concat(n).match(e)})))}}),Object(a.jsxs)(Mr.a,{className:"mb-3",children:[Object(a.jsxs)("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[Object(a.jsx)(t,{className:"flex-fill",onImportError:f,children:"Import servers"}),i.length>0&&Object(a.jsxs)(Kr.a,{outline:!0,className:"ml-2 flex-fill",onClick:Object(x.a)(m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.exportServers());case 1:case"end":return t.stop()}}),t)}))),children:[Object(a.jsx)(I.a,{icon:V.q,fixedWidth:!0})," Export servers"]})]}),Object(a.jsx)("div",{className:"col-md-6 text-md-right d-flex d-md-block",children:Object(a.jsxs)(Kr.a,{outline:!0,color:"primary",className:"flex-fill",tag:o.b,to:"/server/create",children:[Object(a.jsx)(I.a,{icon:V.E,fixedWidth:!0})," Add a server"]})})]}),Object(a.jsx)(Gr.a,{children:Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsx)("thead",{className:"responsive-table__header",children:Object(a.jsxs)("tr",{children:[b&&Object(a.jsx)("th",{style:{width:"50px"}}),Object(a.jsx)("th",{children:"Name"}),Object(a.jsx)("th",{children:"Base URL"}),Object(a.jsx)("th",{})]})}),Object(a.jsxs)("tbody",{children:[!d.length&&Object(a.jsx)("tr",{className:"text-center",children:Object(a.jsx)("td",{colSpan:4,children:"No servers found."})}),d.map((function(e){return Object(a.jsx)(n,{server:e,hasAutoConnect:b},e.id)}))]})]})}),v&&Object(a.jsx)("div",{className:"mt-3",children:Object(a.jsx)(Pr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})}},mc=function(e){return function(t){var r=t.server,n=t.hasAutoConnect;return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[n&&Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:r.autoConnect&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.h,className:"text-primary",id:"autoConnectIcon"}),Object(a.jsx)(Cr.a,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Name",children:Object(a.jsx)(o.b,{to:"/server/".concat(r.id),children:r.name})}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base URL",children:r.url}),Object(a.jsx)("td",{className:"responsive-table__cell text-right",children:Object(a.jsx)(e,{server:r})})]})}},xc=function(e){return function(t){var r=t.server,n=t.setAutoConnect,c=Object(K.e)(),s=Object(p.a)(c,2),i=s[0],l=s[1],u=Object(K.e)(),d=Object(p.a)(u,4),j=d[0],b=d[2],h=d[3],O="/server/".concat(r.id),v=r.autoConnect,f=v?V.b:Ne.b;return Object(a.jsxs)(Tr,{isOpen:i,toggle:l,children:[Object(a.jsxs)(W.a,{tag:o.b,to:O,children:[Object(a.jsx)(I.a,{icon:V.D,fixedWidth:!0})," Connect"]}),Object(a.jsxs)(W.a,{tag:o.b,to:"".concat(O,"/edit"),children:[Object(a.jsx)(I.a,{icon:V.m,fixedWidth:!0})," Edit server"]}),Object(a.jsxs)(W.a,{onClick:function(){return n(r,!r.autoConnect)},children:[Object(a.jsx)(I.a,{icon:f,fixedWidth:!0})," ",v?"Do not a":"A","uto-connect"]}),Object(a.jsx)(W.a,{divider:!0}),Object(a.jsxs)(W.a,{className:"dropdown-item--danger",onClick:b,children:[Object(a.jsx)(I.a,{icon:V.y,fixedWidth:!0})," Remove server"]}),Object(a.jsx)(e,{redirectHome:!1,server:r,isOpen:j,toggle:h})]})}},gc=function(e){return"string"===typeof e.url&&"string"===typeof e.apiKey&&"string"===typeof e.name},pc=function(e){return Array.isArray(e)&&e.every(gc)},yc=function e(t,r){var n=this;Object(g.a)(this,e),this.csvJson=t,this.fileReaderFactory=r,this.importServersFromFile=function(){var e=Object(x.a)(m.a.mark((function e(t){var r;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("No file provided");case 2:return r=n.fileReaderFactory(),e.abrupt("return",new Promise((function(e,c){r.addEventListener("loadend",(function(t){try{var r,a,s,i=null!==(r=null===(a=t.target)||void 0===a||null===(s=a.result)||void 0===s?void 0:s.toString())&&void 0!==r?r:"",o=n.csvJson.toObject(i);if(!pc(o))throw new Error("Provided file does not have the right format.");e(o)}catch(t){c(t)}})),r.readAsText(t)})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Sc=r(104),Cc=function e(t,r,n){var c=this;Object(g.a)(this,e),this.storage=t,this.window=r,this.csvjson=n,this.exportServers=Object(x.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(Ie.a)(null!==(t=c.storage.get("servers"))&&void 0!==t?t:{}).map(v.f);try{n=c.csvjson.toCSV(r,{headers:"key"}),Object(Sc.a)(c.window,n,"shlink-servers.csv")}catch(a){console.error(a)}case 2:case"end":return e.stop()}}),e)})))},Nc=function(e,t,r){e.serviceFactory("ManageServers",fc,"ServersExporter","ImportServersBtn","useStateFlagTimeout","ManageServersRow"),e.decorator("ManageServers",t(["servers"])),e.serviceFactory("ManageServersRow",mc,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",xc,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Un,"ImportServersBtn","useStateFlagTimeout"),e.decorator("CreateServer",dc.a),e.decorator("CreateServer",t(["selectedServer","servers"],["createServer","resetSelectedServer"])),e.serviceFactory("EditServer",Ln,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer"])),e.serviceFactory("ServersDropdown",(function(){return Tn})),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",(function(){return Rn})),e.decorator("DeleteServerModal",r),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",En,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Vn,"ServersImporter"),e.decorator("ImportServersBtn",t(null,["createServers"])),e.serviceFactory("ForServerVersion",(function(){return oc})),e.decorator("ForServerVersion",t(["selectedServer"])),e.serviceFactory("ServerError",uc,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",vc,"ShortUrlsTable","CreateShortUrl","ForServerVersion"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("csvjson",Sn.a),e.constant("fileReaderFactory",(function(){return new FileReader})),e.service("ServersImporter",yc,"csvjson","fileReaderFactory"),e.service("ServersExporter",Cc,"Storage","window","csvjson"),e.serviceFactory("selectServer",Wn,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServer",(function(){return rc})),e.serviceFactory("createServers",(function(){return tc})),e.serviceFactory("deleteServer",(function(){return cc})),e.serviceFactory("editServer",(function(){return nc})),e.serviceFactory("setAutoConnect",(function(){return ac})),e.serviceFactory("fetchServers",ic,"axios"),e.serviceFactory("resetSelectedServer",(function(){return Hn}))},kc=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)(Fe.a,{body:!0,children:[Object(a.jsxs)("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[Object(a.jsx)(Kr.a,{color:"link",size:"lg",className:"p-0 mr-3",onClick:r,children:Object(a.jsx)(I.a,{icon:V.a})}),Object(a.jsx)("span",{className:"text-center d-none d-sm-block",children:Object(a.jsx)("small",{children:s})}),Object(a.jsxs)("span",{className:"badge badge-main ml-3",children:["Visits:"," ",Object(a.jsx)(wr,{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})]})})},wc=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)(fr.a,{href:u})]});return Object(a.jsxs)(kc,{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)(Sr,{date:i.dateCreated,relative:!0})}),Object(a.jsx)(Cr.a,{placement:"bottom",target:"created",children:Object(a.jsx)(Sr,{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)(fr.a,{href:d,children:null!==j&&void 0!==j?j:d})]})]})},_c=r(605),Uc=r(556),Tc=r(606),Rc=r(554),Ec=r(113),Dc=r(594),Lc=r(595),Vc=r(597),Ic=r(591),Fc=r(293),Ac=r(592),Mc=r(315),Gc=r(92),Pc=r(593),Bc=r(596),Hc=r(292),Wc=r.n(Hc),qc=r(590),zc="Others",Qc=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Kc=function(e){var t,r;return Object(Ar.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"},Jc=function(e,t){return Object.values(Object(d.a)(Object(d.a)({},Object(qc.a)(t,t.map((function(){return 0})))),e))},Zc=function(e){return Object(a.jsx)(rn,Object(d.a)({type:"switch"},e))},Yc=function(e,t){var r=e.native,n=Object(p.a)(t,1)[0];null!==r&&void 0!==r&&r.target&&(r.target.style.cursor=n?"pointer":"default")},Xc=function(e){var t=e.dataset,r=e.formattedValue;return"".concat(t.label,": ").concat(lr(r))},$c=function(e){var t=e.label,r=e.formattedValue;return"".concat(t,": ").concat(lr(r))},ea=r(46),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:Ic.a,daily:Fc.a,weekly:Ac.a,monthly:Mc.a},ca={hourly:function(e){return Object(re.default)(e,"yyyy-MM-dd HH:00")},daily:function(e){return Object(re.default)(e,"yyyy-MM-dd")},weekly:function(e){var t=Object(re.default)(Object(Gc.a)(e),"yyyy-MM-dd"),r=Object(re.default)(Object(Pc.a)(e),"yyyy-MM-dd");return"".concat(t," - ").concat(r)},monthly:function(e){return Object(re.default)(e,"yyyy-MM")}},aa=function(e,t){return Object(Lc.a)((function(t){return ca[e](Object(A.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(A.default)(t[0].date),a=Object(A.default)(t[t.length-1].date),s=r(c,a),i=ra[e];return[n(a)].concat(Object(De.a)(Object(Ar.e)(s,(function(e){return n(Object(Bc.a)(a,i(e)))}))))}(r,e);return[c,Jc(t,c)]},ia=function(e,t,r){return{label:t,data:e,fill:!1,tension:.2,borderColor:r,backgroundColor:r}},oa=null,la=function(e,t,r){return function(n){var c=Object(p.a)(n,1)[0];if(r&&c){var a,s=c.index;if(oa===e[s])r([]),oa=null;else r(e[s]&&t[e[s]]||[]),oa=null!==(a=e[s])&&void 0!==a?a: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(M.useState)(r.length>0?function(e){var t,r=new Date,n=Object(A.default)(e);return null!==(t=Object(ee.a)([[function(){return Object(Fc.a)(r,n)<=2},Object(Dc.a)("hourly")],[function(){return Object(Mc.a)(r,n)<=1},Object(Dc.a)("daily")],[function(){return Object(Mc.a)(r,n)<=6},Object(Dc.a)("weekly")]])())&&void 0!==t?t:"monthly"}(r[r.length-1].date):"monthly"),l=Object(p.a)(o,2),u=l[0],d=l[1],j=Object(K.e)(!0),b=Object(p.a)(j,2),h=b[0],O=b[1],v=Object(M.useMemo)((function(){return function(e,t){return t.reduce((function(t,r){var n,c=ca[e](Object(A.default)(r.date));return t[c]=null!==(n=t[c])&&void 0!==n?n:[],t[c].push(r),t}),{})}(u,r)}),[u,r]),f=Object(M.useMemo)((function(){return aa(u,Object(Vc.a)(r))}),[u,r]),m=Object(M.useMemo)((function(){return sa(r,f,u,h)}),[r,u,h]),x=Object(p.a)(m,2),g=x[0],y=x[1],S=Object(M.useMemo)((function(){return Jc(aa(u,Object(Vc.a)(n)),g)}),[n,u,g]),C=function(){var e=ia(y,"Visits",ea.c);return 0===n.length?[e]:[e,ia(S,s,ea.a)]},N={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:Xc}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:lr}},x:{title:{display:!0,text:ta[u]}}},onHover:Yc},k=function(){return Object(a.jsx)(Ec.c,{data:{labels:g,datasets:C()},options:N,getElementAtEvent:la(g,v,i)})};return Object(a.jsxs)(Fe.a,{children:[Object(a.jsxs)(hc.a,{children:[t,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsxs)(Ae.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),Object(a.jsx)(Q.a,{right:!0,children:Object.entries(ta).map((function(e){var t=Object(p.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)(Zc,{checked:h,onChange:O,children:Object(a.jsx)("small",{children:"Skip dates with no visits"})})})]}),Object(a.jsxs)(Oc.a,{className:"line-chart-card__body",children:[n.length>0&&k(),0===n.length&&k()]})]})},da=r(598),ja=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!jr(e)&&n(e)}};return Object(a.jsxs)(nr.a,{listClassName:P()("flex-wrap mb-0 simple-paginator",{"justify-content-center":s}),children:[Object(a.jsx)(tr.a,{disabled:r<=1,children:Object(a.jsx)(rr.a,{previous:!0,tag:"span",onClick:i(r-1)})}),dr(r,t).map((function(e,t){return Object(a.jsx)(tr.a,{disabled:jr(e),active:r===e,children:Object(a.jsx)(rr.a,{tag:"span",onClick:i(e),children:br(e)})},hr(e,t))})),Object(a.jsx)(tr.a,{disabled:r>=t,children:Object(a.jsx)(rr.a,{next:!0,tag:"span",onClick:i(r+1)})})]})},ba=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(y.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)}))},ha=function(e,t,r){var n=function(e,t){return Pe(t,e)}(r,t?ba(t,e):Object(De.a)(e)),c=n.length;return{visitsGroups:Object(da.a)(20,n),total:c}},Oa=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(M.useState)(h()),v=Object(p.a)(O,2),f=v[0],m=v[1],x=Object(M.useState)(void 0),g=Object(p.a)(x,2),y=g[0],S=g[1],C=Object(M.useState)({}),N=Object(p.a)(C,2),k=N[0],w=N[1],_=Object(M.useMemo)((function(){return ha(n,y,k)}),[y,k]),U=Object(M.useRef)(!0),T=Object(M.useState)(1),R=Object(p.a)(T,2),E=R[0],D=R[1],L=20*E,F=L-20,A=Object(Mt.a)(o),G=7+Number(A)+Number(j),H=function(e){return function(){return w({field:e,dir:Ge(e,k.field,k.dir)})}},W=function(e){return Object(a.jsx)(ze,{currentOrder:k,field:e,className:"visits-table__header-icon"})};return Object(M.useEffect)((function(){var e=function(){return m(h())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(M.useEffect)((function(){D(1),!U.current&&i([]),U.current=!1}),[y]),Object(a.jsxs)("table",{className:"table table-bordered table-hover table-sm table-responsive-sm visits-table",children:[Object(a.jsxs)("thead",{className:"visits-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsx)("th",{className:"".concat(b," text-center"),onClick:function(){return i(s.length<_.total?_.visitsGroups.flat():[])},children:Object(a.jsx)(I.a,{icon:V.h,className:P()({"text-primary":s.length>0})})}),A&&Object(a.jsxs)("th",{className:"".concat(b," text-center"),onClick:H("potentialBot"),children:[Object(a.jsx)(I.a,{icon:V.G}),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=_.visitsGroups[E-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=_.visitsGroups[E-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(De.a)(s),[e]))},children:[Object(a.jsx)("td",{className:"text-center",children:r&&Object(a.jsx)(I.a,{icon:V.h,className:"text-primary"})}),A&&Object(a.jsx)("td",{className:"text-center",children:e.potentialBot&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{icon:V.G,id:"botIcon".concat(t)}),Object(a.jsx)(Cr.a,{placement:"right",target:"botIcon".concat(t),children:"Potentially a visit from a bot or crawler"})]})}),Object(a.jsx)("td",{children:Object(a.jsx)(Sr,{date:e.date})}),Object(a.jsx)("td",{children:e.country}),Object(a.jsx)("td",{children:e.city}),Object(a.jsx)("td",{children:e.browser}),Object(a.jsx)("td",{children:e.os}),Object(a.jsx)("td",{children:e.referer}),j&&Object(a.jsx)("td",{children:e.visitedUrl})]},t)}))]}),_.total>20&&Object(a.jsx)("tfoot",{children:Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan: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)(ja,{pagesCount:Math.ceil(_.total/20),currentPage:E,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:lr(F+1)})," to"," ",Object(a.jsx)("b",{children:lr(Object(sr.a)(L,_.total))})," of"," ",Object(a.jsx)("b",{children:lr(_.total)})]})})]})})})})]})},va=r(618),fa=r(599),ma=r(600),xa=r(601),ga=function(){return Object(a.jsx)(va.a,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})},pa=function(e){return 0===e.length?{}:e.length>1?{bounds:e.map(Object(O.a)("latLong"))}:{zoom:10,center:Object(p.a)(e,1)[0].latLong}},ya=function(e){var t=e.toggle,r=e.isOpen,n=e.title,c=e.locations,s=void 0===c?[]:c;return Object(a.jsx)(Dr.a,{toggle:t,isOpen:r,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:Object(a.jsxs)(Vr.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)(fa.a,Object(d.a)(Object(d.a)({},pa(s)),{},{children:[Object(a.jsx)(ga,{}),s.map((function(e,t){var r=e.cityName,n=e.latLong,c=e.count;return Object(a.jsx)(ma.a,{position:n,children:Object(a.jsxs)(xa.a,{children:[Object(a.jsx)("b",{children:c})," visit",c>1?"s":""," from ",Object(a.jsx)("b",{children:r})]})},t)}))]}))]})})},Sa=function(e){var t=e.modalTitle,r=e.activeCities,n=e.locations,c=void 0===n?[]:n,s=Object(K.e)(),i=Object(p.a)(s,4),o=i[0],l=i[2],u=i[3],d=Object(K.e)(),j=Object(p.a)(d,3),b=j[0],h=j[1],O=j[2],v=Object(M.useState)([]),f=Object(p.a)(v,2),m=f[0],x=f[1],g=Object(M.useRef)(),y=function(e){return function(){x(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:g,onClick:function(){if(!r)return x(c),void l();O()},children:Object(a.jsx)(I.a,{icon:V.x})}),Object(a.jsx)(Cr.a,{placement:"left",target:function(){return g.current},children:"Show in map"}),Object(a.jsx)(q.a,{isOpen:b,toggle:h,inNavbar:!0,children:Object(a.jsxs)(Q.a,{right:!0,children:[Object(a.jsx)(W.a,{onClick:y(!1),children:"Show all locations"}),Object(a.jsx)(W.a,{onClick:y(!0),children:"Show locations in current page"})]})}),Object(a.jsx)(ya,{toggle:u,isOpen:o,title:t,locations:m})]})},Ca=r(602),Na=function(e){return e.hasOwnProperty("visitedUrl")},ka=Object(F.a)(Object(Ca.a)((function(e){return Na(e.visit)?"orphanVisits":"regularVisits"})),(function(e){return Object(d.a)({orphanVisits:[],regularVisits:[]},e)})),wa=function(e,t){return Object(Lc.a)(Object(O.a)(t),e)},_a=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)&&le(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)&&le(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}},Ua=function(e,t){return!Object(C.a)(e)&&Object(Ar.c)(e[t])},Ta=function(e){return"number"===typeof e?e:e?parseFloat(e):0},Ra=function(e){return function(t,r){var n=Ua(r,e)?r[e]:"Unknown";t[n]=(t[n]||0)+1}},Ea=Ra("country"),Da=Ra("city"),La=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),Ea(e.countries,t),Da(e.cities,t),function(e,t){if(Ua(t,"city")&&"Unknown"!==t.city){var r=t.city,n=t.latitude,c=t.longitude,a=e[r]||{cityName:r,count:0,latLong:[Ta(n),Ta(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:{}})},Va=Object(Kn.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(Ar.c)(e))return{browser:zc,os:zc};var t=Wc.a.parse(e),r=t.browser.name,n=t.os.name;return{os:null!==n&&void 0!==n?n:zc,browser:r&&Qc.includes(r)?r:zc}}(t)),{},{referer:Kc(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 Na(e)?Object(d.a)(Object(d.a)({},i),{},{type:e.type,visitedUrl:e.visitedUrl}):i})),Ia=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(Ar.c)(n),onClick:function(){return t({})},children:Object(a.jsx)("i",{children:"Clear filters"})})]})},Fa=function(e){var t,r,n=e.chart.config,c=null!==(t=n.data)&&void 0!==t?t:{},s=c.labels,i=void 0===s?[]:s,o=c.datasets,l=void 0===o?[]:o,u=Object(p.a)(l,1)[0].backgroundColor,d=(null!==(r=n.options)&&void 0!==r?r:{}).defaultColor;return Object(a.jsx)("ul",{className:"doughnut-chart-legend",children:i.map((function(e,t){var r;return Object(a.jsxs)("li",{className:"doughnut-chart-legend__item d-flex",children:[Object(a.jsx)("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:null!==(r=u[t])&&void 0!==r?r:d}}),Object(a.jsx)("small",{className:"doughnut-chart-legend__item-text flex-fill",children:e})]},e)}))})},Aa=function(e){return[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Object(ea.h)()?ea.e:ea.f,borderWidth:2}]},Ma=Object(M.memo)((function(e){var t=e.stats,r=Object(M.useState)(),n=Object(p.a)(r,2),c=n[0],s=n[1],i=Object(Ve.a)(t),o=Object(Ie.a)(t),l={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:$c}}}},u=function(e,t){return{labels:e,datasets:Aa(t)}}(i,o);return Object(a.jsxs)("div",{className:"row",children:[Object(a.jsx)("div",{className:"col-sm-12 col-md-7",children:Object(a.jsx)(Ec.b,{height:300,data:u,options:l,ref:function(e){s(null!==e&&void 0!==e?e:void 0)}})}),Object(a.jsx)("div",{className:"col-sm-12 col-md-5",children:c&&Object(a.jsx)(Fa,{chart:c})})]})})),Ga=r(603),Pa=function(e){var t=e.title,r=e.footer,n=e.children;return Object(a.jsxs)(Fe.a,{children:[Object(a.jsx)(hc.a,{className:"chart-card__header",children:"function"===typeof t?t():t}),Object(a.jsx)(Oc.a,{children:n}),r&&Object(a.jsx)(Ga.a,{className:"chart-card__footer--sticky",children:r})]})},Ba=function(e){var t=e.title,r=e.stats;return Object(a.jsx)(Pa,{title:t,children:Object(a.jsx)(Ma,{stats:r})})},Ha=r(128),Wa=r(611),qa=r(604),za=function(e){var t=e.toggleClassName,r=e.ranges,n=e.value,c=e.setValue;return Object(a.jsxs)(Ae.a,{children:[Object(a.jsx)(z.a,{caret:!0,color:"link",className:t,children:"Paginate"}),Object(a.jsxs)(Q.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"})})]})]})},Qa=function(e){return e.startsWith("hidden")?"":e},Ka=function(e,t,r){var n={data:e,label:r?"Non-selected":"Visits",backgroundColor:ea.d,borderColor:ea.c,borderWidth:2};return t.every((function(e){return 0===e}))?[n]:[n,{label:null!==r&&void 0!==r?r:"Selected",data:t,backgroundColor:ea.b,borderColor:ea.a,borderWidth:2}]},Ja=function(e,t){return function(r){var n=Object(p.a)(r,1)[0];t&&n&&t(e[n.index])}},Za=function(e){var t=e.stats,r=e.highlightedStats,n=e.highlightedLabel,c=e.onClick,s=e.max,i=Object(Ve.a)(t).map(Qa),o=Object(Ie.a)(function(e){return!!e&&Object.keys(e).length>0}(r)?Object(Ve.a)(r).reduce((function(e,t){return e[t]&&(e[t]-=r[t]),e}),Object(d.a)({},t)):t),l=Jc(null!==r&&void 0!==r?r:{},i),u={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:function(e){return""!==e.label},callbacks:{label:Xc}}},scales:{x:{beginAtZero:!0,stacked:!0,max:s,ticks:{precision:0,callback:lr}},y:{stacked:!0}},onHover:Yc,indexAxis:"y"},j=function(e,t,r,n){return{labels:e,datasets:Ka(t,r,n)}}(i,o,l,n),b=function(e){return e.length>20?10*e.length:void 0}(i),h=function(e){return Object(a.jsx)(Ec.a,{data:j,options:u,height:b,getElementAtEvent:Ja(i,c)},"".concat(b,"_").concat(e))};return Object(a.jsxs)(a.Fragment,{children:[void 0!==r&&h("with_stats"),void 0===r&&h("without_stats")]})},Ya=function(e){return"String"===Object(Ha.a)(e)?Object(Wa.a)(e):e},Xa=function(e){return Object(p.a)(e,1)[0]},$a=function(e){return Object(p.a)(e,2)[1]},es=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(y.a)(e,["stats","highlightedStats","title","sortingItems","extraHeaderContent","withPagination"]),u=Object(M.useState)({}),j=Object(p.a)(u,2),b=j[0],h=j[1],O=Object(M.useState)(1),v=Object(p.a)(O,2),f=v[0],m=v[1],x=Object(M.useState)(50),g=Object(p.a)(x,2),S=g[0],C=g[1],N=function(e){var t=e[f-1];if(f0?r:void 0,c),w=k.currentPageStats,_=k.currentPageHighlightedStats,U=k.pagination,T=k.max,R=Object.keys(w);return Object(a.jsx)(Pa,{title:function(){return Object(a.jsxs)(a.Fragment,{children:[n,Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(Be,{isButton:!1,right:!0,items:c,order:b,onChange:function(e,t){h({field:e,dir:t}),m(1)}})}),o&&Object.keys(t).length>50&&Object(a.jsx)("div",{className:"float-right",children:Object(a.jsx)(za,{toggleClassName:"btn-sm p-0 mr-3",ranges:[50,100,200,500],value:S,setValue:function(e){C(e),m(1)}})}),s&&Object(a.jsx)("div",{className:"float-right",children:s(U?R:void 0)})]})},footer:U,children:Object(a.jsx)(Za,Object(d.a)({stats:w,highlightedStats:_,max:T},l))})},ts={byTime:{title:"By time",subPath:"",icon:V.d},byContext:{title:"By context",subPath:"/by-context",icon:V.g},byLocation:{title:"By location",subPath:"/by-location",icon:V.x},list:{title:"List",subPath:"/list",icon:V.w}},rs=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)(I.a,{icon:n}),Object(a.jsx)("span",{className:"ml-2 d-none d-sm-inline",children:r})]})},ns=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=c.visits,m=c.loading,x=c.loadingLarge,g=c.error,y=c.errorData,S=c.progress,C=c.fallbackInterval,k=Object(M.useState)(null!==(t=null!==C&&void 0!==C?C:null===(r=u.visits)||void 0===r?void 0:r.defaultInterval)&&void 0!==t?t:"last30Days"),w=Object(p.a)(k,2),_=w[0],U=w[1],T=Object(M.useState)(pe(_)),R=Object(p.a)(T,2),E=R[0],D=R[1],L=Object(M.useState)([]),F=Object(p.a)(L,2),A=F[0],G=F[1],B=Object(M.useState)(),H=Object(p.a)(B,2),W=H[0],q=H[1],z=Object(M.useState)({}),Q=Object(p.a)(z,2),K=Q[0],J=Q[1],Z=Object(Mt.a)(h),Y=Object(M.useRef)(!0),X=function(e){var t=l?"?domain=".concat(l):"";return e?"".concat(o).concat(e).concat(t):"".concat(o).concat(t)},$=Object(M.useMemo)((function(){return Va(f)}),[f]),ee=Object(M.useMemo)((function(){return La($)}),[$]),te=ee.os,re=ee.browsers,ne=ee.referrers,ce=ee.countries,ae=ee.cities,se=ee.citiesForMap,ie=ee.visitedUrls,oe=Object(Ie.a)(se),le=function(e){tt=void 0,G(e)},ue=function(e){return function(t){var r="".concat(e,"_").concat(t);tt===r?(G([]),q(void 0),tt=void 0):(G($.filter(Object(_c.a)(e,t))),q(t),tt=r)}};Object(M.useEffect)((function(){return i}),[]),Object(M.useEffect)((function(){s({dateRange:E,filter:K},Y.current),Y.current=!1}),[E,K]),Object(M.useEffect)((function(){C&&U(C)}),[C]);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)(Ue,{updatable:!0,disabled:m,initialDateRange:_,defaultText:"All visits",onDatesChange:D})}),Object(a.jsx)(Ia,{className:"ml-0 ml-md-2 mt-3 mt-md-0",isOrphanVisits:v,botsSupported:Z,selected:K,onChange:J})]})}),f.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)(Kr.a,{outline:!0,disabled:0===A.length,className:"btn-md-block mr-2",onClick:function(){return le([])},children:["Clear selection ",A.length>0&&Object(a.jsxs)(a.Fragment,{children:["(",lr(A.length),")"]})]}),Object(a.jsxs)(Kr.a,{outline:!0,color:"primary",className:"btn-md-block",onClick:function(){return j($)},children:[Object(a.jsx)(I.a,{icon:V.q})," Export (",lr($.length),")"]})]})})]})}),Object(a.jsx)("section",{className:"mt-3",children:x?Object(a.jsxs)(bn.a,{loading:!0,children:["This is going to take a while... :S",Object(a.jsx)(Tc.a,{value:S,striped:100===S,className:"mt-3"})]}):m?Object(a.jsx)(bn.a,{loading:!0}):g?Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{errorData:y,fallbackMessage:"An error occurred while loading visits :("})}):Object(N.a)(f)?Object(a.jsx)(bn.a,{children:"There are no visits matching current filter :("}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(Fe.a,{className:"visits-stats__nav p-0 overflow-hidden",body:!0,children:Object(a.jsx)(Rc.a,{pills:!0,fill:!0,children:Object.entries(ts).map((function(e){var t=Object(p.a)(e,2),r=t[0],n=t[1];return Object(a.jsx)(rs,Object(d.a)(Object(d.a)({},n),{},{to:X(n.subPath)}),r)}))})}),Object(a.jsx)(Mr.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:$,highlightedVisits:A,highlightedLabel:W,setSelectedVisits:le})})}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(ts.byContext.subPath),children:[Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ba,{title:"Operating systems",stats:te})}),Object(a.jsx)("div",{className:P()("mt-3 col-lg-6",{"col-xl-4":!v}),children:Object(a.jsx)(Ba,{title:"Browsers",stats:re})}),Object(a.jsx)("div",{className:P()("mt-3",{"col-xl-4":!v,"col-lg-6":v}),children:Object(a.jsx)(es,{title:"Referrers",stats:ne,withPagination:!1,highlightedStats:wa(A,"referer"),highlightedLabel:W,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:ue("referer")})}),v&&Object(a.jsx)("div",{className:"mt-3 col-lg-6",children:Object(a.jsx)(es,{title:"Visited URLs",stats:ie,highlightedLabel:W,highlightedStats:wa(A,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:ue("visitedUrl")})})]}),Object(a.jsxs)(b.b,{exact:!0,path:"".concat(o).concat(ts.byLocation.subPath),children:[Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(es,{title:"Countries",stats:ce,highlightedStats:wa(A,"country"),highlightedLabel:W,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:ue("country")})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3",children:Object(a.jsx)(es,{title:"Cities",stats:ae,highlightedStats:wa(A,"city"),highlightedLabel:W,extraHeaderContent:function(e){return oe.length>0&&Object(a.jsx)(Sa,{modalTitle:"Cities",locations:oe,activeCities:e})},sortingItems:{name:"City name",amount:"Visits amount"},onClick:ue("city")})})]}),Object(a.jsx)(b.b,{exact:!0,path:"".concat(o).concat(ts.list.subPath),children:Object(a.jsx)("div",{className:"col-12",children:Object(a.jsx)(Oa,{visits:$,selectedVisits:A,setSelectedVisits:le,isOrphanVisits:v,selectedServer:h})})}),Object(a.jsx)(b.a,{to:o})]})})]})})]})},cs=function(e){var t=e.exportVisits;return We((function(e){var r=e.history.goBack,n=e.match,c=n.params,s=n.url,i=e.location.search,o=e.shortUrlVisits,l=e.shortUrlDetail,u=e.getShortUrlVisits,j=e.getShortUrlDetail,b=e.cancelGetShortUrlVisits,h=e.settings,O=e.selectedServer,v=c.shortCode,f=Object(k.a)(i).domain;return Object(M.useEffect)((function(){j(v,f)}),[]),Object(a.jsx)(ns,{getVisits:function(e,t){return u(v,Object(d.a)(Object(d.a)({},_a(e)),{},{domain:f}),t)},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)(wc,{shortUrlDetail:l,shortUrlVisits:o,goBack:r})})}),(function(e){var t=e.match;return[qe.shortUrlVisits(t.params.shortCode)]}))},as=r(616),ss=5e3,is=function(e){return e.currentPage>=e.pagesCount},os=function(e,t){return 100*t/e},ls=function(){var e=Object(x.a)(m.a.mark((function e(t,r,n,c,a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a({type:c.start}),i=function(){var e=Object(x.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(x.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,ss).then(Object(O.a)("data")));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then(as.a));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(x.a)(m.a.mark((function e(t){var r,n,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,!s()){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,i(t[r]);case 5:if(n=e.sent,a({type:c.progress,progress:os(t.length,r+2)}),!(r0&&void 0!==d[0]?d[0]:1,e.next=3,t(r,ss);case 3:if(n=e.sent,s=n.pagination,i=n.data,s&&!is(s)){e.next=8;break}return e.abrupt("return",i);case 8:return l=Object(cr.a)(2,s.pagesCount+1),u=Object(da.a)(4,l),s.pagesCount-1>4&&a({type:c.large}),e.t0=i,e.next=14,o(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,Promise.all([l(),r()]);case 7:u=e.sent,j=Object(p.a)(u,2),b=j[0],h=j[1],a(!b.length&&h?{type:c.fallbackToInterval,fallbackInterval:ye(h.date)}:Object(d.a)(Object(d.a)({},n),{},{visits:b,type:c.finish})),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),a({type:c.error,errorData:pt(e.t0)});case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t,r,n,c,a,s){return e.apply(this,arguments)}}(),us=function(e,t){return e?Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t({page:1,itemsPerPage:1}).then((function(e){return e.data[0]})));case 1:case"end":return e.stop()}}),e)}))):Object(x.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(void 0));case 1:case"end":return e.stop()}}),e)})))},ds="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START",js="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR",bs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS",hs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_LARGE",Os="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL",vs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED",fs="shlink/shortUrlVisits/GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL",ms={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},xs=jt((rt={},Object(u.a)(rt,ds,(function(){return Object(d.a)(Object(d.a)({},ms),{},{loading:!0})})),Object(u.a)(rt,js,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},ms),{},{error:!0,errorData:r})})),Object(u.a)(rt,bs,(function(e,t){var r=t.visits,n=t.query,c=t.shortCode,a=t.domain;return Object(d.a)(Object(d.a)({},e),{},{visits:r,shortCode:c,domain:a,query:n,loading:!1,error:!1})})),Object(u.a)(rt,hs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(rt,Os,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(rt,vs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(rt,fs,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(rt,xt,(function(e,t){var r=t.createdVisits,n=e.shortCode,c=e.domain,a=e.visits,s=e.query,i=void 0===s?{}:s,o=i.startDate,l=i.endDate,u=r.filter((function(e){var t=e.shortUrl,r=e.visit;return t&&mt(t,n,c)&&je(r.date,o,l)})).map((function(e){return e.visit}));return 0===u.length?e:Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(u),Object(De.a)(a))})})),rt),ms),gs=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getShortUrlVisits,l=function(){var e=Object(x.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",o(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)}}(),u=us(n,function(){var e=Object(x.a)(m.a.mark((function e(n){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o(t,Object(d.a)(Object(d.a)({},n),{},{domain:r.domain})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().shortUrlVisits.cancelLoad},b={shortCode:t,query:r,domain:r.domain},h={start:ds,large:hs,finish:bs,error:js,progress:vs,fallbackToInterval:fs},c.abrupt("return",ls(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},ps=bt(Os),ys=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)(kc,{title:i,goBack:r,visits:c})},Ss=function(e,t){var r=t.exportVisits;return We((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)(ns,{getVisits:function(e,t){return o(b,_a(e),t)},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)(ys,{tagVisits:l,goBack:n,colorGenerator:e})})}),(function(){return[qe.visits]}))},Cs="shlink/tagVisits/GET_TAG_VISITS_START",Ns="shlink/tagVisits/GET_TAG_VISITS_ERROR",ks="shlink/tagVisits/GET_TAG_VISITS",ws="shlink/tagVisits/GET_TAG_VISITS_LARGE",_s="shlink/tagVisits/GET_TAG_VISITS_CANCEL",Us="shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED",Ts="shlink/tagVisits/GET_TAG_VISITS_FALLBACK_TO_INTERVAL",Rs={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Es=jt((nt={},Object(u.a)(nt,Cs,(function(){return Object(d.a)(Object(d.a)({},Rs),{},{loading:!0})})),Object(u.a)(nt,Ns,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Rs),{},{error:!0,errorData:r})})),Object(u.a)(nt,ks,(function(e,t){var r=t.visits,n=t.tag,c=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,tag:n,query:c,loading:!1,error:!1})})),Object(u.a)(nt,ws,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(nt,_s,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(nt,Us,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(nt,Ts,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(nt,xt,(function(e,t){var r=t.createdVisits,n=e.tag,c=e.visits,a=e.query,s=void 0===a?{}:a,i=s.startDate,o=s.endDate,l=r.filter((function(e){var t=e.shortUrl,r=e.visit;return(null===t||void 0===t?void 0:t.tags.includes(n))&&je(r.date,i,o)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(l),Object(De.a)(c))})})),nt),Rs),Ds=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getTagVisits,l=function(){var e=Object(x.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",o(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)}}(),u=us(n,function(){var e=Object(x.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",o(t,r));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),j=function(){return s().tagVisits.cancelLoad},b={tag:t,query:r},h={start:Cs,large:ws,finish:ks,error:Ns,progress:Us,fallbackToInterval:Ts},c.abrupt("return",ls(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},Ls=bt(_s),Vs=function(e){var t=e.orphanVisits,r=e.goBack,n=t.visits;return Object(a.jsx)(kc,{title:"Orphan visits",goBack:r,visits:n})},Is=function(e){var t=e.exportVisits;return We((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)(ns,{getVisits:function(e,t){var r;return c(_a(e),null===(r=e.filter)||void 0===r?void 0:r.orphanVisitsType,t)},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)(Vs,{orphanVisits:s,goBack:r})})}),(function(){return[qe.orphanVisits]}))},Fs="shlink/orphanVisits/GET_ORPHAN_VISITS_START",As="shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR",Ms="shlink/orphanVisits/GET_ORPHAN_VISITS",Gs="shlink/orphanVisits/GET_ORPHAN_VISITS_LARGE",Ps="shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL",Bs="shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED",Hs="shlink/orphanVisits/GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL",Ws={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},qs=jt((ct={},Object(u.a)(ct,Fs,(function(){return Object(d.a)(Object(d.a)({},Ws),{},{loading:!0})})),Object(u.a)(ct,As,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Ws),{},{error:!0,errorData:r})})),Object(u.a)(ct,Ms,(function(e,t){var r=t.visits,n=t.query;return Object(d.a)(Object(d.a)({},e),{},{visits:r,query:n,loading:!1,error:!1})})),Object(u.a)(ct,Gs,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loadingLarge:!0})})),Object(u.a)(ct,Ps,(function(e){return Object(d.a)(Object(d.a)({},e),{},{cancelLoad:!0})})),Object(u.a)(ct,Bs,(function(e,t){var r=t.progress;return Object(d.a)(Object(d.a)({},e),{},{progress:r})})),Object(u.a)(ct,Hs,(function(e,t){var r=t.fallbackInterval;return Object(d.a)(Object(d.a)({},e),{},{fallbackInterval:r})})),Object(u.a)(ct,xt,(function(e,t){var r=t.createdVisits,n=e.visits,c=e.query,a=void 0===c?{}:c,s=a.startDate,i=a.endDate,o=r.filter((function(e){var t=e.visit;return je(t.date,s,i)})).map((function(e){return e.visit}));return Object(d.a)(Object(d.a)({},e),{},{visits:[].concat(Object(De.a)(o),Object(De.a)(n))})})),ct),Ws),zs=function(e,t){return!t||t===e.type},Qs=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){var c=Object(x.a)(m.a.mark((function c(a,s){var i,o,l,u,j,b,h;return m.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=e(s),o=i.getOrphanVisits,l=function(){var e=Object(x.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",o(Object(d.a)(Object(d.a)({},t),{},{page:n,itemsPerPage:c})).then((function(e){var t=e.data.filter((function(e){return Na(e)&&zs(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)}}(),u=us(n,o),j=function(){return s().orphanVisits.cancelLoad},b={query:t},h={start:Fs,large:Gs,finish:Ms,error:As,progress:Bs,fallbackToInterval:Hs},c.abrupt("return",ls(l,u,b,h,a,j));case 7:case"end":return c.stop()}}),c)})));return function(e,t){return c.apply(this,arguments)}}()}},Ks=bt(Ps),Js="shlink/visitsOverview/GET_OVERVIEW_START",Zs="shlink/visitsOverview/GET_OVERVIEW_ERROR",Ys="shlink/visitsOverview/GET_OVERVIEW",Xs={visitsCount:0,orphanVisitsCount:0,loading:!1,error:!1},$s=jt((at={},Object(u.a)(at,Js,(function(){return Object(d.a)(Object(d.a)({},Xs),{},{loading:!0})})),Object(u.a)(at,Zs,(function(){return Object(d.a)(Object(d.a)({},Xs),{},{error:!0})})),Object(u.a)(at,Ys,(function(e,t){var r=t.visitsCount,n=t.orphanVisitsCount;return Object(d.a)(Object(d.a)({},Xs),{},{visitsCount:r,orphanVisitsCount:n})})),Object(u.a)(at,xt,(function(e,t){var r=e.visitsCount,n=e.orphanVisitsCount,c=void 0===n?0:n,a=Object(y.a)(e,["visitsCount","orphanVisitsCount"]),s=t.createdVisits,i=ka(s),o=i.regularVisits,l=i.orphanVisits;return Object(d.a)(Object(d.a)({},a),{},{visitsCount:r+o.length,orphanVisitsCount:c+l.length})})),at),Xs),ei=function(e){return function(){return function(){var t=Object(x.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:Js}),t.prev=1,c=e(n),a=c.getVisitsOverview,t.next=5,a();case 5:s=t.sent,r(Object(d.a)({type:Ys},s)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),r({type:Zs});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}()}},ti=function e(t,r){var n=this;Object(g.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(Sc.a)(n.window,r,e)}}},ri=function(e,t){e.serviceFactory("MapModal",(function(){return ya})),e.serviceFactory("ShortUrlVisits",cs,"VisitsExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings","selectedServer"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",Ss,"ColorGenerator","VisitsExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings","selectedServer"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Is,"VisitsExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings","selectedServer"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",(function(){return n})),e.service("VisitsExporter",ti,"window","csvjson"),e.serviceFactory("getShortUrlVisits",gs,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",(function(){return ps})),e.serviceFactory("getTagVisits",Ds,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",(function(){return Ls})),e.serviceFactory("getOrphanVisits",Qs,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",(function(){return Ks})),e.serviceFactory("createNewVisits",(function(){return gt})),e.serviceFactory("loadVisitsOverview",ei,"buildShlinkApiClient")},ni=r(294),ci=r.n(ni),ai=function(e){var t=e.tag,r=e.colorGenerator;return Object(a.jsx)("div",{style:{backgroundColor:r.getColorForKey(t)},className:"tag-bullet"})},si=function(e){return{id:e,name:e}},ii=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(M.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)(ci.a,{tags:c.map(si),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(si),suggestionComponent:function(t){var r=t.item;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(ai,{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(De.a)(c);t.splice(e,1),s(t)},onAddition:function(e){var t=e.name;return s(Object(De.a)(new Set([].concat(Object(De.a)(c),Object(De.a)(t.toLowerCase().split(","))))))}})}},oi=r(553),li=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=n.displayed,l=n.toggle,u=Object(K.e)(),d=Object(p.a)(u,2),j=d[0],b=d[1],h=Object(K.e)(),O=Object(p.a)(h,2),f=O[0],m=O[1],x=Object(K.e)(),g=Object(p.a)(x,3),y=g[0],S=g[2],C=Object(M.useRef)(),N=Object(v.a)(s);return Object(M.useEffect)((function(){var e;(e=C.current)&&e.scrollWidth>e.clientWidth&&S()}),[C.current]),Object(a.jsxs)(Fe.a,{className:"tag-card",children:[Object(a.jsxs)(hc.a,{className:"tag-card__header",children:[Object(a.jsx)(Kr.a,{color:"link",size:"sm",className:"tag-card__btn tag-card__btn--last",onClick:b,children:Object(a.jsx)(I.a,{icon:V.Q})}),Object(a.jsx)(Kr.a,{color:"link",size:"sm",className:"tag-card__btn",onClick:m,children:Object(a.jsx)(I.a,{icon:V.C})}),Object(a.jsxs)("h5",{className:"tag-card__tag-title text-ellipsis",title:y?c.tag:void 0,ref:function(e){C.current=null!==e&&void 0!==e?e:void 0},children:[Object(a.jsx)(ai,{tag:c.tag,colorGenerator:r}),Object(a.jsx)("span",{className:"tag-card__tag-name",onClick:l,children:c.tag})]})]}),Object(a.jsx)(oi.a,{isOpen:i,children:Object(a.jsxs)(Oc.a,{className:"tag-card__body",children:[Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center mb-1",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.v,className:"mr-2"}),"Short URLs"]}),Object(a.jsx)("b",{children:lr(c.shortUrls)})]}),Object(a.jsxs)(o.b,{to:"/server/".concat(N,"/tag/").concat(c.tag,"/visits"),className:"btn btn-outline-secondary btn-block d-flex justify-content-between align-items-center",children:[Object(a.jsxs)("span",{className:"text-ellipsis",children:[Object(a.jsx)(I.a,{icon:V.p,className:"mr-2"}),"Visits"]}),Object(a.jsx)("b",{children:lr(c.visits)})]})]})}),Object(a.jsx)(e,{tag:c.tag,toggle:b,isOpen:j}),Object(a.jsx)(t,{tag:c.tag,toggle:m,isOpen:f})]})}},ui=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(x.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)(Dr.a,{toggle:r,isOpen:n,centered:!0,children:[Object(a.jsx)(Lr.a,{toggle:r,children:Object(a.jsx)("span",{className:"text-danger",children:"Delete tag"})}),Object(a.jsxs)(Vr.a,{children:["Are you sure you want to delete tag ",Object(a.jsx)("b",{children:t}),"?",l&&Object(a.jsx)(Pr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Br,{errorData:u,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),Object(a.jsxs)(Ir.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"})]})]})},di=r(607),ji=r(306),bi=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(M.useState)(r),u=Object(p.a)(l,2),d=u[0],j=u[1],b=Object(M.useState)(t(r)),h=Object(p.a)(b,2),O=h[0],v=h[1],f=Object(K.e)(),g=Object(p.a)(f,4),y=g[0],S=g[1],C=g[3],N=o.editing,k=o.error,w=o.errorData,_=Object(Ar.b)(Object(x.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)(Dr.a,{isOpen:i,toggle:c,centered:!0,onClosed:C,children:Object(a.jsxs)("form",{onSubmit:_,children:[Object(a.jsx)(Lr.a,{toggle:c,children:"Edit tag"}),Object(a.jsxs)(Vr.a,{children:[Object(a.jsxs)("div",{className:"input-group",children:[Object(a.jsx)("div",{className:"input-group-prepend",id:"colorPickerBtn",onClick:S,children:Object(a.jsx)("div",{className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:O,borderColor:O},children:Object(a.jsx)(I.a,{icon:V.A,className:"edit-tag-modal__color-icon"})})}),Object(a.jsx)(di.a,{isOpen:y,toggle:S,target:"colorPickerBtn",placement:"right",children:Object(a.jsx)(ji.a,{color:O,disableAlpha:!0,onChange:function(e){var t=e.hex;return v(t)}})}),Object(a.jsx)(Xr.a,{value:d,placeholder:"Tag",required:!0,onChange:function(e){var t=e.target;return j(t.value)}})]}),k&&Object(a.jsx)(Pr,{type:"error",small:!0,className:"mt-2",children:Object(a.jsx)(Br,{errorData:w,fallbackMessage:"Something went wrong while editing the tag :("})})]}),Object(a.jsxs)(Ir.a,{children:[Object(a.jsx)(Kr.a,{type:"button",color:"link",onClick:c,children:"Cancel"}),Object(a.jsx)(Kr.a,{color:"primary",disabled:N,children:N?"Saving...":"Save"})]})]})})}},hi={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Oi=function(e){var t,r=e.mode,n=e.onChange,c=e.renderTitle;return Object(a.jsxs)(J,{text:null!==(t=null===c||void 0===c?void 0:c(r))&&void 0!==t?t:"Display mode: ".concat(r),children:[Object(a.jsxs)(W.a,{active:"cards"===r,onClick:function(){return n("cards")},children:[Object(a.jsx)(I.a,{icon:V.O,fixedWidth:!0,className:"mr-1"})," Cards"]}),Object(a.jsxs)(W.a,{active:"list"===r,onClick:function(){return n("list")},children:[Object(a.jsx)(I.a,{icon:V.c,fixedWidth:!0,className:"mr-1"})," List"]})]})},vi=function(e,t){return We((function(r){var n,c,s=r.filterTags,i=r.forceListTags,o=r.tagsList,l=r.selectedServer,u=r.settings,d=Object(M.useState)(null!==(n=null===(c=u.ui)||void 0===c?void 0:c.tagsMode)&&void 0!==n?n:"cards"),j=Object(p.a)(d,2),b=j[0],h=j[1],O=Object(M.useState)({}),v=Object(p.a)(O,2),f=v[0],m=v[1],x=Object(F.a)((function(){return o.filteredTags.map((function(e){var t,r,n,c;return{tag:e,shortUrls:null!==(t=null===(r=o.stats[e])||void 0===r?void 0:r.shortUrlsCount)&&void 0!==t?t:0,visits:null!==(n=null===(c=o.stats[e])||void 0===c?void 0:c.visitsCount)&&void 0!==n?n:0}}))}),(function(e){return Pe(e,f)}));if(Object(M.useEffect)((function(){i()}),[]),o.loading)return Object(a.jsx)(bn.a,{loading:!0});if(o.error)return Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{errorData:o.errorData,fallbackMessage:"Error loading tags :("})});var g=function(e){return function(){var t=Ge(e,f.field,f.dir);m({field:t?e:void 0,dir:t})}};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:s}),Object(a.jsxs)(Mr.a,{className:"mb-3",children:[Object(a.jsx)("div",{className:"col-lg-6",children:Object(a.jsx)(Oi,{mode:b,onChange:h})}),Object(a.jsx)("div",{className:"col-lg-6 mt-3 mt-lg-0",children:Object(a.jsx)(Be,{items:hi,order:f,onChange:function(e,t){return m({field:e,dir:t})}})})]}),function(){if(o.filteredTags.length<1)return Object(a.jsx)(bn.a,{children:"No tags found"});var r=x();return"cards"===b?Object(a.jsx)(e,{sortedTags:r,selectedServer:l}):Object(a.jsx)(t,{sortedTags:r,selectedServer:l,currentOrder:f,orderByColumn:g})}()]})}),(function(){return[qe.visits]}))},fi="shlink/deleteTag/DELETE_TAG_START",mi="shlink/deleteTag/DELETE_TAG_ERROR",xi="shlink/deleteTag/DELETE_TAG",gi="shlink/deleteTag/TAG_DELETED",pi=jt((st={},Object(u.a)(st,fi,(function(){return{deleting:!0,error:!1}})),Object(u.a)(st,mi,(function(e,t){return{deleting:!1,error:!0,errorData:t.errorData}})),Object(u.a)(st,xi,(function(){return{deleting:!1,error:!1}})),st),{deleting:!1,error:!1}),yi=function(e){return function(t){return function(){var r=Object(x.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:fi}),a=e(c),s=a.deleteTags,r.prev=2,r.next=5,s([t]);case 5:n({type:xi}),r.next=12;break;case 8:throw r.prev=8,r.t0=r.catch(2),n({type:mi,errorData:pt(r.t0)}),r.t0;case 12:case"end":return r.stop()}}),r,null,[[2,8]])})));return function(e,t){return r.apply(this,arguments)}}()}},Si=function(e){return{type:gi,tag:e}},Ci="shlink/editTag/EDIT_TAG_START",Ni="shlink/editTag/EDIT_TAG_ERROR",ki="shlink/editTag/EDIT_TAG",wi="shlink/editTag/TAG_EDITED",_i=jt((it={},Object(u.a)(it,Ci,(function(e){return Object(d.a)(Object(d.a)({},e),{},{editing:!0,error:!1})})),Object(u.a)(it,Ni,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},e),{},{editing:!1,error:!0,errorData:r})})),Object(u.a)(it,ki,(function(e,t){return Object(d.a)(Object(d.a)({},Object(h.a)(["oldName","newName"],t)),{},{editing:!1,error:!1})})),it),{oldName:"",newName:"",editing:!1,error:!1}),Ui=function(e,t){return function(r,n,c){return function(){var a=Object(x.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:Ci}),o=e(i),l=o.editTag,a.prev=2,a.next=5,l(r,n);case 5:t.setColorForKey(n,c),s({type:ki,oldName:r,newName:n}),a.next=13;break;case 9:throw a.prev=9,a.t0=a.catch(2),s({type:Ni,errorData:pt(a.t0)}),a.t0;case 13:case"end":return a.stop()}}),a,null,[[2,9]])})));return function(e,t){return a.apply(this,arguments)}}()}},Ti=function(e,t,r){return{type:wi,oldName:e,newName:t,color:r}},Ri="shlink/tagsList/LIST_TAGS_START",Ei="shlink/tagsList/LIST_TAGS_ERROR",Di="shlink/tagsList/LIST_TAGS",Li="shlink/tagsList/FILTER_TAGS",Vi={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Ii=function(e,t){return function(r){return r===e?t:r}},Fi=function(e,t){return Object(S.a)((function(e){return e===t}),e)},Ai=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}),{}))},Mi=jt((ot={},Object(u.a)(ot,Ri,(function(){return Object(d.a)(Object(d.a)({},Vi),{},{loading:!0})})),Object(u.a)(ot,Ei,(function(e,t){var r=t.errorData;return Object(d.a)(Object(d.a)({},Vi),{},{error:!0,errorData:r})})),Object(u.a)(ot,Di,(function(e,t){var r=t.tags,n=t.stats;return Object(d.a)(Object(d.a)({},Vi),{},{stats:n,tags:r,filteredTags:r})})),Object(u.a)(ot,gi,(function(e,t){var r=t.tag;return Object(d.a)(Object(d.a)({},e),{},{tags:Fi(e.tags,r),filteredTags:Fi(e.filteredTags,r)})})),Object(u.a)(ot,wi,(function(e,t){var r=t.oldName,n=t.newName;return Object(d.a)(Object(d.a)({},e),{},{tags:e.tags.map(Ii(r,n)).sort(),filteredTags:e.filteredTags.map(Ii(r,n)).sort()})})),Object(u.a)(ot,Li,(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)(ot,xt,(function(e,t){var r,n,c=t.createdVisits;return Object(d.a)(Object(d.a)({},e),{},{stats:(r=Ai(c),n=e.stats,r.reduce((function(e,t){var r=Object(p.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)))})})),ot),Vi),Gi=function(e){return{type:Li,searchTerm:e}},Pi=Math.ceil,Bi=function(e){return function(t){var r=t.sortedTags,n=t.selectedServer,c=Object(M.useState)(),s=Object(p.a)(c,2),i=s[0],o=s[1],l=r.length,u=Object(da.a)(Pi(l/4),r);return Object(a.jsx)(Mr.a,{children:u.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,selectedServer:n,displayed:i===t.tag,toggle:function(){return o(i!==t.tag?t.tag:void 0)}},t.tag)}))},r)}))})}},Hi=function(e){return function(t){var r,n=t.sortedTags,c=t.selectedServer,s=t.location,i=t.orderByColumn,o=t.currentOrder,l=Object(M.useRef)(!0),u=Object(k.a)(s.search).page,d=void 0===u?1:u,j=Object(K.b)("page",Number(d)),b=Object(p.a)(j,2),h=b[0],O=b[1],v=Object(da.a)(20,n),f=v.length>1,m=null!==(r=v[h-1])&&void 0!==r?r:[];return Object(M.useEffect)((function(){!l.current&&O(1),l.current=!1}),[n]),Object(M.useEffect)((function(){scrollTo(0,0)}),[h]),Object(a.jsxs)(Gr.a,{bodyClassName:f?"pb-1":"",children:[Object(a.jsxs)("table",{className:"table table-hover mb-0",children:[Object(a.jsxs)("thead",{className:"responsive-table__header",children:[Object(a.jsxs)("tr",{children:[Object(a.jsxs)("th",{className:"tags-table__header-cell",onClick:i("tag"),children:["Tag ",Object(a.jsx)(ze,{currentOrder:o,field:"tag"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("shortUrls"),children:["Short URLs ",Object(a.jsx)(ze,{currentOrder:o,field:"shortUrls"})]}),Object(a.jsxs)("th",{className:"tags-table__header-cell text-lg-right",onClick:i("visits"),children:["Visits ",Object(a.jsx)(ze,{currentOrder:o,field:"visits"})]}),Object(a.jsx)("th",{className:"tags-table__header-cell"})]}),Object(a.jsx)("tr",{children:Object(a.jsx)("th",{colSpan:4,className:"p-0 border-top-0"})})]}),Object(a.jsxs)("tbody",{children:[0===m.length&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:4,className:"text-center",children:"No results found"})}),m.map((function(t){return Object(a.jsx)(e,{tag:t,selectedServer:c},t.tag)}))]})]}),f&&Object(a.jsx)("div",{className:"sticky-card-paginator",children:Object(a.jsx)(ja,{pagesCount:v.length,currentPage:h,setCurrentPage:O})})]},h)}},Wi=function(e,t,r){return function(n){var c=n.tag,s=n.selectedServer,i=Object(K.e)(),l=Object(p.a)(i,2),u=l[0],d=l[1],j=Object(K.e)(),b=Object(p.a)(j,2),h=b[0],O=b[1],f=Object(K.e)(),m=Object(p.a)(f,2),x=m[0],g=m[1],y=Object(v.a)(s);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsxs)("th",{className:"responsive-table__cell","data-th":"Tag",children:[Object(a.jsx)(ai,{tag:c.tag,colorGenerator:r})," ",c.tag]}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Short URLs",children:Object(a.jsx)(o.b,{to:"/server/".concat(y,"/list-short-urls/1?tags=").concat(encodeURIComponent(c.tag)),children:lr(c.shortUrls)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right","data-th":"Visits",children:Object(a.jsx)(o.b,{to:"/server/".concat(y,"/tag/").concat(c.tag,"/visits"),children:lr(c.visits)})}),Object(a.jsx)("td",{className:"responsive-table__cell text-lg-right",children:Object(a.jsxs)(Tr,{toggle:g,isOpen:x,children:[Object(a.jsxs)(W.a,{onClick:O,children:[Object(a.jsx)(I.a,{icon:V.C,fixedWidth:!0,className:"mr-1"})," Edit"]}),Object(a.jsxs)(W.a,{onClick:d,children:[Object(a.jsx)(I.a,{icon:V.Q,fixedWidth:!0,className:"mr-1"})," Delete"]})]})}),Object(a.jsx)(t,{tag:c.tag,toggle:O,isOpen:h}),Object(a.jsx)(e,{tag:c.tag,toggle:d,isOpen:u})]})}},qi=function(e,t){e.serviceFactory("TagsSelector",ii,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("TagCard",li,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("DeleteTagConfirmModal",(function(){return ui})),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",bi,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsCards",Bi,"TagCard"),e.serviceFactory("TagsTableRow",Wi,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Hi,"TagsTableRow"),e.decorator("TagsTable",b.h),e.serviceFactory("TagsList",vi,"TagsCards","TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"]));var r=function(e){return function(t){return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(){return function(){var r=Object(x.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:Ri}),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:Di}),r.next=19;break;case 16:r.prev=16,r.t0=r.catch(4),n({type:Ei,errorData:pt(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 Gi})),e.serviceFactory("tagDeleted",(function(){return Si})),e.serviceFactory("tagEdited",(function(){return Ti})),e.serviceFactory("deleteTag",yi,"buildShlinkApiClient"),e.serviceFactory("editTag",Ui,"buildShlinkApiClient","ColorGenerator")},zi=r(299),Qi="shlink/mercure/GET_MERCURE_INFO_START",Ki="shlink/mercure/GET_MERCURE_INFO_ERROR",Ji="shlink/mercure/GET_MERCURE_INFO",Zi=jt((lt={},Object(u.a)(lt,Qi,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!0,error:!1})})),Object(u.a)(lt,Ki,(function(e){return Object(d.a)(Object(d.a)({},e),{},{loading:!1,error:!0})})),Object(u.a)(lt,Ji,(function(e,t){return Object(d.a)(Object(d.a)({},t),{},{loading:!1,error:!1})})),lt),{loading:!0,error:!1}),Yi=function(e){return function(){return function(){var t=Object(x.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:Qi}),c=n(),a=c.settings,s=e(n),i=s.mercureInfo,a.realTimeUpdates.enabled){t.next=6;break}return r({type:Ki}),t.abrupt("return");case 6:return t.prev=6,t.next=9,i();case 9:o=t.sent,r(Object(d.a)({type:Ji,interval:a.realTimeUpdates.interval},o)),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(6),r({type:Ki});case 16:case"end":return t.stop()}}),t,null,[[6,13]])})));return function(e,r){return t.apply(this,arguments)}}()}},Xi=function(e){e.serviceFactory("loadMercureInfo",Yi,"buildShlinkApiClient")},$i=function(e){var t,r=e.settings.realTimeUpdates,n=e.toggleRealTimeUpdates,c=e.setRealTimeUpdatesInterval;return Object(a.jsxs)(Gr.a,{title:"Real-time updates",className:"h-100",children:[Object(a.jsx)(Qr.a,{children:Object(a.jsxs)(Zc,{checked:r.enabled,onChange:n,children:["Enable or disable real-time updates.",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)(Qr.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)(Xr.a,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:(t=r.interval,t?"".concat(t):""),onChange:function(e){var t=e.target;return c(Number(t.value))}}),r.enabled&&Object(a.jsxs)("small",{className:"form-text text-muted",children:[void 0!==r.interval&&r.interval>0&&Object(a.jsxs)("span",{children:["Updates will be reflected in the UI every ",Object(a.jsx)("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},eo=function(e){var t=e.items;return Object(a.jsx)(a.Fragment,{children:t.map((function(e,t){return Object(a.jsx)(Mr.a,{children:e.map((function(e,t){return Object(a.jsx)("div",{className:"col-lg-6 mb-3",children:e},t)}))},t)}))})},to=function(e,t,r,n){return function(){return Object(a.jsx)(Cn.a,{children:Object(a.jsx)(eo,{items:[[Object(a.jsx)(r,{}),Object(a.jsx)(n,{})],[Object(a.jsx)(t,{}),Object(a.jsx)(e,{})]]})})}},ro=r(614),no="shlink/realTimeUpdates/SET_SETTINGS",co=jt(Object(u.a)({},no,(function(e,t){return Object(ro.a)(e,Object(qn.a)("type",t))})),{realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"}}),ao=function(e){return{type:no,realTimeUpdates:{enabled:e}}},so=function(e){return{type:no,realTimeUpdates:{interval:e}}},io=function(e){return{type:no,shortUrlCreation:e}},oo=function(e){return{type:no,ui:e}},lo=function(e){return{type:no,visits:e}},uo=function(e){return"includes"===e?"Suggest tags including input":"Suggest tags starting with input"},jo=function(e){var t,r,n,c,s,i=e.settings,o=e.setShortUrlCreationSettings,l=null!==(t=i.shortUrlCreation)&&void 0!==t?t:{validateUrls:!1},u=function(e){return function(){return o(Object(d.a)(Object(d.a)({},null!==l&&void 0!==l?l:{validateUrls:!1}),{},{tagFilteringMode:e}))}};return Object(a.jsxs)(Gr.a,{title:"Short URLs form",className:"h-100",children:[Object(a.jsx)(Qr.a,{children:Object(a.jsxs)(Zc,{checked:null!==(r=l.validateUrls)&&void 0!==r&&r,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{validateUrls:e}))},children:["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:l.validateUrls?"checked":"unchecked"}),"."]})]})}),Object(a.jsx)(Qr.a,{children:Object(a.jsxs)(Zc,{checked:null===(n=l.forwardQuery)||void 0===n||n,onChange:function(e){return o(Object(d.a)(Object(d.a)({},l),{},{forwardQuery:e}))},children:["Make all new short URLs forward their query params to the long URL.",Object(a.jsxs)("small",{className:"form-text text-muted",children:["The initial state of the ",Object(a.jsx)("b",{children:"Forward query params on redirect"})," checkbox will be ",Object(a.jsx)("b",{children:null===(c=l.forwardQuery)||void 0===c||c?"checked":"unchecked"}),"."]})]})}),Object(a.jsxs)(Qr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Tag suggestions search mode:"}),Object(a.jsxs)(J,{text:uo(l.tagFilteringMode),children:[Object(a.jsx)(W.a,{active:!l.tagFilteringMode||"startsWith"===l.tagFilteringMode,onClick:u("startsWith"),children:uo("startsWith")}),Object(a.jsx)(W.a,{active:"includes"===l.tagFilteringMode,onClick:u("includes"),children:uo("includes")})]}),Object(a.jsx)("small",{className:"form-text text-muted",children:(s=l.tagFilteringMode,"includes"===s?Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"including"})," provided input."]}):Object(a.jsxs)(a.Fragment,{children:["The list of suggested tags will contain those ",Object(a.jsx)("b",{children:"starting with"})," provided input."]}))})]})]})},bo=function(e){var t,r,n=e.settings.ui,c=e.setUiSettings;return Object(a.jsxs)(Gr.a,{title:"User interface",className:"h-100",children:[Object(a.jsxs)(Qr.a,{children:[Object(a.jsx)(I.a,{icon:"dark"===(null===n||void 0===n?void 0:n.theme)?V.z:V.L,className:"user-interface__theme-icon"}),Object(a.jsx)(Zc,{checked:"dark"===(null===n||void 0===n?void 0:n.theme),onChange:function(e){var t=e?"dark":"light";c(Object(d.a)(Object(d.a)({},n),{},{theme:t})),Object(ea.g)(t)},children:"Use dark theme."})]}),Object(a.jsxs)(Qr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default display mode when managing tags:"}),Object(a.jsx)(Oi,{mode:null!==(t=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==t?t:"cards",renderTitle:function(e){return Object(Ar.a)(e)},onChange:function(e){return c(Object(d.a)(Object(d.a)({},null!==n&&void 0!==n?n:{theme:"light"}),{},{tagsMode:e}))}}),Object(a.jsxs)("small",{className:"form-text text-muted",children:["Tags will be displayed as ",Object(a.jsx)("b",{children:null!==(r=null===n||void 0===n?void 0:n.tagsMode)&&void 0!==r?r:"cards"}),"."]})]})]})},ho=function(e){var t,r=e.onChange,n=e.active,c=e.allText;return Object(a.jsx)(J,{text:null!==(t=me(n))&&void 0!==t?t:c,children:Object(a.jsx)(_e,{allText:c,active:n,onChange:r})})},Oo=function(e){var t,r,n=e.settings,c=e.setVisitsSettings;return Object(a.jsx)(Gr.a,{title:"Visits",className:"h-100",children:Object(a.jsxs)(Qr.a,{className:"mb-0",children:[Object(a.jsx)("label",{children:"Default interval to load on visits sections:"}),Object(a.jsx)(ho,{allText:"All visits",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})}})]})})},vo=function(e,t){e.serviceFactory("Settings",to,"RealTimeUpdates","ShortUrlCreation","UserInterface","Visits"),e.decorator("Settings",dc.a),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdates",(function(){return $i})),e.decorator("RealTimeUpdates",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreation",(function(){return jo})),e.decorator("ShortUrlCreation",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterface",(function(){return bo})),e.decorator("UserInterface",t(["settings"],["setUiSettings"])),e.serviceFactory("Visits",(function(){return Oo})),e.decorator("Visits",t(["settings"],["setVisitsSettings"])),e.serviceFactory("toggleRealTimeUpdates",(function(){return ao})),e.serviceFactory("setRealTimeUpdatesInterval",(function(){return so})),e.serviceFactory("setShortUrlCreationSettings",(function(){return io})),e.serviceFactory("setUiSettings",(function(){return oo})),e.serviceFactory("setVisitsSettings",(function(){return lo}))},fo="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",mo=function(e){return function(t,r){return function(){var n=Object(x.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:fo,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:pt(n.t0)});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(e,t){return n.apply(this,arguments)}}()}},xo="shlink/domainsList/LIST_DOMAINS_START",go="shlink/domainsList/LIST_DOMAINS_ERROR",po="shlink/domainsList/LIST_DOMAINS",yo="shlink/domainsList/FILTER_DOMAINS",So={domains:[],filteredDomains:[],loading:!1,error:!1},Co=function(e,t){return function(r){return r.domain!==e?r:Object(d.a)(Object(d.a)({},r),{},{redirects:t})}},No=jt((ut={},Object(u.a)(ut,xo,(function(){return Object(d.a)(Object(d.a)({},So),{},{loading:!0})})),Object(u.a)(ut,go,(function(e){var t=e.errorData;return Object(d.a)(Object(d.a)({},So),{},{error:!0,errorData:t})})),Object(u.a)(ut,po,(function(e,t){var r=t.domains,n=t.defaultRedirects;return Object(d.a)(Object(d.a)({},So),{},{domains:r,filteredDomains:r,defaultRedirects:n})})),Object(u.a)(ut,yo,(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)(ut,fo,(function(e,t){var r=t.domain,n=t.redirects;return Object(d.a)(Object(d.a)({},e),{},{domains:e.domains.map(Co(r,n)),filteredDomains:e.filteredDomains.map(Co(r,n))})})),ut),So),ko=function(e){return function(){return function(){var t=Object(x.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:return r({type:xo}),c=e(n),a=c.listDomains,t.prev=2,t.next=5,a();case 5:s=t.sent,i=s.data,o=s.defaultRedirects,r({type:po,domains:i,defaultRedirects:o}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(2),r({type:go,errorData:pt(t.t0)});case 14:case"end":return t.stop()}}),t,null,[[2,11]])})));return function(e,r){return t.apply(this,arguments)}}()}},wo=function(e){return{type:yo,searchTerm:e}},_o=r(609),Uo=r(619),To=function(e){var t=e.listDomains,r=e.value,n=e.domainsList,c=e.onChange,s=Object(K.e)(),i=Object(p.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(M.useEffect)((function(){t()}),[]),o?Object(a.jsxs)(_o.a,{children:[Object(a.jsx)(Xr.a,{value:r,placeholder:"Domain",onChange:function(e){return c(e.target.value)}}),Object(a.jsxs)(Uo.a,{addonType:"append",children:[Object(a.jsx)(Kr.a,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn",onClick:Object(F.a)(b,u),children:Object(a.jsx)(I.a,{icon:V.R})}),Object(a.jsx)(Cr.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(F.a)(b,l),children:Object(a.jsx)("i",{children:"New domain"})})]})},Ro=function(e){var t=e.isLast,r=Object(y.a)(e,["isLast"]);return Object(a.jsx)(Nn,Object(d.a)(Object(d.a)({},r),{},{required:!1,type:"url",placeholder:"No redirect",className:t?"mb-0":""}))},Eo=function(e){var t,r,n,c,s,i,o=e.isOpen,l=e.toggle,u=e.domain,d=e.editDomainRedirects,j=Object(M.useState)(null!==(t=null===(r=u.redirects)||void 0===r?void 0:r.baseUrlRedirect)&&void 0!==t?t:""),b=Object(p.a)(j,2),h=b[0],O=b[1],v=Object(M.useState)(null!==(n=null===(c=u.redirects)||void 0===c?void 0:c.regular404Redirect)&&void 0!==n?n:""),f=Object(p.a)(v,2),g=f[0],y=f[1],S=Object(M.useState)(null!==(s=null===(i=u.redirects)||void 0===i?void 0:i.invalidShortUrlRedirect)&&void 0!==s?s:""),C=Object(p.a)(S,2),N=C[0],k=C[1],w=Object(Ar.b)(Object(x.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(Ar.d)(h),regular404Redirect:Object(Ar.d)(g),invalidShortUrlRedirect:Object(Ar.d)(N)}).then(l));case 1:case"end":return e.stop()}}),e)}))));return Object(a.jsx)(Dr.a,{isOpen:o,toggle:l,centered:!0,children:Object(a.jsxs)("form",{onSubmit:w,children:[Object(a.jsxs)(Lr.a,{toggle:l,children:["Edit redirects for ",Object(a.jsx)("b",{children:u.domain})]}),Object(a.jsxs)(Vr.a,{children:[Object(a.jsxs)(Ro,{value:h,onChange:O,children:[Object(a.jsxs)(sn,{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)(Ro,{value:g,onChange:y,children:[Object(a.jsxs)(sn,{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)(Ro,{value:N,isLast:!0,onChange:k,children:[Object(a.jsx)(sn,{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)(Ir.a,{children:[Object(a.jsx)(Kr.a,{color:"link",type:"button",onClick:l,children:"Cancel"}),Object(a.jsx)(Kr.a,{color:"primary",children:"Save"})]})]})})},Do=function(e){var t=e.fallback;return Object(a.jsxs)("span",{className:"text-muted",children:[!t&&Object(a.jsx)("small",{children:"No redirect"}),t&&Object(a.jsxs)(a.Fragment,{children:[t," ",Object(a.jsx)("small",{children:"(as fallback)"})]})]})},Lo=function(){return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I.a,{fixedWidth:!0,icon:V.h,className:"text-primary",id:"defaultDomainIcon"}),Object(a.jsx)(Cr.a,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]})},Vo=function(e){var t,r,n,c=e.domain,s=e.editDomainRedirects,i=e.defaultRedirects,o=e.selectedServer,l=Object(K.e)(),u=Object(p.a)(l,2),d=u[0],j=u[1],b=c.domain,h=c.isDefault,O=c.redirects,v=!h||Object(Mt.c)(o);return Object(a.jsxs)("tr",{className:"responsive-table__row",children:[Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Is default domain",children:h?Object(a.jsx)(Lo,{}):""}),Object(a.jsx)("th",{className:"responsive-table__cell","data-th":"Domain",children:b}),Object(a.jsx)("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:null!==(t=null===O||void 0===O?void 0:O.baseUrlRedirect)&&void 0!==t?t:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.regular404Redirect)&&void 0!==r?r:Object(a.jsx)(Do,{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===O||void 0===O?void 0:O.invalidShortUrlRedirect)&&void 0!==n?n:Object(a.jsx)(Do,{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:v?void 0:"defaultDomainBtn",children:Object(a.jsx)(Kr.a,{outline:!0,size:"sm",disabled:!v,onClick:v?j:void 0,children:Object(a.jsx)(I.a,{fixedWidth:!0,icon:v?V.m:V.b})})}),!v&&Object(a.jsxs)(Cr.a,{target:"defaultDomainBtn",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)(Eo,{domain:c,isOpen:d,toggle:j,editDomainRedirects:s})]})},Io=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect",""],Fo=function(e){var t,r=e.listDomains,n=e.domainsList,c=e.filterDomains,s=e.editDomainRedirects,i=e.selectedServer,o=n.filteredDomains,l=n.defaultRedirects,u=n.loading,d=n.error,j=n.errorData,b=null!==l&&void 0!==l?l:null===(t=o.find((function(e){return e.isDefault})))||void 0===t?void 0:t.redirects;if(Object(M.useEffect)((function(){r()}),[]),u)return Object(a.jsx)(bn.a,{loading:!0});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(B,{className:"mb-3",onChange:c}),d?Object(a.jsx)(Pr,{type:"error",children:Object(a.jsx)(Br,{errorData:j,fallbackMessage:"Error loading domains :("})}):Object(a.jsx)(Gr.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:Io.map((function(e,t){return Object(a.jsx)("th",{children:e},t)}))})}),Object(a.jsxs)("tbody",{children:[o.length<1&&Object(a.jsx)("tr",{children:Object(a.jsx)("td",{colSpan:Io.length,className:"text-center",children:"No results found"})}),o.map((function(e){return Object(a.jsx)(Vo,{domain:e,editDomainRedirects:s,defaultRedirects:b,selectedServer:i},e.domain)}))]})]})})]})},Ao=function(e,t){e.serviceFactory("DomainSelector",(function(){return To})),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",(function(){return Fo})),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects"])),e.serviceFactory("listDomains",ko,"buildShlinkApiClient"),e.serviceFactory("filterDomains",(function(){return wo})),e.serviceFactory("editDomainRedirects",mo,"buildShlinkApiClient")},Mo="shlink/appUpdates/APP_UPDATE_AVAILABLE",Go="shlink/appUpdates/RESET_APP_UPDATE",Po=jt((dt={},Object(u.a)(dt,Mo,(function(){return!0})),Object(u.a)(dt,Go,(function(){return!1})),dt),!1),Bo=bt(Mo),Ho=bt(Go),Wo=r(153),qo=r(610),zo=function(e){var t=e.isOpen,r=e.toggle,n=e.forceUpdate,c=Object(K.e)(),s=Object(p.a)(c,3),i=s[0],o=s[2];return Object(a.jsxs)(qo.a,{className:"app-update-banner",isOpen:t,toggle:r,tag:Gr.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)(Kr.a,{disabled:i,className:"ml-2",color:"secondary",size:"sm",onClick:function(){o(),n()},children:[!i&&Object(a.jsxs)(a.Fragment,{children:["Restart now ",Object(a.jsx)(I.a,{icon:V.M,className:"ml-1"})]}),i&&Object(a.jsx)(a.Fragment,{children:"Restarting..."})]})]})]})},Qo=r(33),Ko=function(){var e=Object(x.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(Qo.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)}}(),Jo=function(e,t,r,n,c,s,i,o){return function(l){var u=l.fetchServers,d=l.servers,j=l.settings,h=l.appUpdated,O=l.resetAppUpdate,v="/"===l.location.pathname;return Object(M.useEffect)((function(){var e,t;0===Object.keys(d).length&&u(),Object(ea.g)(null!==(e=null===(t=j.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:P()("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),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:"/manage-servers",component:i}),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:Wo.a})]})}),Object(a.jsx)("div",{className:"shlink-footer",children:Object(a.jsx)(o,{})})]}),Object(a.jsx)(zo,{isOpen:h,toggle:O,forceUpdate:Ko})]})}},Zo=function(e,t,r){e.serviceFactory("App",Jo,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.decorator("App",r),e.serviceFactory("appUpdateAvailable",(function(){return Bo})),e.serviceFactory("resetAppUpdate",(function(){return Ho}))},Yo=new j.a,Xo=Yo.container,$o=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)}}(Xo,t)))},el=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($o,{}))};Zo(Yo,el,b.h),Object(L.a)(Yo,el,b.h),D(Yo),pn(Yo,el,b.h),Nc(Yo,el,b.h),qi(Yo,el),ri(Yo,el),Object(zi.a)(Yo),Xi(Yo),vo(Yo,el),Ao(Yo,el);var tl=Xo,rl=r(302),nl=r(80),cl=r(223),al=Object(nl.c)({servers:$n,selectedServer:Bn,shortUrlsList:Kt,shortUrlsListParams:$t,shortUrlCreationResult:It,shortUrlDeletion:_t,shortUrlEdition:Ht,shortUrlVisits:xs,tagVisits:Es,orphanVisits:qs,shortUrlDetail:xn,tagsList:Mi,tagDelete:pi,tagEdit:_i,mercureInfo:Zi,settings:co,domainsList:No,visitsOverview:$s,appUpdated:Po}),sl=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||nl.d,il={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},ol=Object(nl.e)(al,Object(cl.load)(il),sl(Object(nl.a)(Object(cl.save)(il),rl.a))),ll=r(64),ul=r.n(ll),dl=r(303),jl=r(304),bl=r(305),hl=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 Ol(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(534),r(535);delete ul.a.Icon.Default.prototype._getIconUrl,ul.a.Icon.Default.mergeOptions({iconRetinaUrl:dl.a,iconUrl:jl.a,shadowUrl:bl.a});var vl=tl.App,fl=tl.ScrollToTop,ml=tl.ErrorHandler,xl=tl.appUpdateAvailable;Object(s.render)(Object(a.jsx)(i.a,{store:ol,children:Object(a.jsx)(o.a,{basename:l.a,children:Object(a.jsx)(ml,{children:Object(a.jsx)(fl,{children:Object(a.jsx)(vl,{})})})})}),document.getElementById("root")),function(e){if("serviceWorker"in navigator){var t;if(new URL(null!==(t="/shlink-web-client/feature/not-empty-resultsets")?t:"",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("/shlink-web-client/feature/not-empty-resultsets","/service-worker.js");hl?(!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()}))})):Ol(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")}))):Ol(t,e)}))}}({onUpdate:function(){ol.dispatch(xl())}})},54:function(e,t,r){"use strict";var n=r(0),c=r(541),a=r(316),s=r(8),i=r.n(s),o=r(11),l=r(12),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]})})})})}},60: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})}},70: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(542),a=r(547),s=r(31),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}}}},[[319,1,2]]]); +//# sourceMappingURL=main.de1f9f4b.chunk.js.map \ No newline at end of file diff --git a/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js.map b/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js.map new file mode 100644 index 00000000..d49c3c43 --- /dev/null +++ b/feature/not-empty-resultsets/static/js/main.de1f9f4b.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["servers/helpers/withoutSelectedServer.tsx","utils/helpers/files.ts","common/img/ShlinkLogo.tsx","servers/helpers/withSelectedServer.tsx","common/NotFound.tsx","servers/ServersListGroup.tsx","utils/helpers/hooks.ts","common/services/provideServices.ts","common/ScrollToTop.tsx","common/ErrorHandler.tsx","common/services/ImageDownloader.ts","utils/services/provideServices.ts","servers/data/index.ts","utils/services/LocalStorage.ts","utils/services/ColorGenerator.ts","common/ShlinkVersions.tsx","common/ShlinkVersionsContainer.tsx","utils/utils.ts","common/MainHeader.tsx","common/Home.tsx","common/MenuLayout.tsx","common/AsideMenu.tsx","utils/SimpleCard.tsx","utils/helpers/features.ts","utils/theme/index.ts","utils/helpers/query.ts","utils/SearchField.tsx","api/services/ShlinkApiClient.ts","api/services/ShlinkApiClientBuilder.ts","api/services/provideServices.ts","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/helpers/hooks.ts","short-urls/SearchBar.tsx","utils/helpers/ordering.ts","utils/SortingDropdown.tsx","mercure/helpers/boundToMercureHub.tsx","mercure/helpers/index.ts","mercure/helpers/Topics.ts","utils/table/TableOrderIcon.tsx","utils/helpers/redux.ts","visits/VisitsStats.tsx","short-urls/helpers/index.ts","visits/reducers/visitCreation.ts","api/utils/index.ts","short-urls/reducers/shortUrlDeletion.ts","short-urls/reducers/shortUrlCreation.ts","short-urls/reducers/shortUrlEdition.ts","short-urls/reducers/shortUrlsList.ts","short-urls/reducers/shortUrlsListParams.ts","utils/helpers/numbers.ts","utils/helpers/pagination.ts","short-urls/Paginator.tsx","short-urls/ShortUrlsList.tsx","utils/CopyToClipboardIcon.tsx","utils/Time.tsx","short-urls/helpers/ShortUrlDetailLink.tsx","short-urls/helpers/ShortUrlVisitsCount.tsx","short-urls/helpers/ShortUrlsRow.tsx","utils/DropdownBtnMenu.tsx","short-urls/helpers/ShortUrlsRowMenu.tsx","short-urls/CreateShortUrl.tsx","utils/Result.tsx","api/ShlinkApiError.tsx","short-urls/helpers/DeleteShortUrlModal.tsx","short-urls/helpers/CreateShortUrlResult.tsx","short-urls/ShortUrlsTable.tsx","short-urls/helpers/qr-codes/QrFormatDropdown.tsx","short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.tsx","short-urls/helpers/QrCodeModal.tsx","utils/helpers/qrCodes.ts","utils/BooleanControl.tsx","utils/Checkbox.tsx","short-urls/UseExistingIfFoundInfoIcon.tsx","utils/InfoTooltip.tsx","short-urls/helpers/ShortUrlFormCheckboxGroup.tsx","short-urls/ShortUrlForm.tsx","short-urls/EditShortUrl.tsx","short-urls/reducers/shortUrlDetail.ts","short-urls/services/provideServices.ts","utils/FormGroupContainer.tsx","servers/helpers/ServerForm.tsx","servers/CreateServer.tsx","servers/ServersDropdown.tsx","servers/DeleteServerModal.tsx","servers/DeleteServerButton.tsx","servers/EditServer.tsx","servers/helpers/ImportServersBtn.tsx","servers/reducers/selectedServer.ts","servers/reducers/servers.ts","servers/reducers/remoteServers.ts","servers/helpers/ForServerVersion.tsx","servers/helpers/ServerError.tsx","servers/Overview.tsx","servers/ManageServers.tsx","servers/ManageServersRow.tsx","servers/ManageServersRowDropdown.tsx","servers/services/ServersImporter.ts","servers/services/ServersExporter.ts","servers/services/provideServices.ts","visits/VisitsHeader.tsx","visits/ShortUrlVisitsHeader.tsx","utils/helpers/visits.ts","utils/ToggleSwitch.tsx","utils/helpers/charts.ts","visits/charts/LineChartCard.tsx","common/SimplePaginator.tsx","visits/VisitsTable.tsx","visits/helpers/MapModal.tsx","visits/helpers/OpenMapModalBtn.tsx","visits/types/helpers.ts","visits/services/VisitsParser.ts","visits/helpers/VisitsFilterDropdown.tsx","visits/charts/DoughnutChartLegend.tsx","visits/charts/DoughnutChart.tsx","visits/charts/ChartCard.tsx","visits/charts/DoughnutChartCard.tsx","utils/PaginationDropdown.tsx","visits/charts/HorizontalBarChart.tsx","visits/charts/SortableBarChartCard.tsx","visits/ShortUrlVisits.tsx","visits/reducers/common.ts","visits/reducers/shortUrlVisits.ts","visits/TagVisitsHeader.tsx","visits/TagVisits.tsx","visits/reducers/tagVisits.ts","visits/OrphanVisitsHeader.tsx","visits/OrphanVisits.tsx","visits/reducers/orphanVisits.ts","visits/reducers/visitsOverview.ts","visits/services/VisitsExporter.ts","visits/services/provideServices.ts","tags/helpers/TagBullet.tsx","tags/helpers/TagsSelector.tsx","tags/TagCard.tsx","tags/helpers/DeleteTagConfirmModal.tsx","tags/helpers/EditTagModal.tsx","tags/data/TagsListChildrenProps.ts","tags/TagsModeDropdown.tsx","tags/TagsList.tsx","tags/reducers/tagDelete.ts","tags/reducers/tagEdit.ts","tags/reducers/tagsList.ts","tags/TagsCards.tsx","tags/TagsTable.tsx","tags/TagsTableRow.tsx","tags/services/provideServices.ts","mercure/reducers/mercureInfo.ts","mercure/services/provideServices.ts","settings/RealTimeUpdates.tsx","settings/Settings.tsx","settings/reducers/settings.ts","settings/ShortUrlCreation.tsx","settings/UserInterface.tsx","utils/dates/DateIntervalSelector.tsx","settings/Visits.tsx","settings/services/provideServices.ts","domains/reducers/domainRedirects.ts","domains/reducers/domainsList.ts","domains/DomainSelector.tsx","domains/helpers/EditDomainRedirectsModal.tsx","domains/DomainRow.tsx","domains/ManageDomains.tsx","domains/services/provideServices.ts","app/reducers/appUpdates.ts","common/AppUpdateBanner.tsx","utils/helpers/sw.ts","app/App.tsx","app/services/provideServices.ts","container/index.ts","reducers/index.ts","container/store.ts","serviceWorkerRegistration.ts","utils/helpers/leaflet.ts","index.tsx","utils/Message.tsx","common/NoMenuLayout.tsx","utils/helpers/version.ts"],"names":["withoutSelectedServer","WrappedComponent","props","useEffect","resetSelectedServer","saveUrl","url","filename","document","link","createElement","setAttribute","style","visibility","body","appendChild","click","removeChild","saveCsv","window","csv","blob","Blob","type","URL","createObjectURL","ShlinkLogo","color","MAIN_COLOR","className","viewBox","version","xmlns","fill","d","withSelectedServer","ServerError","selectServer","selectedServer","match","params","serverId","isNotFoundServer","loading","NotFound","to","children","ServerListItem","id","name","ListGroupItem","tag","Link","icon","chevronIcon","ServersListGroup","servers","embedded","length","ListGroup","classNames","map","useStateFlagTimeout","setTimeout","clearTimeout","initialValue","delay","useState","flag","setFlag","timeout","useRef","undefined","callback","current","useToggle","useSwipeable","showSidebar","hideSidebar","swipeMenuIfNoModalExists","e","event","composedPath","some","classList","contains","querySelector","useReactSwipeable","delta","onSwipedLeft","onSwipedRight","useQueryState","paramName","initialState","value","setValue","location","history","query","parseQuery","search","pushState","pathname","stringifyQuery","useEffectExceptFirstTime","deps","isFirstLoad","provideServices","bottle","connect","withRouter","constant","global","console","axios","service","ImageDownloader","serviceFactory","ScrollToTop","decorator","MainHeader","Home","MenuLayout","AsideMenu","ShlinkVersionsContainer","ErrorHandler","scrollTo","error","state","hasError","this","outline","onClick","reload","Component","imgUrl","get","responseType","data","localStorage","LocalStorage","ColorGenerator","hasServerData","server","apiKey","isServerWithId","hasOwnProperty","isReachableServer","getServerId","serverWithIdToServerData","omit","buildPath","path","key","item","getItem","JSON","parse","set","setItem","stringify","floor","Math","random","letters","normalizeKey","toLowerCase","trim","storage","colors","getColorForKey","normalizedKey","setColorForKey","rangeOf","join","normalizeVersion","pipe","versionToSemVer","versionToPrintable","VersionLink","project","href","ShlinkVersions","clientVersion","normalizedClientVersion","printableVersion","classes","size","mappingFn","startAt","range","hasValue","isNil","isEmpty","handleEventPreventingDefault","handler","preventDefault","nonEmptyValueOrNull","capitalize","charAt","toUpperCase","slice","ServersDropdown","isOpen","toggleOpen","close","settingsPath","toggleClass","Navbar","dark","fixed","expand","NavbarBrand","NavbarToggler","arrowIcon","Collapse","navbar","Nav","NavItem","NavLink","active","cogsIcon","serversList","values","hasServers","autoConnectServer","find","autoConnect","push","Card","Row","noGutters","faPlus","faExternalLinkAlt","TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","OrphanVisits","Overview","EditShortUrl","ManageDomains","sidebarVisible","toggleSidebar","addOrphanVisitsRoute","supportsOrphanVisits","addManageDomainsRoute","supportsDomainRedirects","burgerClasses","swipeableProps","burgerIcon","showOnMobile","exact","from","component","render","AsideMenuItem","rest","activeClassName","DeleteServerButton","hasId","addManageDomainsLink","asideClass","suffix","fixedWidth","overviewIcon","isActive","_","listIcon","createIcon","flip","tagsIcon","domainsIcon","editIcon","textClassName","SimpleCard","title","bodyClassName","serverMatchesVersions","versions","versionMatch","supportsQrCodeSizeInQuery","minVersion","supportsShortUrlTitle","supportsQrCodeMargin","supportsTagsInPatch","supportsBotVisits","supportsCrawlableVisits","supportsQrErrorCorrection","supportsForwardQuery","supportsDefaultDomainRedirectsEdition","MAIN_COLOR_ALPHA","HIGHLIGHTED_COLOR","HIGHLIGHTED_COLOR_ALPHA","PRIMARY_LIGHT_COLOR","PRIMARY_DARK_COLOR","changeThemeInMarkup","theme","html","getElementsByTagName","isDarkThemeEnabled","getAttribute","qs","ignoreQueryPrefix","arrayFormat","timer","buildShlinkBaseUrl","apiVersion","rejectNilProps","reject","normalizeOrderByInParams","orderBy","Object","keys","firstKey","firstValue","ShlinkApiClient","baseUrl","listShortUrls","a","performRequest","then","shortUrls","createShortUrl","options","filteredOptions","resp","getShortUrlVisits","shortCode","visits","getTagVisits","getOrphanVisits","getVisitsOverview","getShortUrl","domain","deleteShortUrl","updateShortUrlTags","tags","updateShortUrl","listTags","withStats","stats","deleteTags","editTag","oldName","newName","health","mercureInfo","listDomains","domains","editDomainRedirects","domainRedirects","method","headers","paramsSerializer","response","apiClients","buildShlinkApiClient","getStateOrSelectedServer","getState","isGetState","prop","Error","clientKey","SearchField","onChange","large","noBorder","searchTerm","setSearchTerm","resetTimer","searchTermChanged","newSearchTerm","placeholder","target","searchIcon","hidden","Tag","text","clearable","colorGenerator","onClose","backgroundColor","cursor","DropdownBtn","disabled","dropdownClassName","right","minWidth","toggle","toggleClasses","Dropdown","DropdownToggle","caret","DropdownMenu","isDateObject","date","formatDateFromFormat","theFormat","format","formatISO","formatIsoDate","formatInternational","formatDate","parseISO","stdParseISO","isBetween","start","end","isWithinInterval","isBeforeOrEqual","dateToCompare","isEqual","isBefore","dateRangeIsEmpty","dateRange","filter","Boolean","rangeIsInterval","INTERVAL_TO_STRING_MAP","today","yesterday","last7Days","last30Days","last90Days","last180Days","last365Days","all","DATE_INTERVALS","rangeOrIntervalToString","startDate","endDate","dateRangeToString","startOfDaysAgo","daysAgo","startOfDay","subDays","Date","endingToday","endOfDay","intervalToDateRange","dateInterval","dateToMatchingInterval","theDate","cond","T","DateInput","isClearable","selected","showCalendarIcon","ref","dateFormat","calendarIcon","input","focus","DateRangeRow","onStartDateChange","onEndDateChange","placeholderText","maxDate","minDate","DateIntervalDropdownItems","allText","DropdownItem","divider","interval","DateRangeSelector","onDatesChange","initialDateRange","defaultText","updatable","initialIntervalIsRange","activeInterval","setActiveInterval","activeDateRange","setActiveDateRange","updateDateRange","updateInterval","isDateInterval","header","useShortUrlsQuery","useMemo","extra","evolvedQuery","queryString","dateOrNull","SearchBar","toFirstPage","selectedTags","split","setDates","setSearch","removeTag","selectedTag","tagsList","determineOrderDir","currentField","newField","currentOrderDir","ASC","DESC","sortList","list","field","dir","sort","b","greaterThan","smallerThan","SortingDropdown","items","order","isButton","handleItemClick","fieldKey","newOrderDir","UncontrolledDropdown","toPairs","fieldValue","sortAscIcon","sortDescIcon","boundToMercureHub","getTopicsForProps","pendingUpdates","Set","createNewVisits","loadMercureInfo","closeEventSource","topics","onMessage","onTokenExpired","mercureHubUrl","token","onEventSourceMessage","onEventSourceError","status","subscriptions","topic","hubUrl","searchParams","append","es","EventSource","Authorization","onmessage","onerror","forEach","bindToMercureTopic","visit","add","setInterval","clear","clearInterval","Topics","TableOrderIcon","currentOrder","caretUpIcon","caretDownIcon","orphanVisits","shortUrlVisits","selectedBar","buildReducer","action","actionHandler","currentState","buildActionCreator","shortUrlMatches","shortUrl","CREATE_VISITS","createdVisits","parseApiError","isInvalidDeletionError","DELETE_SHORT_URL_START","DELETE_SHORT_URL_ERROR","SHORT_URL_DELETED","RESET_DELETE_SHORT_URL","errorData","dispatch","resetDeleteShortUrl","CREATE_SHORT_URL_START","CREATE_SHORT_URL_ERROR","CREATE_SHORT_URL","RESET_CREATE_SHORT_URL","result","saving","resetCreateShortUrl","EDIT_SHORT_URL_START","EDIT_SHORT_URL_ERROR","SHORT_URL_EDITED","editShortUrl","sendTagsSeparately","Promise","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","page","resetShortUrlParams","ceil","formatter","Intl","NumberFormat","prettify","number","Number","ELLIPSIS","progressivePagination","currentPage","pageCount","pages","max","min","unshift","pageIsEllipsis","pageNumber","prettifyPageNumber","keyForPage","index","Paginator","paginator","currentQueryString","pagesCount","urlForPage","Pagination","listClassName","PaginationItem","PaginationLink","previous","next","ShortUrlsTable","shortUrlsListParams","shortUrlsList","head","setOrder","refreshList","extraParams","handleOrderBy","addTag","newTag","itemsPerPage","orderByColumn","renderOrderIcon","onTagClick","CopyToClipboardIcon","onCopy","copyIcon","Time","relative","dateObject","dateTime","getUnixTime","formatDistance","buildUrl","ShortUrlDetailLink","ShortUrlVisitsCount","maxVisits","meta","visitsLink","prettifiedMaxVisits","tooltipRef","el","infoIcon","UncontrolledTooltip","placement","ShortUrlsRow","ShortUrlsRowMenu","copiedToClipboard","setCopiedToClipboard","setActive","isFirstRun","data-th","DropdownBtnMenu","ButtonDropdown","menuIcon","DeleteShortUrlModal","QrCodeModal","isQrModalOpen","toggleQrCode","isDeleteModalOpen","toggleDelete","pieChartIcon","qrIcon","deleteIcon","ShortUrlForm","CreateShortUrlResult","shortUrlCreationResult","basicMode","shortUrlCreationSettings","settings","shortUrlCreation","customSlug","shortCodeLength","validSince","validUntil","findIfExists","validateUrl","validateUrls","forwardQuery","getInitialState","mode","onSave","canBeClosed","Result","small","ShlinkApiError","fallbackMessage","detail","invalidElements","shortUrlDeletion","inputValue","setInputValue","handleDeleteUrl","catch","identity","Modal","centered","onSubmit","ModalHeader","ModalBody","ModalFooter","showCopyTooltip","setShowCopyTooltip","closeIcon","Tooltip","actionableFieldClasses","orderableColumnsClasses","tableClasses","supportsTitle","colSpan","QrFormatDropdown","setFormat","QrErrorCorrectionDropdown","errorCorrection","setErrorCorrection","imageDownloader","ForServerVersion","setSize","margin","setMargin","capabilities","useSizeInPath","marginIsSupported","errorCorrectionIsSupported","willRenderThreeControls","qrCodeUrl","buildQrCodeUrl","totalSize","modalSize","step","src","alt","Button","block","saveImage","downloadIcon","BooleanControl","checked","inline","uuid","typeClasses","display","htmlFor","Checkbox","InfoModal","UseExistingIfFoundInfoIcon","isModalOpen","toggleModal","InfoTooltip","ShortUrlFormCheckboxGroup","infoTooltip","normalizeTag","replace","toDate","dynamicColClasses","TagsSelector","DomainSelector","shortUrlData","setShortUrlData","isEdit","isBasicMode","hadTitleOriginally","resolveNewTitle","hasNewTitle","matcher","submit","renderOptionalInput","fromGroupProps","Input","renderDateInput","basicComponents","bsSize","required","showCustomizeCard","limitAccessCardClasses","showCrawlableControl","showForwardQueryControl","showBehaviorCard","extraChecksCardClasses","crawlable","goBack","shortUrlDetail","getShortUrlDetail","shortUrlEdition","savingError","savingErrorData","savingSucceeded","isSuccessful","isNotSuccessful","Message","faArrowLeft","GET_SHORT_URL_DETAIL_START","GET_SHORT_URL_DETAIL_ERROR","GET_SHORT_URL_DETAIL","FormGroupContainer","labelClassName","forId","FormGroup","ServerForm","initialValues","setName","setUrl","setApiKey","handleSubmit","ImportResult","CreateServer","ImportServersBtn","createServer","serversImported","setServersImported","errorImporting","setErrorImporting","NoMenuLayout","serverData","tooltipPlacement","onImport","onImportError","nav","inNavbar","serverIcon","plusIcon","DeleteServerModal","deleteServer","redirectHome","showModal","hideModal","EditServer","editServer","importServersFromFile","createServers","fileRef","files","importIcon","accept","SELECT_SERVER","RESET_SELECTED_SERVER","toSemVer","getServerVersion","memoizeWith","_serverId","serverNotFound","serverNotReachable","EDIT_SERVER","DELETE_SERVER","CREATE_SERVERS","SET_AUTO_CONNECT","newServers","dissoc","fromPairs","evaluatedServerId","serversListToMap","reduce","acc","setAutoConnect","responseToServersList","Array","isArray","fetchServers","homepage","remoteList","maxVersion","fullWidth","loadVisitsOverview","visitsOverview","loadingTags","loadingVisits","orphanVisitsCount","useHistory","CardTitle","CardText","CardHeader","CardBody","encodeURIComponent","ManageServers","serversExporter","ManageServersRow","allServers","setServersList","hasAutoConnect","exportServers","exportIcon","width","ManageServersRowDropdown","checkIcon","isMenuOpen","toggleMenu","serverUrl","isAutoConnect","autoConnectIcon","toggleOffIcon","toggleOnIcon","connectIcon","validateServer","validateServers","every","ServersImporter","csvJson","fileReaderFactory","file","reader","resolve","addEventListener","content","toString","toObject","readAsText","ServersExporter","csvjson","toCSV","FileReader","VisitsHeader","ShortUrlVisitsHeader","shortLink","longLink","visitsStatsTitle","DEFAULT","BROWSERS_WHITELIST","extractDomain","includes","fillTheGaps","labels","zipObj","ToggleSwitch","pointerOnHover","native","firstElement","renderChartLabel","dataset","formattedValue","label","renderPieChartLabel","STEPS_MAP","monthly","weekly","daily","hourly","STEP_TO_DURATION_MAP","hours","days","weeks","months","STEP_TO_DIFF_FUNC_MAP","differenceInHours","differenceInDays","differenceInWeeks","differenceInMonths","STEP_TO_DATE_FORMAT","firstWeekDay","startOfISOWeek","lastWeekDay","endOfISOWeek","groupVisitsByStep","countBy","generateLabelsAndGroupedVisits","groupedVisitsWithGaps","skipNoElements","diffFunc","newerDate","oldestDate","duration","num","generateLabels","generateDataset","tension","borderColor","selectedLabel","chartElementAtEvent","datasetsByPoint","setSelectedVisits","chart","LineChartCard","highlightedVisits","highlightedLabel","oldestVisitDate","now","always","determineInitialStep","setStep","skipNoVisits","toggleSkipNoVisits","visitsToDatasetGroups","reverse","groupedVisits","groupedHighlighted","generateChartDatasets","mainDataset","maintainAspectRatio","plugins","legend","tooltip","intersect","axis","callbacks","scales","y","beginAtZero","ticks","precision","x","onHover","renderLineChart","datasets","getElementAtEvent","entries","menuText","SimplePaginator","setCurrentPage","searchVisits","browser","os","referer","country","city","visitedUrl","visitMatchesSearch","calculateVisits","allVisits","sortedVisits","sortVisits","total","visitsGroups","splitEvery","VisitsTable","selectedVisits","matchMedia","isOrphanVisits","headerCellsClass","matchMobile","matches","isMobileDevice","setIsMobileDevice","resultSet","setPage","supportsBots","fullSizeColSpan","listener","removeEventListener","flat","botIcon","isSelected","v","potentialBot","OpenStreetMapTile","TileLayer","attribution","calculateMapProps","locations","bounds","zoom","center","latLong","MapModal","contentClassName","MapContainer","cityName","count","Marker","position","Popup","OpenMapModalBtn","modalTitle","activeCities","mapIsOpened","openMap","closeMap","dropdownIsOpened","toggleDropdown","openDropdown","locationsToShow","setLocationsToShow","buttonRef","openMapWithLocations","filtered","mapIcon","isOrphanVisit","groupNewVisitsByType","groupBy","newVisit","regularVisits","highlightedVisitsToStats","property","toApiParams","excludeBots","visitHasProperty","propertyName","optionalNumericToNumber","numeric","parseFloat","updateLocationsStatsForVisit","updateCountriesStatsForVisit","updateCitiesStatsForVisit","processStatsFromVisits","osStats","updateOsStatsForVisit","browsersStats","updateBrowsersStatsForVisit","browsers","referrersStats","updateReferrersStatsForVisit","referrers","countries","cities","citiesForMapStats","latitude","longitude","currentCity","updateCitiesForMapForVisit","citiesForMap","visitedUrlsStats","isNormalizedOrphanVisit","updateVisitedUrlsForVisit","visitedUrls","normalizeVisits","userAgent","visitLocation","common","bowser","parseUserAgent","countryName","VisitsFilterDropdown","botsSupported","orphanVisitsType","propsForOrphanVisitsTypeItem","DoughnutChartLegend","config","defaultColor","borderWidth","DoughnutChart","memo","chartRef","setChartRef","chartData","generateChartData","height","element","ChartCard","footer","CardFooter","DoughnutChartCard","PaginationDropdown","toggleClassName","ranges","Infinity","dropLabelIfHidden","startsWith","highlightedData","HorizontalBarChart","highlightedStats","statsAreDefined","highlightedKey","stacked","indexAxis","determineHeight","renderChartComponent","customKey","toLowerIfString","toLower","pickKeyFromPair","pickValueFromPair","SortableBarChartCard","sortingItems","extraHeaderContent","withPagination","setItemsPerPage","determineCurrentPagePairs","firstPageLength","i","sortedPairs","pairs","sortBy","getSortedPairsForStats","sortedKeys","sortedHighlightedPairs","currentPageStats","currentPageHighlightedStats","highlightedPages","determineStats","sections","byTime","subPath","faCalendarAlt","byContext","faChartPie","byLocation","faMapMarkedAlt","faList","VisitsNavLink","RouterNavLink","endsWith","VisitsStats","visitsInfo","getVisits","cancelGetVisits","exportCsv","loadingLarge","progress","fallbackInterval","defaultInterval","initialInterval","setInitialInterval","setDateRange","setHighlightedVisits","setHighlightedLabel","visitsFilter","setVisitsFilter","buildSectionUrl","normalizedVisits","mapLocations","highlightVisitsForProp","newSelectedBar","propEq","faFileDownload","Progress","striped","pills","section","amount","exportVisits","cancelGetShortUrlVisits","doIntervalFallback","ITEMS_PER_PAGE","isLastPage","calcProgress","getVisitsWithLoader","visitsLoader","lastVisitLoader","extraFinishActionData","actionMap","shouldCancel","loadVisitsInParallel","flatten","loadPagesBlocks","pagesBlocks","concat","loadVisits","pagesRange","fallbackToInterval","finish","lastVisitLoaderForLoader","loader","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","GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL","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","GET_TAG_VISITS_FALLBACK_TO_INTERVAL","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","GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL","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","TagCard","DeleteTagConfirmModal","EditTagModal","displayed","isEditModalOpen","toggleEdit","hasTitle","displayTitle","titleRef","scrollWidth","clientWidth","faLink","faEye","deleteTag","tagDelete","tagDeleted","deleting","doDelete","tagEdited","tagEdit","newTagName","setNewTagName","setColor","showColorPicker","toggleColorPicker","hideColorPicker","editing","saveTag","onClosed","colorIcon","Popover","disableAlpha","hex","TagsModeDropdown","renderTitle","cardsIcon","TagsCards","TagsTable","filterTags","forceListTags","ui","tagsMode","setMode","resolveSortedTags","filteredTags","shortUrlsCount","normalizedTags","sortedTags","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","tagStats","displayedTag","setDisplayedTag","tagsCount","tagsGroups","group","TagsTableRow","pageFromQuery","showPaginator","isDropdownOpen","listTagsActionFactory","force","processedStats","factory","GET_MERCURE_INFO_START","GET_MERCURE_INFO_ERROR","GET_MERCURE_INFO","realTimeUpdates","enabled","info","RealTimeUpdates","toggleRealTimeUpdates","setRealTimeUpdatesInterval","SettingsSections","child","subChild","subIndex","Settings","ShortUrlCreation","UserInterface","Visits","SET_SETTINGS","mergeDeepRight","setShortUrlCreationSettings","setUiSettings","setVisitsSettings","tagFilteringModeText","changeTagsFilteringMode","faMoon","faSun","useDarkTheme","DateIntervalSelector","EDIT_DOMAIN_REDIRECTS","redirects","LIST_DOMAINS_START","LIST_DOMAINS_ERROR","LIST_DOMAINS","FILTER_DOMAINS","filteredDomains","replaceRedirectsOnDomain","defaultRedirects","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","authority","canEditDomain","forbiddenIcon","resolvedDefaultRedirects","column","APP_UPDATE_AVAILABLE","RESET_APP_UPDATE","appUpdateAvailable","resetAppUpdate","AppUpdateBanner","forceUpdate","isUpdating","setUpdating","Alert","reloadIcon","navigator","serviceWorker","getRegistrations","registrations","registration","waiting","postMessage","App","appUpdated","isHome","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","getClassForType","default","getTextClassForType","preloader","spin","versionToMatch","matchesMinVersion","compare","versionIsValidSemVer","defaultValue"],"mappings":"qJAMO,SAASA,EAA8BC,GAC5C,OAAO,SAACC,GAKN,OAJAC,qBAAU,WACRD,EAAME,wBACL,IAEI,cAACH,EAAD,eAAsBC,O,iCCZjC,oEAAO,IAAMG,EAAU,SAAC,EAAsBC,EAAaC,GAAsB,IAAvDC,EAAsD,EAAt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ACzB,YAAak0B,EACb,yBAA0BA,IAG5B,OACE,cAAC,IAAD,CAAKvpB,WAAS,EAAC1M,UAAWA,EAA1B,SACE,qBAAKA,UAAW6J,EAAhB,SACE,cAAC,IAAD,CAAM7J,UAAWmhD,EAAgBzhD,GAAOT,MAAI,EAA5C,SACE,qBAAIe,UAAW+B,IAAW,mBAAoBs/C,EAAoB3hD,IAAlE,UACGoB,GAAW,cAAC,IAAD,CAAiBU,KAAM8/C,IAAWC,MAAI,IACjDzgD,GAAW,sBAAMd,UAAU,OAAhB,gBAAwBiB,QAAxB,IAAwBA,IAAY,gBAC9CH,GAAWG,a,2CCxCV+xB,IAFU,SAAC,GAAD,IAAG/xB,EAAH,EAAGA,SAAH,OAAkB,qBAAKjB,UAAU,+BAAf,SAA+CiB,M,gCCH1F,6IAiBa2O,EAAe,SAAC4xC,EAAD,GAAoF,IAAjDxrB,EAAgD,EAAhDA,WAAYlmB,EAAoC,EAApCA,WACzE,IAAK5F,YAASs3C,GACZ,OAAO,EAGT,IAAMC,GAAqB3xC,GAAc4xC,kBAAQF,EAAgB1xC,EAAY,MAG7E,QAF2BkmB,GAAc0rB,kBAAQF,EAAgBxrB,EAAY,QAEjDyrB,GAGxBE,EAAuBjtB,YAAYhJ,KAAU,SAACxrB,GAClD,IACE,OAAOwhD,kBAAQxhD,EAASA,EAAS,KACjC,MAAOiD,GACP,OAAO,MAIEkG,EAAqB,SAACnJ,GAAD,OAAsByhD,EAAqBzhD,GAAtB,WAA+CA,GAAdA,GAE3EkJ,EAAkB,eAACw4C,EAAD,uDAAwB,SAAxB,OAC7B,SAAC1hD,GAAD,OAA6ByhD,EAAqBzhD,GAAWA,EAAU0hD,M","file":"static/js/main.de1f9f4b.chunk.js","sourcesContent":["import { FC, useEffect } from 'react';\n\ninterface WithoutSelectedServerProps {\n resetSelectedServer: Function;\n}\n\nexport function withoutSelectedServer(WrappedComponent: FC) {\n return (props: WithoutSelectedServerProps & T) => {\n useEffect(() => {\n props.resetSelectedServer();\n }, []);\n\n return ;\n };\n}\n","export const saveUrl = ({ document }: Window, url: string, filename: string) => {\n const link = document.createElement('a');\n\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n};\n\nexport const saveCsv = (window: Window, csv: string, filename: string) => {\n const blob = new Blob([ csv ], { type: 'text/csv;charset=utf-8;' });\n const url = URL.createObjectURL(blob);\n\n saveUrl(window, url, filename);\n};\n","import { MAIN_COLOR } from '../../utils/theme';\n\nexport interface ShlinkLogoProps {\n color?: string;\n className?: string;\n}\n\nexport const ShlinkLogo = ({ color = MAIN_COLOR, className }: ShlinkLogoProps) => (\n \n \n \n \n \n \n \n \n);\n","import { FC, useEffect } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport Message from '../../utils/Message';\nimport { isNotFoundServer, SelectedServer } from '../data';\nimport NoMenuLayout from '../../common/NoMenuLayout';\n\ninterface WithSelectedServerProps extends RouteComponentProps<{ serverId: string }> {\n selectServer: (serverId: string) => void;\n selectedServer: SelectedServer;\n}\n\nexport function withSelectedServer(WrappedComponent: FC, ServerError: FC) {\n return (props: WithSelectedServerProps & T) => {\n const { selectServer, selectedServer, match } = props;\n\n useEffect(() => {\n selectServer(match.params.serverId);\n }, [ match.params.serverId ]);\n\n if (!selectedServer) {\n return (\n \n \n \n );\n }\n\n if (isNotFoundServer(selectedServer)) {\n return ;\n }\n\n return ;\n };\n}\n","import { FC } from 'react';\nimport { Link } from 'react-router-dom';\nimport { SimpleCard } from '../utils/SimpleCard';\n\ninterface NotFoundProps {\n to?: string;\n}\n\nconst NotFound: FC = ({ to = '/', children = 'Home' }) => (\n
\n \n

Oops! We could not find requested route.

\n

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

\n
\n {children}\n
\n
\n);\n\nexport default NotFound;\n","import { FC } from 'react';\nimport { ListGroup, ListGroupItem } from 'reactstrap';\nimport { Link } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronRight as chevronIcon } from '@fortawesome/free-solid-svg-icons';\nimport { ServerWithId } from './data';\nimport './ServersListGroup.scss';\n\ninterface ServersListGroupProps {\n servers: ServerWithId[];\n embedded?: boolean;\n}\n\nconst ServerListItem = ({ id, name }: { id: string; name: string }) => (\n \n {name}\n \n \n);\n\nconst ServersListGroup: FC = ({ servers, children, embedded = false }) => (\n <>\n {children &&
{children}
}\n {servers.length > 0 && (\n \n {servers.map(({ id, name }) => )}\n \n )}\n \n);\n\nexport default ServersListGroup;\n","import { useState, useRef, EffectCallback, DependencyList, useEffect } from 'react';\nimport { useSwipeable as useReactSwipeable } from 'react-swipeable';\nimport { parseQuery, stringifyQuery } from './query';\n\nconst DEFAULT_DELAY = 2000;\n\nexport type StateFlagTimeout = (initialValue?: boolean, delay?: number) => [ boolean, () => void ];\n\nexport const useStateFlagTimeout = (\n setTimeout: (callback: Function, timeout: number) => number,\n clearTimeout: (timer: number) => void,\n): StateFlagTimeout => (initialValue = false, delay = DEFAULT_DELAY) => {\n const [ flag, setFlag ] = useState(initialValue);\n const timeout = useRef(undefined);\n const callback = () => {\n setFlag(!initialValue);\n\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n\n timeout.current = setTimeout(() => setFlag(initialValue), delay);\n };\n\n return [ flag, callback ];\n};\n\ntype ToggleResult = [ boolean, () => void, () => void, () => void ];\n\nexport const useToggle = (initialValue = false): ToggleResult => {\n const [ flag, setFlag ] = useState(initialValue);\n\n return [ flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false) ];\n};\n\nexport const useSwipeable = (showSidebar: () => void, hideSidebar: () => void) => {\n const swipeMenuIfNoModalExists = (callback: () => void) => (e: any) => {\n const swippedOnVisitsTable = (e.event.composedPath() as HTMLElement[]).some( // eslint-disable-line @typescript-eslint/no-unsafe-call\n ({ classList }) => classList?.contains('visits-table'),\n );\n\n if (swippedOnVisitsTable || document.querySelector('.modal')) {\n return;\n }\n\n callback();\n };\n\n return useReactSwipeable({\n delta: 40,\n onSwipedLeft: swipeMenuIfNoModalExists(hideSidebar),\n onSwipedRight: swipeMenuIfNoModalExists(showSidebar),\n });\n};\n\nexport const useQueryState = (paramName: string, initialState: T): [ T, (newValue: T) => void ] => {\n const [ value, setValue ] = useState(initialState);\n const setValueWithLocation = (value: T) => {\n const { location, history } = window;\n const query = parseQuery(location.search);\n\n query[paramName] = value;\n history.pushState(null, '', `${location.pathname}?${stringifyQuery(query)}`);\n setValue(value);\n };\n\n return [ value, setValueWithLocation ];\n};\n\nexport const useEffectExceptFirstTime = (callback: EffectCallback, deps: DependencyList): void => {\n const isFirstLoad = useRef(true);\n\n useEffect(() => {\n !isFirstLoad.current && callback();\n isFirstLoad.current = false;\n }, deps);\n};\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', withRouter);\n bottle.decorator('Home', connect([ 'servers' ], [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory(\n 'MenuLayout',\n MenuLayout,\n 'TagsList',\n 'ShortUrlsList',\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' ], [ '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","import { omit } from 'ramda';\nimport { 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 autoConnect?: boolean;\n}\n\nexport interface ReachableServer extends ServerWithId {\n version: SemVer;\n printableVersion: string;\n}\n\nexport interface NonReachableServer extends ServerWithId {\n serverNotReachable: true;\n}\n\nexport interface NotFoundServer {\n serverNotFound: true;\n}\n\nexport type RegularServer = ReachableServer | NonReachableServer;\n\nexport type SelectedServer = RegularServer | NotFoundServer | null;\n\nexport type ServersMap = Record;\n\nexport const hasServerData = (server: SelectedServer | ServerData): server is ServerData =>\n !!(server as ServerData)?.url && !!(server as ServerData)?.apiKey;\n\nexport const isServerWithId = (server: SelectedServer | ServerWithId): server is ServerWithId =>\n !!server?.hasOwnProperty('id');\n\nexport const isReachableServer = (server: SelectedServer): server is ReachableServer =>\n !!server?.hasOwnProperty('version');\n\nexport const isNotFoundServer = (server: SelectedServer): server is NotFoundServer =>\n !!server?.hasOwnProperty('serverNotFound');\n\nexport const getServerId = (server: SelectedServer) => isServerWithId(server) ? server.id : '';\n\nexport const serverWithIdToServerData = (server: ServerWithId): ServerData =>\n omit([ 'id', 'autoConnect' ], server);\n","const PREFIX = 'shlink';\nconst buildPath = (path: string) => `${PREFIX}.${path}`;\n\nexport default class LocalStorage {\n public constructor(private readonly localStorage: Storage) {}\n\n public readonly get = (key: string): T | undefined => {\n const item = this.localStorage.getItem(buildPath(key));\n\n return item ? JSON.parse(item) as T : undefined;\n };\n\n public readonly set = (key: string, value: any) => this.localStorage.setItem(buildPath(key), JSON.stringify(value));\n}\n","import { rangeOf } from '../utils';\nimport LocalStorage from './LocalStorage';\n\nconst HEX_COLOR_LENGTH = 6;\nconst { floor, random } = Math;\nconst letters = '0123456789ABCDEF';\nconst buildRandomColor = () => `#${rangeOf(HEX_COLOR_LENGTH, () => letters[floor(random() * letters.length)]).join('')}`;\nconst normalizeKey = (key: string) => key.toLowerCase().trim();\n\nexport default class ColorGenerator {\n private readonly colors: Record;\n\n public constructor(private readonly storage: LocalStorage) {\n this.colors = this.storage.get>('colors') ?? {};\n }\n\n public readonly getColorForKey = (key: string) => {\n const normalizedKey = normalizeKey(key);\n const color = this.colors[normalizedKey];\n\n // If a color has not been set yet, generate a random one and save it\n if (!color) {\n return this.setColorForKey(normalizedKey, buildRandomColor());\n }\n\n return color;\n };\n\n public readonly setColorForKey = (key: string, color: string) => {\n const normalizedKey = normalizeKey(key);\n\n this.colors[normalizedKey] = color;\n this.storage.set('colors', this.colors);\n\n return color;\n };\n}\n","import { pipe } from 'ramda';\nimport { ExternalLink } from 'react-external-link';\nimport { versionToPrintable, versionToSemVer } from '../utils/helpers/version';\nimport { isReachableServer } from '../servers/data';\nimport { ShlinkVersionsContainerProps } from './ShlinkVersionsContainer';\n\nconst SHLINK_WEB_CLIENT_VERSION = '%_VERSION_%';\nconst normalizeVersion = pipe(versionToSemVer(), versionToPrintable);\n\nexport interface ShlinkVersionsProps extends ShlinkVersionsContainerProps {\n clientVersion?: string;\n}\n\nconst VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => (\n \n {version}\n \n);\n\nconst ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIENT_VERSION }: ShlinkVersionsProps) => {\n const normalizedClientVersion = normalizeVersion(clientVersion);\n\n return (\n \n {isReachableServer(selectedServer) &&\n <>Server: - \n }\n Client: \n \n );\n};\n\nexport default ShlinkVersions;\n","import classNames from 'classnames';\nimport { isReachableServer, SelectedServer } from '../servers/data';\nimport ShlinkVersions from './ShlinkVersions';\nimport './ShlinkVersionsContainer.scss';\n\nexport interface ShlinkVersionsContainerProps {\n selectedServer: SelectedServer;\n}\n\nconst ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => {\n const classes = classNames('text-center', {\n 'shlink-versions-container--with-server': isReachableServer(selectedServer),\n });\n\n return (\n
\n \n
\n );\n};\n\nexport default ShlinkVersionsContainer;\n","import { isEmpty, isNil, pipe, range } from 'ramda';\nimport { SyntheticEvent } from 'react';\n\nexport const rangeOf = (size: number, mappingFn: (value: number) => T, startAt = 1): T[] =>\n range(startAt, size + 1).map(mappingFn);\n\nexport type Empty = null | undefined | '' | never[];\n\nexport const hasValue = (value: T | Empty): value is T => !isNil(value) && !isEmpty(value);\n\nexport const handleEventPreventingDefault = (handler: () => T) => pipe(\n (e: SyntheticEvent) => e.preventDefault(),\n handler,\n);\n\nexport type Nullable = {\n [P in keyof T]: T[P] | null\n};\n\ntype Optional = T | null | undefined;\n\nexport type OptionalString = Optional;\n\nexport type RecursivePartial = {\n [P in keyof T]?: RecursivePartial;\n};\n\nexport const nonEmptyValueOrNull = (value: T): T | null => isEmpty(value) ? null : value;\n\nexport const capitalize = (value: T): string => `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n","import { 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 { useEffect } from 'react';\nimport { isEmpty, values } from 'ramda';\nimport { Link, RouteChildrenProps } 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 extends RouteChildrenProps {\n servers: ServersMap;\n}\n\nconst Home = ({ servers, history }: HomeProps) => {\n const serversList = values(servers);\n const hasServers = !isEmpty(serversList);\n\n useEffect(() => {\n // Try to redirect to the first server marked as auto-connect\n const autoConnectServer = serversList.find(({ autoConnect }) => autoConnect);\n\n autoConnectServer && history.push(`/server/${autoConnectServer.id}`);\n }, []);\n\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n
\n

Welcome!

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

This application will help you manage your Shlink servers.

\n

\n \n Add a server\n \n

\n

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

\n
\n )}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Home;\n","import { FC, useEffect } from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport { faBars as burgerIcon } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport classNames from 'classnames';\nimport { withSelectedServer } from '../servers/helpers/withSelectedServer';\nimport { useSwipeable, useToggle } from '../utils/helpers/hooks';\nimport { supportsDomainRedirects, supportsOrphanVisits } from '../utils/helpers/features';\nimport { isReachableServer } from '../servers/data';\nimport NotFound from './NotFound';\nimport { AsideMenuProps } from './AsideMenu';\nimport './MenuLayout.scss';\n\nconst MenuLayout = (\n TagsList: FC,\n ShortUrlsList: FC,\n AsideMenu: FC,\n CreateShortUrl: FC,\n ShortUrlVisits: FC,\n TagVisits: FC,\n OrphanVisits: FC,\n ServerError: FC,\n Overview: FC,\n EditShortUrl: FC,\n ManageDomains: FC,\n) => withSelectedServer(({ location, selectedServer }) => {\n const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle();\n\n useEffect(() => hideSidebar(), [ location ]);\n\n if (!isReachableServer(selectedServer)) {\n return ;\n }\n\n const addOrphanVisitsRoute = supportsOrphanVisits(selectedServer);\n const addManageDomainsRoute = supportsDomainRedirects(selectedServer);\n const burgerClasses = classNames('menu-layout__burger-icon', { 'menu-layout__burger-icon--active': sidebarVisible });\n const swipeableProps = useSwipeable(showSidebar, hideSidebar);\n\n return (\n <>\n \n\n
\n
\n \n
hideSidebar()}>\n
\n \n \n \n \n \n \n \n \n {addOrphanVisitsRoute && }\n \n {addManageDomainsRoute && }\n List short URLs}\n />\n \n
\n
\n
\n
\n \n );\n}, ServerError);\n\nexport default MenuLayout;\n","import {\n faList as listIcon,\n faLink as createIcon,\n faTags as tagsIcon,\n faPen as editIcon,\n faHome as overviewIcon,\n faGlobe as domainsIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { FC } from 'react';\nimport { NavLink, NavLinkProps } from 'react-router-dom';\nimport classNames from 'classnames';\nimport { Location } from 'history';\nimport { DeleteServerButtonProps } from '../servers/DeleteServerButton';\nimport { isServerWithId, SelectedServer } from '../servers/data';\nimport { supportsDomainRedirects } from '../utils/helpers/features';\nimport './AsideMenu.scss';\n\nexport interface AsideMenuProps {\n selectedServer: SelectedServer;\n className?: string;\n showOnMobile?: boolean;\n}\n\ninterface AsideMenuItemProps extends NavLinkProps {\n to: string;\n}\n\nconst AsideMenuItem: FC = ({ children, to, className, ...rest }) => (\n \n {children}\n \n);\n\nconst AsideMenu = (DeleteServerButton: FC) => (\n { selectedServer, showOnMobile = false }: AsideMenuProps,\n) => {\n const hasId = isServerWithId(selectedServer);\n const serverId = hasId ? selectedServer.id : '';\n const addManageDomainsLink = supportsDomainRedirects(selectedServer);\n const asideClass = classNames('aside-menu', {\n 'aside-menu--hidden': !showOnMobile,\n });\n const shortUrlsIsActive = (_: null, location: Location) => location.pathname.match('/list-short-urls') !== null;\n const buildPath = (suffix: string) => `/server/${serverId}${suffix}`;\n\n return (\n \n );\n};\n\nexport default AsideMenu;\n","import { CardProps } from 'reactstrap/lib/Card';\nimport { Card, CardBody, CardHeader } from 'reactstrap';\nimport { ReactNode } from 'react';\n\ninterface SimpleCardProps extends Omit {\n title?: ReactNode;\n bodyClassName?: string;\n}\n\nexport const SimpleCard = ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => (\n \n {title && {title}}\n {children}\n \n);\n","import { isReachableServer, SelectedServer } from '../../servers/data';\nimport { versionMatch, Versions } from './version';\n\nconst serverMatchesVersions = (versions: Versions) => (selectedServer: SelectedServer): boolean =>\n isReachableServer(selectedServer) && versionMatch(selectedServer.version, versions);\n\nexport const supportsQrCodeSizeInQuery = serverMatchesVersions({ minVersion: '2.5.0' });\n\nexport const supportsShortUrlTitle = serverMatchesVersions({ minVersion: '2.6.0' });\n\nexport const supportsOrphanVisits = supportsShortUrlTitle;\n\nexport const supportsQrCodeMargin = supportsShortUrlTitle;\n\nexport const supportsTagsInPatch = supportsShortUrlTitle;\n\nexport const supportsBotVisits = serverMatchesVersions({ minVersion: '2.7.0' });\n\nexport const supportsCrawlableVisits = supportsBotVisits;\n\nexport const supportsQrErrorCorrection = serverMatchesVersions({ minVersion: '2.8.0' });\n\nexport const supportsDomainRedirects = supportsQrErrorCorrection;\n\nexport const supportsForwardQuery = serverMatchesVersions({ minVersion: '2.9.0' });\n\nexport const supportsDefaultDomainRedirectsEdition = serverMatchesVersions({ minVersion: '2.10.0' });\n","export const MAIN_COLOR = '#4696e5';\n\nexport const MAIN_COLOR_ALPHA = 'rgba(70, 150, 229, 0.4)';\n\nexport const HIGHLIGHTED_COLOR = '#f77f28';\n\nexport const HIGHLIGHTED_COLOR_ALPHA = 'rgba(247, 127, 40, 0.4)';\n\nexport const PRIMARY_LIGHT_COLOR = 'white';\n\nexport const PRIMARY_DARK_COLOR = '#161b22';\n\nexport type Theme = 'dark' | 'light';\n\nexport const changeThemeInMarkup = (theme: Theme) => {\n const html = document.getElementsByTagName('html');\n\n html?.[0]?.setAttribute('data-theme', theme);\n};\n\nexport const isDarkThemeEnabled = (): boolean => {\n const html = document.getElementsByTagName('html');\n\n return html?.[0]?.getAttribute('data-theme') === 'dark';\n};\n","import qs from 'qs';\n\nexport const parseQuery = (search: string) => qs.parse(search, { ignoreQueryPrefix: true }) as unknown as T;\n\nexport const stringifyQuery = (query: any): string => qs.stringify(query, { arrayFormat: 'brackets' });\n","import { 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 initialValue?: string;\n}\n\nconst SearchField = ({ onChange, className, large = true, noBorder = false, initialValue = '' }: SearchFieldProps) => {\n const [ searchTerm, setSearchTerm ] = useState(initialValue);\n\n const resetTimer = () => {\n timer && clearTimeout(timer);\n timer = null;\n };\n const searchTermChanged = (newSearchTerm: string, timeout = DEFAULT_SEARCH_INTERVAL) => {\n setSearchTerm(newSearchTerm);\n\n resetTimer();\n\n timer = setTimeout(() => {\n onChange(newSearchTerm);\n resetTimer();\n }, timeout);\n };\n\n return (\n
\n searchTermChanged(e.target.value)}\n />\n \n
\n \n );\n};\n\nexport default SearchField;\n","import { isEmpty, isNil, reject } from 'ramda';\nimport { AxiosInstance, AxiosResponse, Method } from 'axios';\nimport { 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 ShlinkDomainsResponse,\n ShlinkVisitsOverview,\n ShlinkEditDomainRedirects,\n ShlinkDomainRedirects,\n ShlinkShortUrlsListParams,\n ShlinkShortUrlsListNormalizedParams,\n} from '../types';\nimport { stringifyQuery } from '../../utils/helpers/query';\n\nconst buildShlinkBaseUrl = (url: string, apiVersion: number) => url ? `${url}/rest/v${apiVersion}` : '';\nconst rejectNilProps = reject(isNil);\nconst normalizeOrderByInParams = (params: ShlinkShortUrlsListParams): ShlinkShortUrlsListNormalizedParams => {\n const { orderBy = {}, ...rest } = params;\n const [ firstKey ] = Object.keys(orderBy);\n const [ firstValue ] = Object.values(orderBy);\n\n return !firstValue ? rest : {\n ...rest,\n orderBy: `${firstKey}-${firstValue}`,\n };\n};\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: ShlinkShortUrlsListParams = {}): Promise =>\n this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', normalizeOrderByInParams(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);\n\n public readonly editDomainRedirects = async (\n domainRedirects: ShlinkEditDomainRedirects,\n ): Promise =>\n this.performRequest('/domains/redirects', 'PATCH', {}, domainRedirects).then(({ data }) => data);\n\n private readonly performRequest = async (url: string, method: Method = 'GET', query = {}, body = {}): Promise> => {\n try {\n return await this.axios({\n method,\n url: `${buildShlinkBaseUrl(this.baseUrl, this.apiVersion)}${url}`,\n headers: { 'X-Api-Key': this.apiKey },\n params: rejectNilProps(query),\n data: body,\n paramsSerializer: stringifyQuery,\n });\n } catch (e: any) {\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, 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, isBefore, isEqual, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';\nimport { OptionalString } from '../utils';\n\nexport type DateOrString = Date | string;\n\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\nexport const parseISO = (date: DateOrString): Date => isDateObject(date) ? date : stdParseISO(date);\n\nexport const isBetween = (date: DateOrString, start?: DateOrString, end?: DateOrString): boolean => {\n try {\n return isWithinInterval(parseISO(date), { start: parseISO(start ?? date), end: parseISO(end ?? date) });\n } catch (e) {\n return false;\n }\n};\n\nexport const isBeforeOrEqual = (date: Date | number, dateToCompare: Date | number) =>\n isEqual(date, dateToCompare) || isBefore(date, dateToCompare);\n","import { subDays, startOfDay, endOfDay } from 'date-fns';\nimport { cond, filter, isEmpty, T } from 'ramda';\nimport { DateOrString, formatInternational, isBeforeOrEqual, parseISO } from '../../helpers/date';\n\nexport interface DateRange {\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport type DateInterval = 'all' | '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 =>\n 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 all: undefined,\n};\n\nexport const DATE_INTERVALS = Object.keys(INTERVAL_TO_STRING_MAP).filter((value) => value !== 'all') 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 || range === 'all') {\n return undefined;\n }\n\n if (!rangeIsInterval(range)) {\n return dateRangeToString(range);\n }\n\n return INTERVAL_TO_STRING_MAP[range];\n};\n\nconst startOfDaysAgo = (daysAgo: number) => startOfDay(subDays(new Date(), daysAgo));\nconst endingToday = (startDate: Date): DateRange => ({ startDate, endDate: endOfDay(new Date()) });\n\nexport const intervalToDateRange = (dateInterval?: DateInterval): DateRange => {\n if (!dateInterval || dateInterval === 'all') {\n return {};\n }\n\n switch (dateInterval) {\n case 'today':\n return endingToday(startOfDay(new Date()));\n case 'yesterday':\n return { startDate: startOfDaysAgo(1), endDate: endOfDay(subDays(new Date(), 1)) };\n case 'last7Days':\n return endingToday(startOfDaysAgo(7));\n case 'last30Days':\n return endingToday(startOfDaysAgo(30));\n case 'last90Days':\n return endingToday(startOfDaysAgo(90));\n case 'last180Days':\n return endingToday(startOfDaysAgo(180));\n case 'last365Days':\n return endingToday(startOfDaysAgo(365));\n }\n\n return {};\n};\n\nexport const dateToMatchingInterval = (date: DateOrString): DateInterval => {\n const theDate: Date = parseISO(date);\n\n return cond([\n [ () => isBeforeOrEqual(startOfDay(new Date()), theDate), () => 'today' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(1), theDate), () => 'yesterday' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(7), theDate), () => 'last7Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(30), theDate), () => 'last30Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(90), theDate), () => 'last90Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(180), theDate), () => 'last180Days' ],\n [ () => isBeforeOrEqual(startOfDaysAgo(365), theDate), () => 'last365Days' ],\n [ T, () => 'all' ],\n ])();\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 allText: string;\n onChange: (interval: DateInterval) => void;\n}\n\nexport const DateIntervalDropdownItems: FC = ({ active, allText, onChange }) => (\n <>\n onChange('all')}>\n {allText}\n \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 { useEffectExceptFirstTime } from '../helpers/hooks';\nimport {\n DateInterval,\n DateRange,\n rangeOrIntervalToString,\n intervalToDateRange,\n rangeIsInterval,\n dateRangeIsEmpty,\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 updatable?: boolean;\n}\n\nexport const DateRangeSelector = (\n { onDatesChange, initialDateRange, defaultText, disabled, updatable = false }: DateRangeSelectorProps,\n) => {\n const initialIntervalIsRange = rangeIsInterval(initialDateRange);\n const [ activeInterval, setActiveInterval ] = useState(initialIntervalIsRange ? initialDateRange : undefined);\n const [ activeDateRange, setActiveDateRange ] = useState(initialIntervalIsRange ? undefined : initialDateRange);\n\n const updateDateRange = (dateRange: DateRange) => {\n setActiveInterval(dateRangeIsEmpty(dateRange) ? 'all' : 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 updatable && useEffectExceptFirstTime(() => {\n const isDateInterval = rangeIsInterval(initialDateRange);\n\n isDateInterval && updateInterval(initialDateRange);\n initialDateRange && !isDateInterval && updateDateRange(initialDateRange);\n }, [ initialDateRange ]);\n\n return (\n \n \n \n Custom:\n \n updateDateRange({ ...activeDateRange, startDate })}\n onEndDateChange={(endDate) => updateDateRange({ ...activeDateRange, endDate })}\n />\n \n \n );\n};\n","import { RouteChildrenProps } from 'react-router-dom';\nimport { useMemo } from 'react';\nimport { isEmpty } from 'ramda';\nimport { parseQuery, stringifyQuery } from '../../utils/helpers/query';\n\ntype ServerIdRouteProps = RouteChildrenProps<{ serverId: string }>;\ntype ToFirstPage = (extra: Partial) => void;\n\nexport interface ShortUrlListRouteParams {\n page: string;\n serverId: string;\n}\n\ninterface ShortUrlsQuery {\n tags?: string;\n search?: string;\n startDate?: string;\n endDate?: string;\n}\n\nexport const useShortUrlsQuery = ({ history, location, match }: ServerIdRouteProps): [ShortUrlsQuery, ToFirstPage] => {\n const query = useMemo(() => parseQuery(location.search), [ location ]);\n const toFirstPageWithExtra = (extra: Partial) => {\n const evolvedQuery = stringifyQuery({ ...query, ...extra });\n const queryString = isEmpty(evolvedQuery) ? '' : `?${evolvedQuery}`;\n\n history.push(`/server/${match?.params.serverId}/list-short-urls/1${queryString}`);\n };\n\n return [ query, toFirstPageWithExtra ];\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 { RouteChildrenProps } from 'react-router-dom';\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 { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\nimport './SearchBar.scss';\n\nexport type SearchBarProps = RouteChildrenProps;\n\nconst dateOrNull = (date?: string) => date ? parseISO(date) : null;\n\nconst SearchBar = (colorGenerator: ColorGenerator) => (props: SearchBarProps) => {\n const [{ search, tags, startDate, endDate }, toFirstPage ] = useShortUrlsQuery(props);\n const selectedTags = tags?.split(',') ?? [];\n const setDates = pipe(\n ({ startDate, endDate }: DateRange) => ({\n startDate: formatIsoDate(startDate) ?? undefined,\n endDate: formatIsoDate(endDate) ?? undefined,\n }),\n toFirstPage,\n );\n const setSearch = pipe(\n (searchTerm: string) => isEmpty(searchTerm) ? undefined : searchTerm,\n (search) => toFirstPage({ search }),\n );\n const removeTag = pipe(\n (tag: string) => selectedTags.filter((selectedTag) => selectedTag !== tag),\n (tagsList) => tagsList.length === 0 ? undefined : tagsList.join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n return (\n
\n \n\n
\n
\n
\n \n
\n
\n
\n\n {selectedTags.length > 0 && (\n

\n \n  \n {selectedTags.map((tag) =>\n removeTag(tag)} />)}\n

\n )}\n
\n );\n};\n\nexport default SearchBar;\n","export type OrderDir = 'ASC' | 'DESC' | undefined;\n\nexport interface Order {\n field?: Fields;\n dir?: OrderDir;\n}\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 sortList = (list: List[], { field, dir }: Order>) => !field || !dir\n ? list\n : list.sort((a, b) => {\n const greaterThan = dir === 'ASC' ? 1 : -1;\n const smallerThan = dir === 'ASC' ? -1 : 1;\n\n return a[field] > b[field] ? greaterThan : smallerThan;\n });\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, Order, OrderDir } from './helpers/ordering';\nimport './SortingDropdown.scss';\n\nexport interface SortingDropdownProps {\n items: Record;\n order: Order;\n onChange: (orderField?: T, orderDir?: OrderDir) => void;\n isButton?: boolean;\n right?: boolean;\n}\n\nexport default function SortingDropdown(\n { items, order, onChange, isButton = true, right = false }: SortingDropdownProps,\n) {\n const handleItemClick = (fieldKey: T) => () => {\n const newOrderDir = determineOrderDir(fieldKey, order.field, order.dir);\n\n onChange(newOrderDir ? fieldKey : undefined, newOrderDir);\n };\n\n return (\n \n \n {!isButton && <>Order by}\n {isButton && !order.field && <>Order by...}\n {isButton && order.field && `Order by: \"${items[order.field]}\" - \"${order.dir ?? 'DESC'}\"`}\n \n \n {toPairs(items).map(([ fieldKey, fieldValue ]) => (\n \n {fieldValue}\n {order.field === fieldKey && (\n \n )}\n \n ))}\n \n onChange()}>\n Clear selection\n \n \n \n );\n}\n","import { FC, useEffect } from 'react';\nimport { pipe } from 'ramda';\nimport { CreateVisit } from '../../visits/types';\nimport { MercureInfo } from '../reducers/mercureInfo';\nimport { bindToMercureTopic } from './index';\n\nexport interface MercureBoundProps {\n createNewVisits: (createdVisits: CreateVisit[]) => void;\n loadMercureInfo: () => void;\n mercureInfo: MercureInfo;\n}\n\nexport function boundToMercureHub(\n WrappedComponent: FC,\n getTopicsForProps: (props: T) => string[],\n) {\n const pendingUpdates = new Set();\n\n return (props: MercureBoundProps & T) => {\n const { createNewVisits, loadMercureInfo, mercureInfo } = props;\n const { interval } = mercureInfo;\n\n useEffect(() => {\n const onMessage = (visit: CreateVisit) => interval ? pendingUpdates.add(visit) : createNewVisits([ visit ]);\n const closeEventSource = bindToMercureTopic(mercureInfo, getTopicsForProps(props), onMessage, loadMercureInfo);\n\n if (!interval) {\n return closeEventSource;\n }\n\n const timer = setInterval(() => {\n createNewVisits([ ...pendingUpdates ]);\n pendingUpdates.clear();\n }, interval * 1000 * 60);\n\n return pipe(() => clearInterval(timer), () => closeEventSource?.());\n }, [ mercureInfo ]);\n\n return ;\n };\n}\n","import { EventSourcePolyfill as EventSource } from 'event-source-polyfill';\nimport { MercureInfo } from '../reducers/mercureInfo';\n\nexport const bindToMercureTopic = (mercureInfo: MercureInfo, topics: string[], onMessage: (message: T) => void, onTokenExpired: () => void) => { // eslint-disable-line max-len\n const { mercureHubUrl, token, loading, error } = mercureInfo;\n\n if (loading || error || !mercureHubUrl) {\n return undefined;\n }\n\n const onEventSourceMessage = ({ data }: { data: string }) => onMessage(JSON.parse(data) as T);\n const onEventSourceError = ({ status }: { status: number }) => status === 401 && onTokenExpired();\n\n const subscriptions = topics.map((topic) => {\n const hubUrl = new URL(mercureHubUrl);\n\n hubUrl.searchParams.append('topic', topic);\n const es = new EventSource(hubUrl, {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n });\n\n es.onmessage = onEventSourceMessage;\n es.onerror = onEventSourceError;\n\n return es;\n });\n\n return () => subscriptions.forEach((es) => es.close());\n};\n","export class Topics {\n public static readonly visits = 'https://shlink.io/new-visit';\n\n public static readonly orphanVisits = 'https://shlink.io/new-orphan-visit';\n\n public static readonly shortUrlVisits = (shortCode: string) => `https://shlink.io/new-visit/${shortCode}`;\n}\n","import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faCaretDown as caretDownIcon, faCaretUp as caretUpIcon } from '@fortawesome/free-solid-svg-icons';\nimport { Order } from '../helpers/ordering';\n\ninterface TableOrderIconProps {\n currentOrder: Order;\n field: T;\n className?: string;\n}\n\nexport function TableOrderIcon(\n { currentOrder, field, className = 'ml-1' }: TableOrderIconProps,\n) {\n if (!currentOrder.dir || currentOrder.field !== field) {\n return null;\n }\n\n return ;\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, useRef } 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 { prettify } from '../utils/helpers/numbers';\nimport LineChartCard from './charts/LineChartCard';\nimport VisitsTable from './VisitsTable';\nimport { NormalizedOrphanVisit, NormalizedVisit, VisitsFilter, VisitsInfo, VisitsParams } from './types';\nimport OpenMapModalBtn from './helpers/OpenMapModalBtn';\nimport { normalizeVisits, processStatsFromVisits } from './services/VisitsParser';\nimport { VisitsFilterDropdown } from './helpers/VisitsFilterDropdown';\nimport { HighlightableProps, highlightedVisitsToStats } from './types/helpers';\nimport { DoughnutChartCard } from './charts/DoughnutChartCard';\nimport { SortableBarChartCard } from './charts/SortableBarChartCard';\nimport './VisitsStats.scss';\n\nexport interface VisitsStatsProps {\n getVisits: (params: VisitsParams, doIntervalFallback?: boolean) => 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 { visits, loading, loadingLarge, error, errorData, progress, fallbackInterval } = visitsInfo;\n const [ initialInterval, setInitialInterval ] = useState(\n fallbackInterval ?? settings.visits?.defaultInterval ?? 'last30Days',\n );\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 const isFirstLoad = useRef(true);\n\n const buildSectionUrl = (subPath?: string) => {\n const query = domain ? `?domain=${domain}` : '';\n\n return !subPath ? `${baseUrl}${query}` : `${baseUrl}${subPath}${query}`;\n };\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 }, isFirstLoad.current);\n isFirstLoad.current = false;\n }, [ dateRange, visitsFilter ]);\n useEffect(() => {\n fallbackInterval && setInitialInterval(fallbackInterval);\n }, [ fallbackInterval ]);\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 && <>({prettify(highlightedVisits.length)})}\n \n exportCsv(normalizedVisits)}\n >\n Export ({prettify(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: any) {\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: any) {\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: any) {\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 { ShlinkShortUrlsListParams, 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: ShlinkShortUrlsListParams = {},\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/helpers/ordering';\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 type OrderBy = Partial>;\n\nexport interface ShortUrlsListParams {\n page?: string;\n itemsPerPage?: number;\n orderBy?: OrderBy;\n}\n\nconst initialState: ShortUrlsListParams = {\n page: '1',\n orderBy: { dateCreated: 'DESC' },\n};\n\nexport default buildReducer({\n [LIST_SHORT_URLS]: (state, { params }) => ({ ...state, ...params }),\n [RESET_SHORT_URL_PARAMS]: () => initialState,\n}, initialState);\n\nexport const resetShortUrlParams = buildActionCreator(RESET_SHORT_URL_PARAMS);\n","const TEN_ROUNDING_NUMBER = 10;\nconst { ceil } = Math;\nconst formatter = new Intl.NumberFormat('en-US');\n\nexport const prettify = (number: number | string) => formatter.format(Number(number));\n\nexport const roundTen = (number: number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;\n","import { max, min, range } from 'ramda';\nimport { prettify } from './numbers';\n\nconst DELTA = 2;\n\nexport const ELLIPSIS = '...';\n\ntype Ellipsis = typeof ELLIPSIS;\n\nexport type NumberOrEllipsis = number | Ellipsis;\n\nexport const progressivePagination = (currentPage: number, pageCount: number): NumberOrEllipsis[] => {\n const pages: NumberOrEllipsis[] = range(\n max(DELTA, currentPage - DELTA),\n min(pageCount - 1, currentPage + DELTA) + 1,\n );\n\n if (currentPage - DELTA > DELTA) {\n pages.unshift(ELLIPSIS);\n }\n if (currentPage + DELTA < pageCount - 1) {\n pages.push(ELLIPSIS);\n }\n\n pages.unshift(1);\n pages.push(pageCount);\n\n return pages;\n};\n\nexport const pageIsEllipsis = (pageNumber: NumberOrEllipsis): pageNumber is Ellipsis => pageNumber === ELLIPSIS;\n\nexport const prettifyPageNumber = (pageNumber: NumberOrEllipsis): string =>\n pageIsEllipsis(pageNumber) ? pageNumber : prettify(pageNumber);\n\nexport const keyForPage = (pageNumber: NumberOrEllipsis, index: number) => !pageIsEllipsis(pageNumber) ? `${pageNumber}` : `${pageNumber}_${index}`;\n","import { Link } from 'react-router-dom';\nimport { Pagination, PaginationItem, PaginationLink } from 'reactstrap';\nimport {\n pageIsEllipsis,\n keyForPage,\n progressivePagination,\n prettifyPageNumber,\n NumberOrEllipsis,\n} from '../utils/helpers/pagination';\nimport { ShlinkPaginator } from '../api/types';\n\ninterface PaginatorProps {\n paginator?: ShlinkPaginator;\n serverId: string;\n currentQueryString?: string;\n}\n\nconst Paginator = ({ paginator, serverId, currentQueryString = '' }: PaginatorProps) => {\n const { currentPage = 0, pagesCount = 0 } = paginator ?? {};\n const urlForPage = (pageNumber: NumberOrEllipsis) =>\n `/server/${serverId}/list-short-urls/${pageNumber}${currentQueryString}`;\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 { head, keys, pipe, values } from 'ramda';\nimport { FC, useEffect, useMemo, useState } from 'react';\nimport { RouteComponentProps } from 'react-router';\nimport { Card } from 'reactstrap';\nimport SortingDropdown from '../utils/SortingDropdown';\nimport { determineOrderDir, Order, OrderDir } from '../utils/helpers/ordering';\nimport { getServerId, SelectedServer } from '../servers/data';\nimport { boundToMercureHub } from '../mercure/helpers/boundToMercureHub';\nimport { Topics } from '../mercure/helpers/Topics';\nimport { TableOrderIcon } from '../utils/table/TableOrderIcon';\nimport { ShlinkShortUrlsListParams } from '../api/types';\nimport { ShortUrlsList as ShortUrlsListState } from './reducers/shortUrlsList';\nimport { OrderableFields, ShortUrlsListParams, SORTABLE_FIELDS } from './reducers/shortUrlsListParams';\nimport { ShortUrlsTableProps } from './ShortUrlsTable';\nimport Paginator from './Paginator';\nimport { ShortUrlListRouteParams, useShortUrlsQuery } from './helpers/hooks';\n\ninterface ShortUrlsListProps extends RouteComponentProps {\n selectedServer: SelectedServer;\n shortUrlsList: ShortUrlsListState;\n listShortUrls: (params: ShortUrlsListParams) => void;\n shortUrlsListParams: ShortUrlsListParams;\n resetShortUrlParams: () => void;\n}\n\ntype ShortUrlsOrder = Order;\n\nconst ShortUrlsList = (ShortUrlsTable: FC, SearchBar: FC) => boundToMercureHub(({\n listShortUrls,\n resetShortUrlParams,\n shortUrlsListParams,\n match,\n location,\n history,\n shortUrlsList,\n selectedServer,\n}: ShortUrlsListProps) => {\n const serverId = getServerId(selectedServer);\n const { orderBy } = shortUrlsListParams;\n const [ order, setOrder ] = useState({\n field: orderBy && (head(keys(orderBy)) as OrderableFields),\n dir: orderBy && head(values(orderBy)),\n });\n const [{ tags, search, startDate, endDate }, toFirstPage ] = useShortUrlsQuery({ history, match, location });\n const selectedTags = useMemo(() => tags?.split(',') ?? [], [ tags ]);\n const { pagination } = shortUrlsList?.shortUrls ?? {};\n\n const refreshList = (extraParams: ShlinkShortUrlsListParams) => listShortUrls(\n { ...shortUrlsListParams, ...extraParams },\n );\n const handleOrderBy = (field?: OrderableFields, dir?: OrderDir) => {\n setOrder({ field, dir });\n refreshList({ orderBy: field ? { [field]: dir } : undefined });\n };\n const orderByColumn = (field: OrderableFields) => () =>\n handleOrderBy(field, determineOrderDir(field, order.field, order.dir));\n const renderOrderIcon = (field: OrderableFields) => ;\n const addTag = pipe(\n (newTag: string) => [ ...new Set([ ...selectedTags, newTag ]) ].join(','),\n (tags) => toFirstPage({ tags }),\n );\n\n useEffect(() => resetShortUrlParams, []);\n useEffect(() => {\n refreshList(\n { page: match.params.page, searchTerm: search, tags: selectedTags, itemsPerPage: undefined, startDate, endDate },\n );\n }, [ match.params.page, search, selectedTags, startDate, endDate ]);\n\n return (\n <>\n
\n
\n \n
\n \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
\n \n \n {tagFilteringModeHint(shortUrlCreation.tagFilteringMode)}\n \n \n \n );\n};\n","import { FC } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSun, faMoon } from '@fortawesome/free-solid-svg-icons';\nimport { FormGroup } from 'reactstrap';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport ToggleSwitch from '../utils/ToggleSwitch';\nimport { changeThemeInMarkup, Theme } from '../utils/theme';\nimport { TagsModeDropdown } from '../tags/TagsModeDropdown';\nimport { capitalize } from '../utils/utils';\nimport { Settings, UiSettings } from './reducers/settings';\nimport './UserInterface.scss';\n\ninterface UserInterfaceProps {\n settings: Settings;\n setUiSettings: (settings: UiSettings) => void;\n}\n\nexport const UserInterface: FC = ({ settings: { ui }, setUiSettings }) => (\n \n \n \n {\n const theme: Theme = useDarkTheme ? 'dark' : 'light';\n\n setUiSettings({ ...ui, theme });\n changeThemeInMarkup(theme);\n }}\n >\n Use dark theme.\n \n \n \n \n capitalize(tagsMode)}\n onChange={(tagsMode) => setUiSettings({ ...ui ?? { theme: 'light' }, tagsMode })}\n />\n Tags will be displayed as {ui?.tagsMode ?? 'cards'}.\n \n \n);\n","import { FC } from 'react';\nimport { DropdownBtn } from '../DropdownBtn';\nimport { rangeOrIntervalToString } from './types';\nimport { DateIntervalDropdownItems, DateIntervalDropdownProps } from './DateIntervalDropdownItems';\n\nexport const DateIntervalSelector: FC = ({ onChange, active, allText }) => (\n \n \n \n);\n","import { FormGroup } from 'reactstrap';\nimport { FC } from 'react';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { DateIntervalSelector } from '../utils/dates/DateIntervalSelector';\nimport { Settings, VisitsSettings } from './reducers/settings';\n\ninterface VisitsProps {\n settings: Settings;\n setVisitsSettings: (settings: VisitsSettings) => void;\n}\n\nexport const Visits: FC = ({ settings, setVisitsSettings }) => (\n \n \n \n setVisitsSettings({ defaultInterval })}\n />\n \n \n);\n","import Bottle from 'bottlejs';\nimport RealTimeUpdates from '../RealTimeUpdates';\nimport Settings from '../Settings';\nimport {\n setRealTimeUpdatesInterval,\n setShortUrlCreationSettings,\n setUiSettings,\n setVisitsSettings,\n toggleRealTimeUpdates,\n} from '../reducers/settings';\nimport { ConnectDecorator } from '../../container/types';\nimport { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServer';\nimport { ShortUrlCreation } from '../ShortUrlCreation';\nimport { UserInterface } from '../UserInterface';\nimport { Visits } from '../Visits';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('Settings', Settings, 'RealTimeUpdates', 'ShortUrlCreation', 'UserInterface', 'Visits');\n bottle.decorator('Settings', withoutSelectedServer);\n bottle.decorator('Settings', connect(null, [ 'resetSelectedServer' ]));\n\n bottle.serviceFactory('RealTimeUpdates', () => RealTimeUpdates);\n bottle.decorator(\n 'RealTimeUpdates',\n connect([ 'settings' ], [ 'toggleRealTimeUpdates', 'setRealTimeUpdatesInterval' ]),\n );\n\n bottle.serviceFactory('ShortUrlCreation', () => ShortUrlCreation);\n bottle.decorator('ShortUrlCreation', connect([ 'settings' ], [ 'setShortUrlCreationSettings' ]));\n\n bottle.serviceFactory('UserInterface', () => UserInterface);\n bottle.decorator('UserInterface', connect([ 'settings' ], [ 'setUiSettings' ]));\n\n bottle.serviceFactory('Visits', () => Visits);\n bottle.decorator('Visits', connect([ 'settings' ], [ 'setVisitsSettings' ]));\n\n // Actions\n bottle.serviceFactory('toggleRealTimeUpdates', () => toggleRealTimeUpdates);\n bottle.serviceFactory('setRealTimeUpdatesInterval', () => setRealTimeUpdatesInterval);\n bottle.serviceFactory('setShortUrlCreationSettings', () => setShortUrlCreationSettings);\n bottle.serviceFactory('setUiSettings', () => setUiSettings);\n bottle.serviceFactory('setVisitsSettings', () => setVisitsSettings);\n};\n\nexport default provideServices;\n","import { Action, Dispatch } from 'redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { ShlinkDomainRedirects } from '../../api/types';\nimport { GetState } from '../../container/types';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { parseApiError } from '../../api/utils';\n\n/* eslint-disable padding-line-between-statements */\nexport const EDIT_DOMAIN_REDIRECTS_START = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START';\nexport const EDIT_DOMAIN_REDIRECTS_ERROR = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR';\nexport const EDIT_DOMAIN_REDIRECTS = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface EditDomainRedirectsAction extends Action {\n domain: string;\n redirects: ShlinkDomainRedirects;\n}\n\nexport const editDomainRedirects = (buildShlinkApiClient: ShlinkApiClientBuilder) => (\n domain: string,\n domainRedirects: Partial,\n) => async (dispatch: Dispatch, getState: GetState) => {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_START });\n const { editDomainRedirects } = buildShlinkApiClient(getState);\n\n try {\n const redirects = await editDomainRedirects({ domain, ...domainRedirects });\n\n dispatch({ type: EDIT_DOMAIN_REDIRECTS, domain, redirects });\n } catch (e: any) {\n dispatch({ type: EDIT_DOMAIN_REDIRECTS_ERROR, errorData: parseApiError(e) });\n }\n};\n","import { Action, Dispatch } from 'redux';\nimport { ProblemDetailsError, ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { buildReducer } from '../../utils/helpers/redux';\nimport { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';\nimport { GetState } from '../../container/types';\nimport { parseApiError } from '../../api/utils';\nimport { ApiErrorAction } from '../../api/types/actions';\nimport { EDIT_DOMAIN_REDIRECTS, EditDomainRedirectsAction } from './domainRedirects';\n\n/* eslint-disable padding-line-between-statements */\nexport const LIST_DOMAINS_START = 'shlink/domainsList/LIST_DOMAINS_START';\nexport const LIST_DOMAINS_ERROR = 'shlink/domainsList/LIST_DOMAINS_ERROR';\nexport const LIST_DOMAINS = 'shlink/domainsList/LIST_DOMAINS';\nexport const FILTER_DOMAINS = 'shlink/domainsList/FILTER_DOMAINS';\n/* eslint-enable padding-line-between-statements */\n\nexport interface DomainsList {\n domains: ShlinkDomain[];\n filteredDomains: ShlinkDomain[];\n defaultRedirects?: ShlinkDomainRedirects;\n loading: boolean;\n error: boolean;\n errorData?: ProblemDetailsError;\n}\n\nexport interface ListDomainsAction extends Action {\n domains: ShlinkDomain[];\n defaultRedirects?: ShlinkDomainRedirects;\n}\n\ninterface FilterDomainsAction extends Action {\n searchTerm: string;\n}\n\nconst initialState: DomainsList = {\n domains: [],\n filteredDomains: [],\n loading: false,\n error: false,\n};\n\nexport type DomainsCombinedAction = ListDomainsAction\n& ApiErrorAction\n& FilterDomainsAction\n& EditDomainRedirectsAction;\n\nexport const replaceRedirectsOnDomain = (domain: string, redirects: ShlinkDomainRedirects) =>\n (d: ShlinkDomain): ShlinkDomain => d.domain !== domain ? d : { ...d, redirects };\n\nexport default buildReducer({\n [LIST_DOMAINS_START]: () => ({ ...initialState, loading: true }),\n [LIST_DOMAINS_ERROR]: ({ errorData }) => ({ ...initialState, error: true, errorData }),\n [LIST_DOMAINS]: (_, { domains, defaultRedirects }) =>\n ({ ...initialState, domains, filteredDomains: domains, defaultRedirects }),\n [FILTER_DOMAINS]: (state, { searchTerm }) => ({\n ...state,\n filteredDomains: state.domains.filter(({ domain }) => domain.toLowerCase().match(searchTerm)),\n }),\n [EDIT_DOMAIN_REDIRECTS]: (state, { domain, redirects }) => ({\n ...state,\n domains: state.domains.map(replaceRedirectsOnDomain(domain, redirects)),\n filteredDomains: state.filteredDomains.map(replaceRedirectsOnDomain(domain, redirects)),\n }),\n}, initialState);\n\nexport const listDomains = (buildShlinkApiClient: ShlinkApiClientBuilder) => () => async (\n dispatch: Dispatch,\n getState: GetState,\n) => {\n dispatch({ type: LIST_DOMAINS_START });\n const { listDomains } = buildShlinkApiClient(getState);\n\n try {\n const { data: domains, defaultRedirects } = await listDomains();\n\n dispatch({ type: LIST_DOMAINS, domains, defaultRedirects });\n } catch (e: any) {\n dispatch({ type: LIST_DOMAINS_ERROR, errorData: parseApiError(e) });\n }\n};\n\nexport const filterDomains = (searchTerm: string): FilterDomainsAction => ({ type: FILTER_DOMAINS, searchTerm });\n","import { useEffect } from 'react';\nimport { Button, DropdownItem, Input, InputGroup, InputGroupAddon, UncontrolledTooltip } from 'reactstrap';\nimport { InputProps } from 'reactstrap/lib/Input';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faUndo } from '@fortawesome/free-solid-svg-icons';\nimport { isEmpty, pipe } from 'ramda';\nimport { DropdownBtn } from '../utils/DropdownBtn';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { DomainsList } from './reducers/domainsList';\nimport './DomainSelector.scss';\n\nexport interface DomainSelectorProps extends Omit {\n value?: string;\n onChange: (domain: string) => void;\n}\n\ninterface DomainSelectorConnectProps extends DomainSelectorProps {\n listDomains: Function;\n domainsList: DomainsList;\n}\n\nexport const DomainSelector = ({ listDomains, value, domainsList, onChange }: DomainSelectorConnectProps) => {\n const [ inputDisplayed,, showInput, hideInput ] = useToggle();\n const { domains } = domainsList;\n const valueIsEmpty = isEmpty(value);\n const unselectDomain = () => onChange('');\n\n useEffect(() => {\n listDomains();\n }, []);\n\n return inputDisplayed ? (\n \n onChange(e.target.value)}\n />\n \n \n \n \n \n Existing domains\n \n \n \n ) : (\n \n {domains.map(({ domain, isDefault }) => (\n onChange(domain)}\n >\n {domain}\n {isDefault && default}\n
\n ))}\n \n \n New domain\n \n \n );\n};\n","import { FC, useState } from 'react';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../../api/types';\nimport { FormGroupContainer, FormGroupContainerProps } from '../../utils/FormGroupContainer';\nimport { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../utils/utils';\nimport { InfoTooltip } from '../../utils/InfoTooltip';\n\ninterface EditDomainRedirectsModalProps {\n domain: ShlinkDomain;\n isOpen: boolean;\n toggle: () => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n}\n\nconst FormGroup: FC = ({ isLast, ...rest }) => (\n \n);\n\nexport const EditDomainRedirectsModal: FC = (\n { isOpen, toggle, domain, editDomainRedirects },\n) => {\n const [ baseUrlRedirect, setBaseUrlRedirect ] = useState(domain.redirects?.baseUrlRedirect ?? '');\n const [ regular404Redirect, setRegular404Redirect ] = useState(domain.redirects?.regular404Redirect ?? '');\n const [ invalidShortUrlRedirect, setInvalidShortUrlRedirect ] = useState(\n domain.redirects?.invalidShortUrlRedirect ?? '',\n );\n const handleSubmit = handleEventPreventingDefault(async () => editDomainRedirects(domain.domain, {\n baseUrlRedirect: nonEmptyValueOrNull(baseUrlRedirect),\n regular404Redirect: nonEmptyValueOrNull(regular404Redirect),\n invalidShortUrlRedirect: nonEmptyValueOrNull(invalidShortUrlRedirect),\n }).then(toggle));\n\n return (\n \n
\n Edit redirects for {domain.domain}\n \n \n \n Visitors accessing the base url, as in https://{domain.domain}/, will be redirected to this URL.\n \n Base URL\n \n \n \n Visitors accessing a url not matching a short URL pattern, as in https://{domain.domain}/???/[...],\n will be redirected to this URL.\n \n Regular 404\n \n \n \n Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be\n redirected to this URL.\n \n Invalid short URL\n \n \n \n \n \n \n
\n
\n );\n};\n","import { FC } from 'react';\nimport { Button, UncontrolledTooltip } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n faBan as forbiddenIcon,\n faCheck as defaultDomainIcon,\n faEdit as editIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport { ShlinkDomain, ShlinkDomainRedirects } from '../api/types';\nimport { useToggle } from '../utils/helpers/hooks';\nimport { OptionalString } from '../utils/utils';\nimport { SelectedServer } from '../servers/data';\nimport { supportsDefaultDomainRedirectsEdition } from '../utils/helpers/features';\nimport { EditDomainRedirectsModal } from './helpers/EditDomainRedirectsModal';\n\ninterface DomainRowProps {\n domain: ShlinkDomain;\n defaultRedirects?: ShlinkDomainRedirects;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n selectedServer: SelectedServer;\n}\n\nconst Nr: FC<{ fallback: OptionalString }> = ({ fallback }) => (\n \n {!fallback && No redirect}\n {fallback && <>{fallback} (as fallback)}\n \n);\nconst DefaultDomain: FC = () => (\n <>\n \n Default domain\n \n);\n\nexport const DomainRow: FC = ({ domain, editDomainRedirects, defaultRedirects, selectedServer }) => {\n const [ isOpen, toggle ] = useToggle();\n const { domain: authority, isDefault, redirects } = domain;\n const canEditDomain = !isDefault || supportsDefaultDomainRedirectsEdition(selectedServer);\n\n return (\n \n {isDefault ? : ''}\n {authority}\n \n {redirects?.baseUrlRedirect ?? }\n \n \n {redirects?.regular404Redirect ?? }\n \n \n {redirects?.invalidShortUrlRedirect ?? }\n \n \n \n \n \n {!canEditDomain && (\n \n Redirects for default domain cannot be edited here.\n
\n Use config options or env vars directly on the server.\n
\n )}\n \n \n \n );\n};\n","import { FC, useEffect } from 'react';\nimport Message from '../utils/Message';\nimport { Result } from '../utils/Result';\nimport { ShlinkApiError } from '../api/ShlinkApiError';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport SearchField from '../utils/SearchField';\nimport { ShlinkDomainRedirects } from '../api/types';\nimport { SelectedServer } from '../servers/data';\nimport { DomainsList } from './reducers/domainsList';\nimport { DomainRow } from './DomainRow';\n\ninterface ManageDomainsProps {\n listDomains: Function;\n filterDomains: (searchTerm: string) => void;\n editDomainRedirects: (domain: string, redirects: Partial) => Promise;\n domainsList: DomainsList;\n selectedServer: SelectedServer;\n}\n\nconst headers = [ '', 'Domain', 'Base path redirect', 'Regular 404 redirect', 'Invalid short URL redirect', '' ];\n\nexport const ManageDomains: FC = (\n { listDomains, domainsList, filterDomains, editDomainRedirects, selectedServer },\n) => {\n const { filteredDomains: domains, defaultRedirects, loading, error, errorData } = domainsList;\n const resolvedDefaultRedirects = defaultRedirects ?? domains.find(({ isDefault }) => isDefault)?.redirects;\n\n useEffect(() => {\n listDomains();\n }, []);\n\n if (loading) {\n return ;\n }\n\n const renderContent = () => {\n if (error) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n {headers.map((column, index) => )}\n \n \n {domains.length < 1 && }\n {domains.map((domain) => (\n \n ))}\n \n
{column}
No results found
\n
\n );\n };\n\n return (\n <>\n \n {renderContent()}\n \n );\n};\n","import Bottle from 'bottlejs';\nimport { ConnectDecorator } from '../../container/types';\nimport { filterDomains, listDomains } from '../reducers/domainsList';\nimport { DomainSelector } from '../DomainSelector';\nimport { ManageDomains } from '../ManageDomains';\nimport { editDomainRedirects } from '../reducers/domainRedirects';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator) => {\n // Components\n bottle.serviceFactory('DomainSelector', () => DomainSelector);\n bottle.decorator('DomainSelector', connect([ 'domainsList' ], [ 'listDomains' ]));\n\n bottle.serviceFactory('ManageDomains', () => ManageDomains);\n bottle.decorator('ManageDomains', connect(\n [ 'domainsList', 'selectedServer' ],\n [ 'listDomains', 'filterDomains', 'editDomainRedirects' ],\n ));\n\n // Actions\n bottle.serviceFactory('listDomains', listDomains, 'buildShlinkApiClient');\n bottle.serviceFactory('filterDomains', () => filterDomains);\n bottle.serviceFactory('editDomainRedirects', editDomainRedirects, 'buildShlinkApiClient');\n};\n\nexport default provideServices;\n","import { Action } from 'redux';\nimport { buildActionCreator, buildReducer } from '../../utils/helpers/redux';\n\n/* eslint-disable padding-line-between-statements */\nexport const APP_UPDATE_AVAILABLE = 'shlink/appUpdates/APP_UPDATE_AVAILABLE';\nexport const RESET_APP_UPDATE = 'shlink/appUpdates/RESET_APP_UPDATE';\n/* eslint-enable padding-line-between-statements */\n\nconst initialState = false;\n\nexport default buildReducer>({\n [APP_UPDATE_AVAILABLE]: () => true,\n [RESET_APP_UPDATE]: () => false,\n}, initialState);\n\nexport const appUpdateAvailable = buildActionCreator(APP_UPDATE_AVAILABLE);\n\nexport const resetAppUpdate = buildActionCreator(RESET_APP_UPDATE);\n","import { FC, MouseEventHandler } from 'react';\nimport { Alert, Button } from 'reactstrap';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSyncAlt as reloadIcon } from '@fortawesome/free-solid-svg-icons';\nimport { SimpleCard } from '../utils/SimpleCard';\nimport { useToggle } from '../utils/helpers/hooks';\nimport './AppUpdateBanner.scss';\n\ninterface AppUpdateBannerProps {\n isOpen: boolean;\n toggle: MouseEventHandler;\n forceUpdate: Function;\n}\n\nexport const AppUpdateBanner: FC = ({ isOpen, toggle, forceUpdate }) => {\n const [ isUpdating,, setUpdating ] = useToggle();\n const update = () => {\n setUpdating();\n forceUpdate();\n };\n\n return (\n \n

This app has just been updated!

\n

\n Restart it to enjoy the new features.\n \n

\n
\n );\n};\n","export const forceUpdate = async () => {\n const registrations = await navigator.serviceWorker?.getRegistrations() ?? [];\n\n for (const registration of registrations) {\n const { waiting } = registration;\n\n waiting?.addEventListener('statechange', (event) => {\n if ((event.target as any)?.state === 'activated') {\n window.location.reload();\n }\n });\n\n // The logic that makes skipWaiting to be called when this message is posted is in service-worker.ts\n waiting?.postMessage({ type: 'SKIP_WAITING' });\n }\n};\n","import { useEffect, FC } from 'react';\nimport { Route, RouteChildrenProps, Switch } from 'react-router-dom';\nimport classNames from 'classnames';\nimport NotFound from '../common/NotFound';\nimport { ServersMap } from '../servers/data';\nimport { Settings } from '../settings/reducers/settings';\nimport { changeThemeInMarkup } from '../utils/theme';\nimport { AppUpdateBanner } from '../common/AppUpdateBanner';\nimport { forceUpdate } from '../utils/helpers/sw';\nimport './App.scss';\n\ninterface AppProps extends RouteChildrenProps {\n fetchServers: () => void;\n servers: ServersMap;\n settings: Settings;\n resetAppUpdate: () => void;\n appUpdated: boolean;\n}\n\nconst App = (\n MainHeader: FC,\n Home: FC,\n MenuLayout: FC,\n CreateServer: FC,\n EditServer: FC,\n Settings: FC,\n ManageServers: FC,\n ShlinkVersionsContainer: FC,\n) => ({ fetchServers, servers, settings, appUpdated, resetAppUpdate, location }: AppProps) => {\n const isHome = location.pathname === '/';\n\n useEffect(() => {\n // On first load, try to fetch the remote servers if the list is empty\n if (Object.keys(servers).length === 0) {\n fetchServers();\n }\n\n changeThemeInMarkup(settings.ui?.theme ?? 'light');\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
\n );\n};\n\nexport default App;\n","import Bottle, { Decorator } from 'bottlejs';\nimport { appUpdateAvailable, resetAppUpdate } from '../reducers/appUpdates';\nimport App from '../App';\nimport { ConnectDecorator } from '../../container/types';\n\nconst provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {\n // Components\n bottle.serviceFactory(\n 'App',\n App,\n 'MainHeader',\n 'Home',\n 'MenuLayout',\n 'CreateServer',\n 'EditServer',\n 'Settings',\n 'ManageServers',\n 'ShlinkVersionsContainer',\n );\n bottle.decorator('App', connect([ 'servers', 'settings', 'appUpdated' ], [ 'fetchServers', 'resetAppUpdate' ]));\n bottle.decorator('App', withRouter);\n\n // Actions\n bottle.serviceFactory('appUpdateAvailable', () => appUpdateAvailable);\n bottle.serviceFactory('resetAppUpdate', () => resetAppUpdate);\n};\n\nexport default provideServices;\n","import Bottle, { IContainer } from 'bottlejs';\nimport { withRouter } from 'react-router-dom';\nimport { connect as reduxConnect } from 'react-redux';\nimport { pick } from 'ramda';\nimport provideApiServices from '../api/services/provideServices';\nimport provideCommonServices from '../common/services/provideServices';\nimport provideShortUrlsServices from '../short-urls/services/provideServices';\nimport provideServersServices from '../servers/services/provideServices';\nimport provideVisitsServices from '../visits/services/provideServices';\nimport provideTagsServices from '../tags/services/provideServices';\nimport provideUtilsServices from '../utils/services/provideServices';\nimport provideMercureServices from '../mercure/services/provideServices';\nimport provideSettingsServices from '../settings/services/provideServices';\nimport provideDomainsServices from '../domains/services/provideServices';\nimport provideAppServices from '../app/services/provideServices';\nimport { ConnectDecorator } from './types';\n\ntype LazyActionMap = Record;\n\nconst bottle = new Bottle();\nconst { container } = bottle;\n\nconst lazyService = (container: IContainer, serviceName: string) =>\n (...args: any[]) => (container[serviceName] as T)(...args) as K;\nconst mapActionService = (map: LazyActionMap, actionName: string): LazyActionMap => ({\n ...map,\n // Wrap actual action service in a function so that it is lazily created the first time it is called\n [actionName]: lazyService(container, actionName),\n});\nconst connect: ConnectDecorator = (propsFromState: string[] | null, actionServiceNames: string[] = []) =>\n reduxConnect(\n propsFromState ? pick(propsFromState) : null,\n actionServiceNames.reduce(mapActionService, {}),\n );\n\nprovideAppServices(bottle, connect, withRouter);\nprovideCommonServices(bottle, connect, withRouter);\nprovideApiServices(bottle);\nprovideShortUrlsServices(bottle, connect, withRouter);\nprovideServersServices(bottle, connect, withRouter);\nprovideTagsServices(bottle, connect);\nprovideVisitsServices(bottle, connect);\nprovideUtilsServices(bottle);\nprovideMercureServices(bottle);\nprovideSettingsServices(bottle, connect);\nprovideDomainsServices(bottle, connect);\n\nexport default container;\n","import { combineReducers } from 'redux';\nimport serversReducer from '../servers/reducers/servers';\nimport selectedServerReducer from '../servers/reducers/selectedServer';\nimport shortUrlsListReducer from '../short-urls/reducers/shortUrlsList';\nimport shortUrlsListParamsReducer from '../short-urls/reducers/shortUrlsListParams';\nimport shortUrlCreationReducer from '../short-urls/reducers/shortUrlCreation';\nimport shortUrlDeletionReducer from '../short-urls/reducers/shortUrlDeletion';\nimport shortUrlEditionReducer from '../short-urls/reducers/shortUrlEdition';\nimport shortUrlVisitsReducer from '../visits/reducers/shortUrlVisits';\nimport tagVisitsReducer from '../visits/reducers/tagVisits';\nimport orphanVisitsReducer from '../visits/reducers/orphanVisits';\nimport shortUrlDetailReducer from '../short-urls/reducers/shortUrlDetail';\nimport tagsListReducer from '../tags/reducers/tagsList';\nimport tagDeleteReducer from '../tags/reducers/tagDelete';\nimport tagEditReducer from '../tags/reducers/tagEdit';\nimport mercureInfoReducer from '../mercure/reducers/mercureInfo';\nimport settingsReducer from '../settings/reducers/settings';\nimport domainsListReducer from '../domains/reducers/domainsList';\nimport visitsOverviewReducer from '../visits/reducers/visitsOverview';\nimport appUpdatesReducer from '../app/reducers/appUpdates';\nimport { ShlinkState } from '../container/types';\n\nexport default combineReducers({\n servers: serversReducer,\n selectedServer: selectedServerReducer,\n shortUrlsList: shortUrlsListReducer,\n shortUrlsListParams: shortUrlsListParamsReducer,\n shortUrlCreationResult: shortUrlCreationReducer,\n shortUrlDeletion: shortUrlDeletionReducer,\n shortUrlEdition: shortUrlEditionReducer,\n shortUrlVisits: shortUrlVisitsReducer,\n tagVisits: tagVisitsReducer,\n orphanVisits: orphanVisitsReducer,\n shortUrlDetail: shortUrlDetailReducer,\n tagsList: tagsListReducer,\n tagDelete: tagDeleteReducer,\n tagEdit: tagEditReducer,\n mercureInfo: mercureInfoReducer,\n settings: settingsReducer,\n domainsList: domainsListReducer,\n visitsOverview: visitsOverviewReducer,\n appUpdated: appUpdatesReducer,\n});\n","import ReduxThunk from 'redux-thunk';\nimport { applyMiddleware, compose, createStore } from 'redux';\nimport { save, load, RLSOptions } from 'redux-localstorage-simple';\nimport reducers from '../reducers';\n\nconst isProduction = process.env.NODE_ENV !== 'production';\nconst composeEnhancers: Function = !isProduction && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst localStorageConfig: RLSOptions = {\n states: [ 'settings', 'servers' ],\n namespace: 'shlink',\n namespaceSeparator: '.',\n debounce: 300,\n};\n\nconst store = createStore(reducers, load(localStorageConfig), composeEnhancers(\n applyMiddleware(save(localStorageConfig), ReduxThunk),\n));\n\nexport default store;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL ?? '', window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://cra.link/PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://cra.link/PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import L from 'leaflet';\nimport marker2x from 'leaflet/dist/images/marker-icon-2x.png';\nimport marker from 'leaflet/dist/images/marker-icon.png';\nimport markerShadow from 'leaflet/dist/images/marker-shadow.png';\n\nexport const fixLeafletIcons = () => {\n delete (L.Icon.Default.prototype as any)._getIconUrl;\n\n L.Icon.Default.mergeOptions({\n iconRetinaUrl: marker2x,\n iconUrl: marker,\n shadowUrl: markerShadow,\n });\n};\n","import { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { BrowserRouter } from 'react-router-dom';\nimport { homepage } from '../package.json';\nimport container from './container';\nimport store from './container/store';\nimport { fixLeafletIcons } from './utils/helpers/leaflet';\nimport { register as registerServiceWorker } from './serviceWorkerRegistration';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport 'leaflet/dist/leaflet.css';\nimport './index.scss';\n\n// This overwrites icons used for leaflet maps, fixing some issues caused by webpack while processing the CSS\nfixLeafletIcons();\n\nconst { App, ScrollToTop, ErrorHandler, appUpdateAvailable } = container;\n\nrender(\n \n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nregisterServiceWorker({\n onUpdate() {\n store.dispatch(appUpdateAvailable()); // eslint-disable-line @typescript-eslint/no-unsafe-call\n },\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"],"sourceRoot":""} \ No newline at end of file