1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0cf2e4f5-a456-51f4-8c85-3e0a9299d524")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[65880],{26938:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[aliasID]/admin/discount-nodes/new",function(){return n(71355)}])},71355:function(e,t,n){"use strict";n.r(t);var o=n(85893),r=n(67294),a=n(41484),s=n(30381),u=n.n(s),i=n(64928),c=n(56989),l=n(83216),d=n(77775),p=n(69716),g=n(11467),m=n(43764),D=n(86153),h=n(48452),I=n(11524),f=n(68254),x=n(10168),y=n(95714),C=n(92444),j=n(6310);function _(e){return(0,o.jsx)("div",{className:"flex items-center gap-10",children:(0,o.jsx)(l.Z,{segments:[{text:e.t("helpers:home"),href:"/".concat(e.groupAliasID,"/admin/home")},{text:e.t("helpers:discounts"),href:"/".concat(e.groupAliasID,"/admin/discount-nodes")}],text:e.t("discountNode:createLeagueAndTournamentDiscount")})})}t.default=(0,I.cA)((0,m.r)("Discounts")(function(e){let{t}=(0,a.$G)(["common","helpers","league","discountNode"]),n=(0,h.Qy)(e=>e.auth.user),s=(0,h.u5)(),l=(0,x.V)((0,r.useCallback)(async()=>{let[t,o]=await Promise.all([(0,j.rw)({groupID:e.groupID},n),(0,j.AQ)({groupID:e.groupID},n),(0,i.Bk)({groupID:e.groupID},n)]),r=(0,j.g8)(o);return t.sort(r),{tags:t,tagGroups:o}},[e.groupID,n])),m=(0,x.V)((0,r.useCallback)(async()=>await (0,i.Bk)({groupID:e.groupID},n).then(t=>{var n,o,r,a;return{id:e.groupID,aliasID:null!==(o=t.aliasID)&&void 0!==o?o:"",timeZone:null!==(r=t.timeZone)&&void 0!==r?r:u().tz.guess(),currency:t.countryShort&&null!==(a=null===(n=(0,c.getCurrencyFromCountryCode)(t.countryShort))||void 0===n?void 0:n.code)&&void 0!==a?a:"USD"}}),[e.groupID,n]));async function I(o,r){try{await (0,f.dD)({groupID:e.groupID,discountRevision:o,discountCodes:r},n),y.Z.push("/[aliasID]/admin/discount-nodes","/".concat(e.aliasID,"/admin/discount-nodes"))}catch(e){s((0,D.b0)((0,c.prettifyErrorMessage)(t,e,"Could not create league discount.")))}}let b=(0,g.W)([[l,!1],[m,!1]]);return(0,o.jsxs)(o.Fragment,{children:[(0,C.D)({title:t("discountNode:createLeagueAndTournamentDiscount")}),(0,o.jsx)(g.Z,{...b,LoadingComponent:(0,o.jsx)(d.Z,{LeftComponent:(0,o.jsx)(_,{groupAliasID:e.aliasID,t:t}),children:(0,o.jsx)(d.Z.Loading,{})}),ErrorComponent:(0,o.jsx)(d.Z,{LeftComponent:(0,o.jsx)(_,{groupAliasID:e.aliasID,t:t}),children:(0,o.jsx)(d.Z.Error,{message:(0,c.prettifyErrorMessage)(t,b.query.error),children:(0,o.jsx)("button",{type:"button",onClick:()=>{l.reload(),m.reload()},className:"btn btn-primary btn-sm",children:t("helpers:reload")})})}),EmptyComponent:null,isEmpty:!1,children:(0,o.jsx)(d.Z,{LeftComponent:(0,o.jsx)(_,{groupAliasID:e.aliasID,t:t}),children:l.data&&m.data&&(0,o.jsx)(p.Z,{discountNode:null,tags:l.data.tags,tagGroups:l.data.tagGroups,group:m.data,mode:"create",onSubmit:I})})})]})}))}},function(e){e.O(0,[87536,96825,30239,41160,29195,43764,91138,89674,35648,92796,34921,95192,34351,37072,80935,5723,98809,64462,92888,49774,40179],function(){return e(e.s=26938)}),_N_E=e.O()}]); 4//# sourceMappingURL=new-a66bbfde716159c5.js.map 5//# debugId=0cf2e4f5-a456-51f4-8c85-3e0a9299d524
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.