1"use strict";(self.webpackChunkcoder=self.webpackChunkcoder||[]).push([[7141],{33432:function(e,t,n){var r=n(9950),i=n(20412),a=n(48392),s=n(79394),o=n(10819),c=n(44414),l=function(e){var t=e.children,n=e.openTutorial,r=e.className;return(0,c.jsxs)("div",{className:"border display-font flex-row text-primary-dark items-center border-black-normal text-xs relative pl-4 py-2\n ".concat(null!==r&&void 0!==r?r:""),onClick:function(){n&&o.i.navigateTo(s.S.MARKDOWN_PAGE("tutorial/".concat(n,".md")))},children:[(0,c.jsx)("span",{className:"flex-1 flex-col flex",children:t}),(0,c.jsx)("div",{className:"justify-end h-full text-primary-dark",children:(0,c.jsx)(i.A,{className:"h-4 w-4 mr-2",url:a.W2C})})]})},u=r.memo(l);t.A=u},45010:function(e,t,n){n.d(t,{_:function(){return r}});var r=[{oneOf:[{itemType:"EPIC_CACHE_FRAGMENT",amount:2,weight:10},{itemType:"EPIC_CACHE_FRAGMENT",amount:3,weight:50},{itemType:"EPIC_CACHE_FRAGMENT",amount:4,weight:70},{itemType:"EPIC_CACHE_FRAGMENT",amount:5,weight:55},{itemType:"EPIC_CACHE_FRAGMENT",amount:6,weight:22}]}]},56471:function(e,t,n){n.d(t,{h:function(){return p}});var r,i=n(60436),a=n(24765),s=n(23029),o=n(92901),c=n(39874),l=n(85501),u=n(52576),m=n(35119),f=["BOOTS","HELMET","LOWER_ARMOR","UPPER_ARMOR","PRIMARY_WEAPON","SECONDARY_WEAPON","TERTIARY_WEAPON","UPGRADE_MODULE"],d=function(e){var t=e.tier,n=e.unit,r=e.chancePerUnit;return f.map((function(e){return{itemType:"".concat(t.toUpperCase(),"_").concat(e,"_CACHE"),unit:n,chancePerUnit:r}}))},p=function(e){function t(e){var n;return(0,s.A)(this,t),(n=(0,c.A)(this,t,[e.value])).options=e,n}return(0,l.A)(t,e),(0,o.A)(t,[{key:"getDisplayName",value:function(){return this.options.displayName}},{key:"getVoucherItemType",value:function(){return this.options.voucherItemType}},{key:"getRedemptionRewardConfig",value:function(){return this.options.redemptionRewardConfig}},{key:"getDonationItemConfigs",value:function(){return this.options.donationItemConfigs}},{key:"getDonationItemConfigByItemType",value:function(e){var t=String(e);return this.getDonationItemConfigs().find((function(e){return e.itemType===t}))||null}}],[{key:"getTierByItemType",value:function(e){var t,n=String(e),r=(0,a.A)(this.getValues());try{for(r.s();!(t=r.n()).done;){var i=t.value,s=i.getDonationItemConfigByItemType(n);if(s)return{config:s,tier:i}}}catch(o){r.e(o)}finally{r.f()}return null}}])}(u.g);r=p,p.LOW=new r({value:"LOW",displayName:(0,m.vV)("voucherTier.low","Low"),voucherItemType:"RECLAMATION_DEPOT_VOUCHER_LOW",redemptionRewardConfig:{items:[{itemType:"COMMUNITY_RAFFLE_KIT",chance:.01}]},donationItemConfigs:[].concat((0,i.A)(d({tier:"TRASH",unit:1e3,chancePerUnit:.2})),(0,i.A)(d({tier:"COMMON",unit:1e3,chancePerUnit:.3})),(0,i.A)(d({tier:"HIGH_QUALITY",unit:1e3,chancePerUnit:.4})),(0,i.A)(d({tier:"RARE",unit:1e3,chancePerUnit:.5})),[{itemType:"UPGRADE_CHANCE_INCREASER",unit:100,chancePerUnit:.4},{itemType:"MEDICAL_TECH_PARTS",unit:1e3,chancePerUnit:.5},{itemType:"MEDICAL_TECH_CLUSTER",unit:1,chancePerUnit:.6},{itemType:"TECH_SCRAP",unit:1e3,chancePerUnit:.2},{itemType:"TECH_SCRAP_CLUSTER",unit:1,chancePerUnit:.3},{itemType:"LOOT_BOX_1",unit:100,chancePerUnit:.2},{itemType:"LOOT_BOX_2",unit:10,chancePerUnit:.3},{itemType:"PET_FOOD",unit:1,chancePerUnit:.1},{itemType:"PET_TOY",unit:1,chancePerUnit:.1},{itemType:"PET_CLEANER",unit:1,chancePerUnit:.1}])}),p.HIGH=new r({value:"HIGH",displayName:(0,m.vV)("voucherTier.high","High"),voucherItemType:"RECLAMATION_DEPOT_VOUCHER_HIGH",redemptionRewardConfig:{items:[{itemType:"COMMUNITY_RAFFLE_KIT",chance:.05}]},donationItemConfigs:[].concat((0,i.A)(d({tier:"LEGENDARY",unit:100,chancePerUnit:1})),(0,i.A)(d({tier:"EPIC",unit:1,chancePerUnit:.7})),[{itemType:"LOOT_BOX_3",unit:10,chancePerUnit:.3},{itemType:"AI_CORE_CLUSTER",unit:1,chancePerUnit:.1}])}),p.init()},87412:function(e,t,n){n.d(t,{s:function(){return J}});var r,i,a,s,o,c,l,u,m,f,d,p,h,v,y,A,g,N,x,b,R,w,E,C,T,I,k,S,O,_,D,L,j,P,V=n(60436),M=n(90675),U=n(10467),F=n(23029),H=n(92901),G=n(54167),Y=n(793),z=n(41742),B=n(58816),W=(r=(0,B.wR)("n"),i=(0,B.wR)("j"),a=(0,H.A)((function e(){(0,F.A)(this,e),(0,G.A)(this,"playerDisplayName",s,this),(0,G.A)(this,"joinedAt",o,this)})),s=(0,Y.A)(a.prototype,"playerDisplayName",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),o=(0,Y.A)(a.prototype,"joinedAt",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),a),K=n(25916),Q=(c=(0,B.wR)("i"),l=(0,B.wR)("c"),u=(0,B.wR)("cn"),m=(0,B.wR)("t"),f=(0,B.wR)("d"),d=(0,B.wR)("eq"),p=(0,B._j)(K.C),h=(0,B.wR)("l"),v=(0,B.wR)("ca"),y=(0,B.wR)("cl"),A=(0,B.wR)("s"),g=(0,B.wR)("en"),N=(0,B.QN)(W),x=(0,B.wR)("w"),b=(0,B.wR)("ta"),R=function(){return(0,H.A)((function e(){(0,F.A)(this,e),(0,G.A)(this,"id",w,this),(0,G.A)(this,"creatorId",E,this),(0,G.A)(this,"creatorDisplayName",C,this),(0,G.A)(this,"title",T,this),(0,G.A)(this,"description",I,this),(0,G.A)(this,"equipments",k,this),(0,G.A)(this,"minimumLevel",S,this),(0,G.A)(this,"createdAt",O,this),(0,G.A)(this,"closesAt",_,this),(0,G.A)(this,"status",D,this),(0,G.A)(this,"entries",L,this),(0,G.A)(this,"winnerPlayerId",j,this),(0,G.A)(this,"terminalAt",P,this)}),[{key:"getStatus",value:function(e){var t=this.closesAt+1e3*z.T.COMMUNITY_RAFFLE.FINALIZATION_GRACE_SECONDS;return"OPEN"===this.status&&e>=t?"ABANDONED":this.status}},{key:"getViewerRelation",value:function(e){return this.creatorId===e?"HOSTING":this.entries[e]?"JOINED":"NONE"}}])}(),w=(0,Y.A)(R.prototype,"id",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),E=(0,Y.A)(R.prototype,"creatorId",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=(0,Y.A)(R.prototype,"creatorDisplayName",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),T=(0,Y.A)(R.prototype,"title",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),I=(0,Y.A)(R.prototype,"description",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),k=(0,Y.A)(R.prototype,"equipments",[d,p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),S=(0,Y.A)(R.prototype,"minimumLevel",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),O=(0,Y.A)(R.prototype,"createdAt",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),_=(0,Y.A)(R.prototype,"closesAt",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),D=(0,Y.A)(R.prototype,"status",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"OPEN"}}),L=(0,Y.A)(R.prototype,"entries",[g,N],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),j=(0,Y.A)(R.prototype,"winnerPlayerId",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),P=(0,Y.A)(R.prototype,"terminalAt",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),R),X=n(87042),q=n(23327),$=n(90332),Z=n(8240),J=function(){return(0,H.A)((function e(){(0,F.A)(this,e)}),null,[{key:"getCachedList",value:function(){return q.A.communityRaffles}},{key:"getCachedDetail",value:function(e){var t,n;return null!==(t=null===(n=q.A.communityRaffles)||void 0===n?void 0:n.find((function(t){return t.id===e})))&&void 0!==t?t:null}},{key:"list",value:function(){var e=(0,U.A)((0,M.A)().mark((function e(){var t,n,r,i,a,s,o=this,c=arguments;return(0,M.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>0&&void 0!==c[0]&&c[0],r=this.getCachedList(),n||null===r){e.next=4;break}return e.abrupt("return",r);case 4:return i=++this.cacheVersion,e.next=7,Z.w.send("POST","/community-raffle/list",{});case 7:return a=e.sent,s=a.map((function(e){return o.hydrateRaffle(e)})),i===this.cacheVersion&&(q.A.communityRaffles=s),e.abrupt("return",null!==(t=this.getCachedList())&&void 0!==t?t:s);case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"create",value:function(){var e=(0,U.A)((0,M.A)().mark((function e(t){var n;return(0,M.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z.w.send("POST","/community-raffle/create",t);case 2:return n=e.sent,e.next=5,$.n.onActionComplete(n.completedAction);case 5:return e.abrupt("return",this.cacheRaffle(this.hydrateRaffle(n.raffle)));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"detail",value:function(){var e=(0,U.A)((0,M.A)().mark((function e(t){var n,r,i,a=arguments;return(0,M.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>1&&void 0!==a[1]&&a[1],r=this.getCachedDetail(t),n||!r){e.next=4;break}return e.abrupt("return",r);case 4:return e.prev=4,e.next=7,Z.w.send("POST","/community-raffle/detail",{id:t});case 7:return i=e.sent,e.abrupt("return",i?this.cacheRaffle(this.hydrateRaffle(i)):null);case 11:if(e.prev=11,e.t0=e.catch(4),!"".concat(e.t0).includes('"communityRaffle.error.notFound"')){e.next=15;break}return e.abrupt("return",null);case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,this,[[4,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"join",value:function(){var e=(0,U.A)((0,M.A)().mark((function e(t){var n;return(0,M.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z.w.send("POST","/community-raffle/join",{id:t});case 2:return n=e.sent,e.abrupt("return",this.cacheRaffle(this.hydrateRaffle(n)));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteRaffle",value:function(){var e=(0,U.A)((0,M.A)().mark((function e(t){return(0,M.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.n.resolveCompleteApi((function(){return Z.w.send("POST","/community-raffle/delete",{id:t})}),{throwError:!0});case 2:this.cacheVersion+=1,null!==q.A.communityRaffles&&(q.A.communityRaffles=q.A.communityRaffles.filter((function(e){return e.id!==t})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"closeRaffle",value:function(){var e=(0,U.A)((0,M.A)().mark((function e(t){var n;return(0,M.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z.w.send("POST","/community-raffle/close",{id:t});case 2:return n=e.sent,e.abrupt("return",this.cacheRaffle(this.hydrateRaffle(n)));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"hydrateRaffle",value:function(e){return X.p.hydrate(Q,e,"CommunityRaffle")}},{key:"cacheRaffle",value:function(e){return this.cacheVersion+=1,null!==q.A.communityRaffles&&(q.A.communityRaffles=[].concat((0,V.A)(q.A.communityRaffles.filter((function(t){return t.id!==e.id}))),[e])),e}}])}();J.cacheVersion=0},23559:function(e,t,n){n.d(t,{w:function(){return o}});var r=n(60436),i=n(23029),a=n(92901),s=n(41742),o=function(){return(0,a.A)((function e(){(0,i.A)(this,e)}),null,[{key:"isValidId",value:function(e){return"string"===typeof e&&/^[-0-9A-Z_a-z]+$/.test(e)}},{key:"getRankedRaffles",value:function(e,t,n){var i=function(e){var r=e.getStatus(t);return"OPEN"===r&&"JOINED"===e.getViewerRelation(n)?0:"OPEN"===r?1:2};return(0,r.A)(e).sort((function(e,t){return i(e)-i(t)||t.createdAt-e.createdAt}))}},{key:"getActionVisibility",value:function(e,t,n,r){var i=e.closesAt,a=t<i,o=t<i+1e3*s.T.COMMUNITY_RAFFLE.FINALIZATION_GRACE_SECONDS,c="OPEN"===e.getStatus(t),l=e.getViewerRelation(n);return{join:c&&a&&"NONE"===l&&r,closeRaffle:c&&"HOSTING"===l&&!a&&o}}},{key:"validateCreate",value:function(e){var t,n={},r=e.title.trim().length;return 0===r?n.title="REQUIRED":(r<s.T.COMMUNITY_RAFFLE.TITLE_LENGTH.MIN||r>s.T.COMMUNITY_RAFFLE.TITLE_LENGTH.MAX)&&(n.title="LENGTH"),(null===(t=e.description)||void 0===t?void 0:t.trim().length)>s.T.COMMUNITY_RAFFLE.DESCRIPTION_MAX_LENGTH&&(n.description="LENGTH"),s.T.COMMUNITY_RAFFLE.DURATION_SECONDS.includes(e.durationSeconds)||(n.durationSeconds="INVALID"),(!Number.isInteger(e.minimumLevel)||e.minimumLevel<s.T.COMMUNITY_RAFFLE.ENTRY_LEVEL.MIN||e.minimumLevel>s.T.COMMUNITY_RAFFLE.ENTRY_LEVEL.MAX)&&(n.minimumLevel="INVALID"),n}}])}()},99582:function(e,t,n){n.d(t,{A:function(){return _}});var r=n(9950),i=n(31673),a=n(48392),s=n(20412),o=n(79394),c=n(60436),l=n(24765),u=n(23029),m=n(92901),f=n(45010),d=n(46953),p=n(85393),h=n(45346),v=n(22775),y=n(12078),A=n(16198),g=n(34518),N=n(32135),x=n(41341),b=n(56471),R=n(32158),w=n(81675),E=n(35119),C=function(){return(0,m.A)((function e(){(0,u.A)(this,e)}),null,[{key:"getSources",value:function(e,t){var n=new Map;return this.addDropSources(n,e,t),this.addNpcShopSources(n,e,t),this.addRecipeSources(n,e,t),Array.from(n.values())}},{key:"canAccessNpc",value:function(e,t){return!(!e.isAvailable()||e.shouldHide(t)||e.shouldLock(t))&&y.a.getValues().some((function(n){return n.getNPCs().includes(e)&&!n.shouldHide(t)&&!n.shouldLock(t)}))}},{key:"addNpcShopSources",value:function(e,t,n){var r,i=(0,l.A)(g.s.getValues());try{for(i.s();!(r=i.n()).done;){var a=r.value,s=a.getShop();s&&this.canAccessNpc(a,n)&&s.getSellingItems(n).some((function(e){return e.itemType===t.toString()}))&&this.addSource(e,{id:"NPC_SHOP:".concat(a.toString()),name:a.getDisplayName(),type:"NPC_SHOP",npc:a})}}catch(o){i.e(o)}finally{i.f()}}},{key:"addRecipeSources",value:function(e,t,n){var r,i=(0,l.A)(N.T.getValues());try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.isEnabled(n)&&a.shouldShow(n)&&this.rewardContainsItem(a.getResults(),t)){var s,o=a.getNpcProfession();if(o)this.addNpcRecipeSources(e,o,n);else this.addSource(e,{id:"RECIPE:".concat(a.toString()),name:null!==(s=a.getDisplayName())&&void 0!==s?s:a.toString(),type:"RECIPE"})}}}catch(x){i.e(x)}finally{i.f()}var c,u=(0,l.A)(A.u.getValues());try{for(u.s();!(c=u.n()).done;){var m=c.value;this.rewardContainsItem(m.getReward(),t)&&this.addNpcRecipeSources(e,m.getNPCProfession(),n)}}catch(x){u.e(x)}finally{u.f()}var f,h=(0,l.A)(d.d.getValues());try{for(h.s();!(f=h.n()).done;){var v=f.value;if(this.rewardContainsItem(v.getRewardConfig(),t)){var y=g.s.BLACK_MARKET;v.getSubtype().equals(p.l.RECYCLE)&&(y=g.s.RECYCLE_MACHINE),this.canAccessNpc(y,n)&&this.addSource(e,{id:"RECIPE:".concat(y.toString()),name:y.getDisplayName(),type:"RECIPE",npc:y})}}}catch(x){h.e(x)}finally{h.f()}}},{key:"addNpcRecipeSources",value:function(e,t,n){var r,i=(0,l.A)(g.s.getValues());try{for(i.s();!(r=i.n()).done;){var a=r.value;a.getProfession()===t&&this.canAccessNpc(a,n)&&this.addSource(e,{id:"RECIPE:".concat(a.toString()),name:a.getDisplayName(),type:"RECIPE",npc:a})}}catch(s){i.e(s)}finally{i.f()}}},{key:"addDropSources",value:function(e,t,n){var r=this;this.addReclamationDepotSource(e,t,n),this.addEquipmentExchangeSource(e,t,n),[R.l5,R.no,[R.WA]
1].concat((0,c.A)(h.e.getValues().map((function(e){return e.getDrops()})))).some((function(e){return r.dropsContainItem(e,t)}))&&this.addSource(e,{id:"DROP:ENEMIES",name:(0,E.vV)("itemSource.drop.enemies","Enemies"),type:"DROP"}),x.n.getValues().some((function(e){return r.rewardContainsItem(e.getRewards(),t)}))&&this.addSource(e,{id:"DROP:DUNGEONS",name:(0,E.vV)("itemSource.drop.dungeons","Dungeons"),type:"DROP"}),(this.rewardContainsItem(R.dA,t)||this.rewardContainsItem(R.S7,t))&&this.addSource(e,{id:"DROP:LOOT_BOXES",name:(0,E.vV)("itemSource.drop.lootBoxes","Loot boxes"),type:"DROP"}),this.addEventDropSources(e,t)}},{key:"addEventDropSources",value:function(e,t){var n,r=this,i=(0,l.A)(v.r.getActiveEvents());try{for(i.s();!(n=i.n()).done;){var a,s=n.value;this.addEventDropSource(e,t,s,s.getMonsterBonusDrops(),"MONSTERS",(0,E.vV)("itemSource.event.monsterDrops","Monster drops")),this.addEventDropSource(e,t,s,s.getAfkBotFarmDrops(),"AUTO_FARM",(0,E.vV)("action.autoFarm.name","Deploy farm bot")),this.addEventDropSource(e,t,s,s.getScavengingBonusDrops(),"SCAVENGING",(0,E.vV)("itemSource.event.scavenging","Scavenging")),this.addEventDropSource(e,t,s,s.getDungeonChestBonusDrops(),"DUNGEON_CHESTS",(0,E.vV)("itemSource.event.dungeonChests","Dungeon chests")),this.addEventDropSource(e,t,s,null!==(a=s.getChatReward())&&void 0!==a?a:[],"CHAT_REWARDS",(0,E.vV)("itemSource.event.chatRewards","Chat rewards"));var o=s.getEventGame();null!==o&&void 0!==o&&o.tierRewards.some((function(e){return r.rewardContainsItem(e,t)}))&&this.addSource(e,{description:s.getDisplayName(),id:"DROP:EVENT:".concat(s.toString(),":EVENT_GAME"),name:(0,E.vV)("itemSource.event.gameRewards","${game} rewards",{game:o.displayName}),type:"DROP"})}}catch(c){i.e(c)}finally{i.f()}}},{key:"addEventDropSource",value:function(e,t,n,r,i,a){this.dropsContainItem(r,t)&&this.addSource(e,{description:n.getDisplayName(),id:"DROP:EVENT:".concat(n.toString(),":").concat(i),name:a,type:"DROP"})}},{key:"addReclamationDepotSource",value:function(e,t,n){var r=g.s.RECLAMATION_DEPOT;if(this.canAccessNpc(r,n)){var i,a=(0,l.A)(b.h.getValues());try{for(a.s();!(i=a.n()).done;){var s=i.value;this.rewardContainsItem(s.getRedemptionRewardConfig(),t)&&this.addSource(e,{description:(0,E.vV)("itemSource.drop.reclamationTier","Drop on ${tier}",{tier:s.getDisplayName()}),id:"DROP:".concat(r.toString(),":").concat(s.toString()),name:r.getDisplayName(),type:"DROP",npc:r})}}catch(o){a.e(o)}finally{a.f()}}}},{key:"addEquipmentExchangeSource",value:function(e,t,n){var r=g.s.EQUIPMENT_EXCHANGE;this.dropsContainItem(f._,t)&&this.canAccessNpc(r,n)&&this.addSource(e,{id:"DROP:".concat(r.toString()),name:r.getDisplayName(),type:"DROP",npc:r})}},{key:"rewardContainsItem",value:function(e,t){return!!(0,w.YL)(e,t.toString())}},{key:"dropsContainItem",value:function(e,t){return this.rewardContainsItem({items:e},t)}},{key:"addSource",value:function(e,t){e.has(t.id)||e.set(t.id,t)}}])}(),T=n(10819),I=n(19059),k=n(28417),S=n(23327),O=n(44414),_=(0,r.memo)((0,i.PA)((function(e){var t=e.itemType,n=e.allowLinking,r=void 0!==n&&n,i=S.A.getPlayer(),c=C.getSources(t,i);return(0,O.jsx)("div",{className:"h-full w-full items-center justify-center",onClick:function(e){e.target===e.currentTarget&&I.A.dismissDialog()},children:(0,O.jsxs)("div",{className:"mx-4 max-h-[calc(100%-2rem)] w-[calc(100%-2rem)] max-w-sm overflow-y-auto border border-gray-500 bg-black-darker text-left",children:[(0,O.jsxs)("div",{className:"relative h-8 overflow-hidden border-b border-gray-400 bg-white text-black",children:[(0,O.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 opacity-20",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent 0, transparent 1px, rgb(107 114 128) 1px, rgb(107 114 128) 2px)"}}),(0,O.jsxs)("div",{className:"relative h-8 flex-row items-center justify-between",children:[(0,O.jsx)("h2",{className:"px-3 font-mono text-xs font-bold uppercase tracking-widest !text-black",children:(0,E.vV)("itemSourceModal.title","Item sources")}),(0,O.jsx)("button",{type:"button","aria-label":(0,E.vV)("misc.close","Close"),className:"flex h-8 w-8 shrink-0 flex-row items-center justify-center border-l border-gray-400 text-black transition-colors hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-none active:bg-gray-300",onClick:function(){return I.A.dismissDialog()},children:(0,O.jsx)(s.A,{url:a.xfX,className:"h-3.5 w-3.5"})})]})]}),(0,O.jsxs)("div",{className:"p-4",children:[(0,O.jsx)("p",{className:"text-base font-semibold text-secondary",children:t.getDisplayName()}),(0,O.jsx)("p",{className:"mt-1 text-sm opacity-70",children:(0,E.vV)("itemSourceModal.description","You can get this item from:")}),0===c.length?(0,O.jsx)("p",{className:"mt-4 border-y border-black-normal py-5 text-sm opacity-60",children:(0,E.vV)("itemSourceModal.empty","No current sources found.")}):(0,O.jsx)("div",{className:"mt-4 w-full border-y border-black-normal text-left",children:c.map((function(e){var t,n,c=null===(t=e.npc)||void 0===t||null===(n=t.getLayeredImages())||void 0===n?void 0:n.background,l=(0,O.jsxs)(O.Fragment,{children:[c&&(0,O.jsx)(k.A,{src:c,alt:"",className:"pointer-events-none absolute inset-y-0 right-0 h-full w-3/4 object-cover opacity-20",style:{maskImage:"linear-gradient(to left, black 25%, transparent 100%)",WebkitMaskImage:"linear-gradient(to left, black 25%, transparent 100%)"}}),(0,O.jsxs)("div",{className:"relative z-10 min-w-0 flex-1",children:[(0,O.jsx)("span",{className:"break-words text-sm font-semibold",children:e.name}),e.description&&(0,O.jsx)("span",{className:"mt-0.5 break-words text-xs opacity-60",children:e.description})]})]}),u=r?e.npc:void 0;return u?(0,O.jsxs)("button",{type:"button",className:"relative flex min-h-11 w-full cursor-pointer flex-row items-center gap-3 overflow-hidden border-b border-black-normal px-3 py-2 text-left transition-colors duration-150 last:border-b-0 hover:bg-highlight focus-visible:bg-highlight focus-visible:outline-none active:bg-highlight-bright",onClick:function(){C.canAccessNpc(u,i)?(I.A.dismissDialog(),T.i.navigateTo(o.S.NPC_DETAILS(u.toString()))):I.A.showErrorNotification((0,E.vV)("ui.npc.notAvailable","This NPC is currently not available"))},children:[l,(0,O.jsx)(s.A,{url:a.N05,className:"relative z-10 h-4 w-4 shrink-0 text-secondary"})]},e.id):(0,O.jsx)("div",{className:"relative min-h-11 flex-row items-center gap-3 overflow-hidden border-b border-black-normal px-3 py-2 last:border-b-0",children:l},e.id)}))})]})]})})})))},76984:function(e,t,n){n.d(t,{_:function(){return c}});var r=n(23029),i=n(92901),a=n(41742),s=n(5886),o=n(23327),c=function(){return(0,i.A)((function e(){(0,r.A)(this,e)}),null,[{key:"getCreateBlockReason",value:function(){var e=o.A.getPlayer();return e.getLevel()<a.T.COMMUNITY_RAFFLE.CREATOR_MIN_LEVEL?"LEVEL_REQUIRED":e.isLimited()?"ACCOUNT_LIMITED":e.getInventoryFast().hasItemByType(s.S.COMMUNITY_RAFFLE_KIT)?null:"KIT_REQUIRED"}}])}()},43254:function(e,t,n){n.r(t),n.d(t,{default:function(){return D}});var r=n(90675),i=n(10467),a=n(5544),s=n(9950),o=n(28424),c=n(48392),l=n(79800),u=n(57329),m=n(33432),f=n(20412),d=n(69482),p=n(23559),h=n(87412),v=n(61291),y=n(35119),A=n(23327),g=n(56356),N=n(79394),x=n(10819),b=n(44414),R=function(e){var t=e.raffles,n=e.now;return 0===t.length?(0,b.jsxs)("div",{className:"min-h-[10rem] items-center justify-center p-6 text-center",children:[(0,b.jsx)("span",{className:"font-mono text-xs uppercase tracking-widest opacity-60",children:(0,y.vV)("communityRaffle.empty.title","No Community Raffles yet")}),(0,b.jsx)("p",{className:"mt-2 text-sm opacity-70",children:(0,y.vV)("communityRaffle.empty.description","Active and past raffles will appear here.")})]}):(0,b.jsx)("div",{className:"gap-2",children:t.map((function(e){var t=e.closesAt,r=e.getStatus(n),i=Math.max(0,Math.ceil((t-n)/1e3)),a=(0,y.vV)("communityRaffle.row.resultLabel","Result"),s=(0,y.vV)("communityRaffle.row.awaitingOrganizer","Awaiting organizer");i>0?(a=(0,y.vV)("communityRaffle.row.closesLabel","Closes in"),s=v.u.formatCompactDuration(i)):"OPEN"!==r&&(a=(0,y.vV)("communityRaffle.row.closedLabel","Closed"),s=new Date(e.closesAt).toLocaleStr
1ing());var o=(0,y.vV)("communityRaffle.status.open","Open");return"COMPLETED"===r?o=(0,y.vV)("communityRaffle.status.completed","Completed"):"ABANDONED"===r&&(o=(0,y.vV)("communityRaffle.status.abandoned","Abandoned")),(0,b.jsxs)("button",{type:"button",className:"flex w-full flex-row items-stretch bg-transparent text-left transition-colors duration-150 hover:bg-black-normal focus-visible:outline focus-visible:outline-1 focus-visible:outline-secondary",onClick:function(){return x.i.navigateTo(N.S.COMMUNITY_RAFFLE_DETAIL(e.id))},children:[(0,b.jsx)("span",{className:"w-1 shrink-0 bg-primary-dark"}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 px-3 py-2.5",children:[(0,b.jsxs)("span",{className:"flex flex-row items-start justify-between gap-3",children:[(0,b.jsx)("span",{className:"min-w-0 font-semibold break-words",children:e.title}),(0,b.jsx)("span",{className:"shrink-0 font-mono text-[0.65rem] uppercase tracking-widest text-secondary",children:o})]}),(0,b.jsxs)("span",{className:"mt-2 flex min-w-0 flex-row flex-wrap items-center gap-x-4 gap-y-1.5 font-mono text-[0.68rem] opacity-70",children:[(0,b.jsxs)("span",{className:"flex max-w-full min-w-0 flex-row items-center gap-1.5",children:[(0,b.jsx)("span",{className:"sr-only",children:(0,y.vV)("communityRaffle.row.hostLabel","Host")}),(0,b.jsx)(f.A,{className:"h-3.5 w-3.5 shrink-0",url:c.wAZ}),(0,b.jsx)(g.h,{className:"h-auto min-w-0 break-words text-[0.68rem]",name:e.creatorDisplayName,noBox:!0,showColor:!0})]}),(0,b.jsxs)("span",{className:"flex flex-row items-center gap-1.5",children:[(0,b.jsx)("span",{className:"sr-only",children:a}),(0,b.jsx)(f.A,{className:"h-3.5 w-3.5 shrink-0",url:c.CVk}),(0,b.jsx)("span",{className:"opacity-80",children:s})]}),(0,b.jsxs)("span",{className:"flex flex-row items-center gap-1.5",children:[(0,b.jsx)("span",{className:"sr-only",children:(0,y.vV)("communityRaffle.row.entriesLabel","Entries")}),(0,b.jsx)(f.A,{className:"h-3.5 w-3.5 shrink-0",url:c.wx_}),(0,b.jsx)("span",{className:"opacity-80",children:Object.keys(e.entries).length})]}),(0,b.jsx)("span",{className:"uppercase tracking-wide opacity-80",children:(0,y.vV)("communityRaffle.row.levelShort","LV ${level}+",{level:e.minimumLevel})})]})]})]},e.id)}))})},w=s.memo(R),E=n(31673),C=n(41742),T=n(5886),I=n(19059),k=n(99582),S=n(76984),O=s.memo((0,E.PA)((function(){if(!A.A.getPlayer())return null;var e=S._.getCreateBlockReason();return(0,b.jsxs)("button",{type:"button",className:"fixed bottom-[calc(3.5rem+env(safe-area-inset-bottom))] right-3 z-20 flex min-h-12 w-[10.5rem] flex-row items-stretch border border-secondary bg-black-darker text-left text-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-secondary",onClick:function(){"LEVEL_REQUIRED"!==e?"ACCOUNT_LIMITED"!==e?"KIT_REQUIRED"!==e?x.i.navigateTo(N.S.COMMUNITY_RAFFLE_CREATE):I.A.showDialog((function(){return(0,b.jsx)(k.A,{itemType:T.S.COMMUNITY_RAFFLE_KIT})}),{type:"fullscreen-backdrop-blur",containerStyle:{backgroundColor:"transparent",boxShadow:"none",minHeight:0,overflow:"visible",padding:0}}):I.A.showErrorNotification((0,y.vV)("communityRaffle.create.accountLimitedToast","Limited accounts cannot create Community Raffles.")):I.A.showErrorNotification((0,y.vV)("communityRaffle.create.levelRequiredToast","Reach level ${level} to create a Community Raffle.",{level:C.T.COMMUNITY_RAFFLE.CREATOR_MIN_LEVEL}))},children:[(0,b.jsx)("span",{"aria-hidden":"true",className:"flex w-10 shrink-0 flex-row items-center justify-center border-r border-black-darker bg-secondary font-mono text-xl text-black-darker",children:"+"}),(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col justify-center px-2 py-1.5",children:[(0,b.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider",children:(0,y.vV)("communityRaffle.create.action","Create raffle")}),(0,b.jsx)("span",{className:"mt-0.5 font-mono text-xs uppercase leading-tight tracking-wider",children:(0,y.vV)("communityRaffle.create.cost","1 Raffle Kit")})]})]})}))),_=function(){var e=s.useState((function(){var e;return null!==(e=h.s.getCachedList())&&void 0!==e?e:[]})),t=(0,a.A)(e,2),n=t[0],g=t[1],N=s.useState((function(){return null===h.s.getCachedList()})),x=(0,a.A)(N,2),R=x[0],E=x[1],C=s.useState(""),T=(0,a.A)(C,2),I=T[0],k=T[1],S=s.useState(!1),_=(0,a.A)(S,2),D=_[0],L=_[1],j=s.useState(v.u.getNow()),P=(0,a.A)(j,2),V=P[0],M=P[1],U=s.useRef(0),F=s.useCallback((0,i.A)((0,r.A)().mark((function e(){var t,n,i,a,s=arguments;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]&&s[0],n=s.length>1&&void 0!==s[1]&&s[1],i=++U.current,t&&(E(!0),k("")),e.prev=4,e.next=7,h.s.list(n);case 7:if(a=e.sent,i===U.current){e.next=10;break}return e.abrupt("return");case 10:g(a),k(""),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),t&&i===U.current&&k("".concat(e.t0));case 17:return e.prev=17,i===U.current&&E(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[4,14,17,20]])}))),[]),H=function(){var e=(0,i.A)((0,r.A)().mark((function e(){return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(!0),e.prev=1,e.next=4,F(!1,!0);case 4:return e.prev=4,L(!1),e.finish(4);case 7:case"end":return e.stop()}}),e,null,[[1,,4,7]])})));return function(){return e.apply(this,arguments)}}();(0,o.t5)((function(){var e=h.s.getCachedList();null!==e&&(U.current+=1,g(e),E(!1),k(""))}),[]),s.useEffect((function(){null===h.s.getCachedList()&&F(!0)}),[F]),s.useEffect((function(){var e=window.setInterval((function(){return M(v.u.getNow())}),3e4);return function(){return window.clearInterval(e)}}),[]);var G=p.w.getRankedRaffles(n,V,A.A.getPlayer().id),Y=(0,b.jsx)("div",{className:"gap-2","aria-label":(0,y.vV)("common.loading","Loading"),children:[0,1,2].map((function(e){return(0,b.jsxs)("div",{className:"h-20 flex-row animate-pulse opacity-40 motion-reduce:animate-none",children:[(0,b.jsx)("span",{className:"w-1 shrink-0 bg-primary-dark"}),(0,b.jsxs)("div",{className:"flex-1 justify-center gap-2 px-3",children:[(0,b.jsx)("div",{className:"h-3 w-3/5 bg-primary-dark"}),(0,b.jsx)("div",{className:"h-2 w-4/5 bg-black-normal"}),(0,b.jsx)("div",{className:"h-2 w-2/5 bg-black-normal"})]})]},e)}))}),z=(0,b.jsxs)("div",{className:"min-h-[12rem] items-center justify-center gap-3 border border-danger p-5 text-center",children:[(0,b.jsx)("h2",{className:"font-semibold text-danger",children:(0,y.vV)("communityRaffle.loadError.title","Raffle list unavailable")}),(0,b.jsx)(d.a,{className:"text-sm",text:I}),(0,b.jsx)(u.A,{className:"mb-0 w-full",title:(0,y.vV)("common.retry","Retry"),onClick:function(){return F(!0,!0)}})]}),B=Y;return I?B=z:R||(B=(0,b.jsx)(w,{raffles:G,now:V})),(0,b.jsxs)("main",{className:"flex flex-col h-full px-3 pb-36 pt-3",children:[(0,b.jsxs)("header",{className:"flex flex-row items-start justify-between border-b border-primary-dark pb-3",children:[(0,b.jsx)("div",{className:"min-w-0",children:(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:(0,y.vV)("communityRaffle.title","Community Raffles")})}),(0,b.jsx)("button",{type:"button",className:"flex h-11 w-11 shrink-0 flex-row items-center justify-center text-primary-dark hover:text-secondary active:opacity-70 focus-visible:outline focus-visible:outline-1 focus-visible:outline-secondary","aria-label":(0,y.vV)("communityRaffle.refresh","Refresh raffle list"),"aria-busy":D,disabled:D,onClick:H,children:(0,b.jsx)(f.A,{className:(0,l.QP)("h-4 w-4",D&&"animate-spin motion-reduce:animate-none"),url:D?c.E97:c.mVv})})]}),(0,b.jsxs)(m.A,{className:"mt-3 text-primary",openTutorial:"community-raffle",children:[(0,b.jsx)("span",{className:"font-semibold",children:(0,y.vV)("communityRaffle.tutorial.title","How Community Raffles work")}),(0,b.jsx)("span",{className:"opacity-70",children:(0,y.vV)("communityRaffle.tutorial.description","Create, join, and select a winner.")})]}),(0,b.jsx)("div",{className:"mt-3",children:B}),(0,b.jsx)(O,{})]})},D=s.memo(_)}}]);
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.