1const h={};var m={};function u(){const t=typeof process<"u"?m.WP_GRAPHQL_URL:void 0;if(t&&t.length>0)return t;const e=typeof import.meta<"u"&&h?"https://latticetraining.com/wp/graphql":void 0;return e&&e.length>0?e:null}const i=1e4;async function p(t,e){const a=u();if(!a)throw new Error("WP_GRAPHQL_URL is not set â refusing to call wpFetch. Set the env var before running with WP enabled, or use the higher-level helpers in src/lib/wp/posts.ts that fall back to the markdown registry.");const s=new AbortController,c=setTimeout(()=>s.abort(),i);let r;try{r=await fetch(a,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:t,variables:e}),signal:s.signal})}catch(o){throw o instanceof Error&&o.name==="AbortError"?new Error(`WPGraphQL request timed out after ${i}ms (${a})`):o}finally{clearTimeout(c)}if(!r.ok)throw new Error(`WPGraphQL HTTP ${r.status} ${r.statusText} (${a})`);const n=await r.json();if(n.errors&&n.errors.length>0){const o=n.errors.map(l=>l.message).join("; ");throw new Error(`WPGraphQL errors: ${o}`)}if(!n.data)throw new Error("WPGraphQL response missing `data`");return n.data}const f=` 2 mutation CreateComment( 3 $commentOn: Int! 4 $content: String! 5 $author: String! 6 $authorEmail: String! 7 $parent: ID 8 ) { 9 createComment( 10 input: { 11 commentOn: $commentOn 12 content: $content 13 author: $author 14 authorEmail: $authorEmail 15 parent: $parent 16 } 17 ) { 18 success 19 comment { 20 id 21 date 22 content 23 status 24 isLatticeStaff 25 parent { 26 node { 27 id 28 } 29 } 30 author { 31 node { 32 name 33 ... on CommentAuthor { 34 avatar { url } 35 } 36 ... on User { 37 avatar { url } 38 } 39 } 40 } 41 } 42 } 43 } 44`,d=` 45 query FlashSale { 46 latticeOptions { 47 flashSale { 48 enabled 49 endDate 50 } 51 } 52 } 53`;export{f as C,d as F,p as w};
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.