1/*! @preserve Third-party software notices: /legal/THIRD_PARTY_NOTICES.txt; asset licenses: /legal/ASSET_LICENSES.txt; CycloneDX SBOM: /legal/sbom.cdx.json */ 2import{trackEvent as e}from"./analytics.nC0VIPUh.js";import{adDesktopEligible as t,adMobileEligible as n,adTabletEligible as r,getAdDeliveryState as i,getPremiumState as a,isPremiumRefreshing as o,premiumPaymentReturnVerified as s,reloadAfterPremiumFlush as c,startPremiumRuntime as l,subscribeAdDelivery as u,subscribePremium as d,tabletAdUnit as f,tabletRailGeometry as p}from"./delivery.BamnR2V6.js";import{MANUAL_GAMEPLAY_EVENT as m,NEW_GAME_PERSISTED_EVENT as h,observeManualGameplay as ee}from"./hintSpotlightCore.DbMd8kIi.js";import{advertisingConsentReady as g,installAdConsentRouting as _,loadAdvertisingScript as v}from"./consent.BGGQmqNC.js";import{KLONDIKE_RENDERER_READY_EVENT as y}from"./hintPresentation.B55-WFGP.js";import{premiumCopy as b}from"./premium-copy.D68RIZrR.js";import"./runtime-entry.z2lt_nQC.js";function x(e){if(e.viewportWidth<1280||e.viewportHeight<700||!e.finePointer||e.touch||Object.values(e).some(e=>typeof e==`number`&&!Number.isFinite(e)))return null;let t=e.slotRight-320,n=e.mainTop+16,r=Math.min(e.surfaceBottom,e.viewportHeight)-20;if(t<e.slotLeft||e.slotRight>e.contentWidth+.5||n<0||e.boardLeft<e.slotLeft-.5||Math.max(e.boardRight,e.controlsRight)>t-24||e.headerBottom>n||e.headerBottom-e.headerTop<32)return null;let i=n+814<=r?3:n+532<=r?2:1;return n+(i*250+(i-1)*32)>r?null:{count:i,left:t-e.slotLeft,top:n-e.slotTop,viewportLeft:t,viewportTop:n,actionTop:e.headerTop-e.slotTop+(e.headerBottom-e.headerTop-32)/2}}var S=`.game-control-menu-backdrop,[role="dialog"][aria-modal="true"],[data-modal-overlay],.win-overlay,canvas[data-win-cascade]`,C=`.board:not([data-klondike-renderer-pending]),.freecell-board,.board-canfield,.board-crescent,.board-eightoff,.board-fortythieves`,w=`a[href],button:not(:disabled),input,select,textarea,[role="button"],[role="slider"],.card,.empty-pile,[data-freecell-target],[data-spider-column],.feedback-trigger`,te=[`5364843986`,`4206755113`,`1179110403`],T=!1;function ne(){return typeof document<`u`&&document.documentElement.hasAttribute(`data-ps-ad-rail-reserved`)&&[`guest`,`free`].includes(a().status)}function E(){if(T||document.documentElement.dataset.desktopAdsEnabled!==`true`)return;T=!0,_(),ee();let s=window,l=null,E=null,D=null,O=null,k=[],A=new Map,j=0,M=!1,N=!1,P=!1,F=!1,I=null,L=!1,R=matchMedia(`(hover: hover) and (pointer: fine)`),z=matchMedia(`(any-pointer: coarse)`),B=e=>{let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;for(let t=e;t;t=t.parentElement){let e=getComputedStyle(t);if(e.display===`none`||e.visibility===`hidden`||e.visibility===`collapse`||e.opacity===`0`)return!1}return!0},V=()=>[`guest`,`free`].includes(a().status),H=()=>(t()||r())&&i().reserveRail,U=()=>{s.adsbygoogle&&!n()&&(s.adsbygoogle.pauseAdRequests=1)},W=()=>{for(let e of A.values())e.rail.remove();O?.remove(),U()},G=()=>{for(let e of A.values())e.rail.hidden=!0;U()},K=()=>{j||=requestAnimationFrame(ae)},q=(t,n)=>{t.reported.has(n)||(t.reported.add(n),t.node.dataset.adStatus=n,e(`ad_slot_result`,{slot:t.position,status:n}))};function J(){if(!l||!E||!P)return null;let e=E.querySelector(`.game-main`),n=E.querySelector(`.game-header`),i=E.querySelector(`.game-controls`),a=E.querySelector(C);if(!e||!n||!i||!a)return null;let o=l.getBoundingClientRect(),s=e.getBoundingClientRect(),c=n.getBoundingClientRect(),u=a.getBoundingClientRect(),d=i.getBoundingClientRect().top,f=o.left;for(let e of i.querySelectorAll(w))B(e)&&(f=Math.max(f,e.getBoundingClientRect().right));let m=t()?x({viewportWidth:innerWidth,viewportHeight:innerHeight,contentWidth:document.documentElement.clientWidth,finePointer:R.matches,touch:z.matches||navigator.maxTouchPoints!==0,slotLeft:o.left,slotRight:o.right,slotTop:o.top,mainTop:s.top,surfaceBottom:Math.min(o.bottom,E.getBoundingClientRect().bottom,d),headerTop:c.top,headerBottom:c.bottom,boardLeft:u.left,boardRight:u.right,controlsRight:f}):null,h=r()?p({viewportWidth:innerWidth,viewportHeight:innerHeight,slotLeft:o.left,slotRight:o.right,slotTop:o.top,mainTop:s.top,controlsTop:d}):m&&{...m,width:300,height:250,gap:32,tablet:!1};if(!h)return null;
2for(let e of E.querySelectorAll(w)){if(!B(e))continue;let t=e.getBoundingClientRect(),n=Math.max(t.left-h.viewportLeft-h.width,h.viewportLeft-t.right,0),r=Math.max(t.top-h.viewportTop-(h.count*h.height+(h.count-1)*h.gap),h.viewportTop-t.bottom,0);if(Math.hypot(n,r)<(h.tablet?11.5:24))return null}return h}function Y(){return V()&&H()&&P&&M&&document.visibilityState===`visible`&&navigator.onLine!==!1&&!!E&&!E.matches(`[data-paused],[data-rules-open],[data-shortcuts-open],[data-game-status="won"]`)&&(!E.hasAttribute(`data-focused`)||r()||L)&&!E.querySelector(`.game-main[inert]`)&&!Array.from(document.querySelectorAll(S)).some(B)&&J()!==null}function X(){return!o()&&g()&&Y()}function re(){let e=r();if(D&&L===e)return;D&&(D.hidden=!0),L=e;let t=A.get(e);if(t){D=t.rail,k=t.units;return}D=document.createElement(`div`),D.className=`ps-ad-rail`,D.dataset.psAdRail=``,D.setAttribute(`aria-label`,`Advertisements`),k=te.map((e,t)=>{let n=document.createElement(`div`);n.className=`ps-ad-rail__unit`;let r=document.createElement(`ins`);r.className=`adsbygoogle`,r.dataset.adClient=`ca-pub-7949189278765220`,r.dataset.adSlot=L?f:e,D.append(n);let i={node:n,ins:r,position:[`upper`,`lower`,`bottom`][t],requested:!1,suppressed:!1,reported:new Set};return new MutationObserver(()=>{let e=r.getAttribute(`data-ad-status`);if(e===`filled`||e===`unfill-optimized`){let t=i.reported.has(`timeout`);i.suppressed=!1,clearTimeout(i.timer),q(i,e===`unfill-optimized`?e:t?`late_fill`:`filled`)}else e===`unfilled`&&(clearTimeout(i.timer),i.suppressed=!0,q(i,`unfilled`));K()}).observe(r,{attributes:!0,attributeFilter:[`data-ad-status`]}),i}),A.set(e,{rail:D,units:k})}function Z(){!P&&H()&&V()&&(P=!0,document.documentElement.setAttribute(`data-ps-ad-rail-reserved`,``)),V()||W(),K()}async function ie(){if(N||!X()||!I||!k.slice(0,I.count).some(e=>!e.requested))return;N=!0;let e=J();await new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e())));let t=J();if(!X()||JSON.stringify(e)!==JSON.stringify(t)){N=!1,K();return}if(!await v(X)){N=!1;return}if(s.__psPublisherLoaded=!0,!X()){N=!1,W();return}let n=J();s.adsbygoogle??=[],s.adsbygoogle.pauseAdRequests=0;for(let e of k.slice(0,n.count))if(!e.requested){e.requested=!0,e.node.hidden=!1,e.node.append(e.ins),q(e,`requested`);try{s.adsbygoogle.push({}),e.timer=window.setTimeout(()=>{[`filled`,`unfill-optimized`].includes(e.ins.getAttribute(`data-ad-status`)??``)||(e.suppressed=!0,q(e,`timeout`),K())},1e4)}catch{e.suppressed=!0,q(e,`error`)}}N=!1,K()}let Q=new ResizeObserver(K),$=new MutationObserver(K);function ae(){j=0;let e=document.querySelector(`.game-island-slot .game-shell:not(.ssr-snapshot)`);if(E!==e&&(E=e,l=E?.closest(`.game-island-slot`)??null,Q.disconnect(),$.disconnect(),E)){Q.observe(E);for(let e of E.querySelectorAll(`.game-main,.game-controls,.board:not([data-klondike-renderer-pending]),.freecell-board,.board-canfield,.board-crescent,.board-eightoff,.board-fortythieves`))Q.observe(e);$.observe(E,{subtree:!0,attributes:!0,attributeFilter:[`data-paused`,`data-rules-open`,`data-shortcuts-open`,`data-focused`,`data-game-status`,`data-scene-geometry-ready`,`data-scene-presentation-epoch`]})}if(document.documentElement.toggleAttribute(`data-ps-tablet-ads`,P&&r()),I=J(),!l||!V()){W();return}if(!H()||!I){O&&(O.hidden=!0),G();return}O||(O=document.createElement(`button`),O.type=`button`,O.className=`ps-ad-premium-offer`,O.textContent=b.offer,O.setAttribute(`aria-haspopup`,`dialog`),O.dataset.ctaId=`premium_offer_open`,O.dataset.ctaLocation=`ad_rail`,O.addEventListener(`click`,()=>window.dispatchEvent(new Event(`playsolitaire:premium-open`)))),O.isConnected||l.append(O),O.hidden=!1;let t=I.tablet?44:32;if(O.style.width=`${I.width}px`,O.style.height=`${t}px`,O.style.left=`${I.left}px`,O.style.top=`${I.actionTop}px`,!g()||!Y()){G();return}re(),D.hidden=!1,s.adsbygoogle&&(s.adsbygoogle.pauseAdRequests=+!!o()),D.style.left=`${I.left}px`,D.style.top=`${I.top}px`,D.style.width=`${I.width}px`,D.style.gap=`${I.gap}
2px`,k.forEach((e,t)=>{e.node.hidden=t>=I.count||e.suppressed,e.node.style.gridRow=String(t+1);for(let t of[e.node,e.ins])t.style.width=`${I.width}px`,t.style.height=`${I.height}px`}),D.isConnected||l.append(D),ie()}u(Z),d(Z),window.addEventListener(m,()=>{M=!0,K()}),window.addEventListener(h,()=>{ne()&&c()}),window.addEventListener(`playsolitaire:advertising-consent`,()=>{let e=g();e||(W(),(s.__psPublisherLoaded||F&&s.__psAdvertisingConsentStarted)&&c()),F=e,K()}),window.addEventListener(`resize`,K,{passive:!0}),window.addEventListener(`scroll`,K,{passive:!0}),window.addEventListener(y,K),window.addEventListener(`online`,K),window.addEventListener(`pageshow`,K),R.addEventListener(`change`,K),z.addEventListener(`change`,K),document.addEventListener(`visibilitychange`,()=>{document.visibilityState!==`visible`&&G(),K()}),new MutationObserver(e=>{e.some(e=>[...e.addedNodes,...e.removedNodes].some(e=>e instanceof Element&&(e.matches(`.game-shell,.game-control-menu-backdrop,[role="dialog"][aria-modal="true"],[data-modal-overlay],.win-overlay,canvas[data-win-cascade]`)||e.querySelector(`.game-shell,.game-control-menu-backdrop,[role="dialog"][aria-modal="true"],[data-modal-overlay],.win-overlay,canvas[data-win-cascade]`))))&&K()}).observe(document.documentElement,{childList:!0,subtree:!0}),Z()}if(typeof window<`u`){let t=!1;d(()=>{t||!s()||(t=!0,e(`premium_conversion`,{site:`playsolitaire`}))}),E(),l()}
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.