fungiorganic commited on
Commit
f2ad50c
·
verified ·
1 Parent(s): ed807d1

v0.3.12.116 Anchorage compact release; zero new paths; no deletions

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. CHECKSUMS.txt +11 -11
  2. chef-app/_expo/static/js/web/bundle.js +3 -3
  3. chef-app/admin.html +1 -1
  4. chef-app/customer.html +1 -1
  5. chef-app/customer/anchorage.html +1 -1
  6. chef-app/customer/anchorage/book.html +1 -1
  7. chef-app/customer/anchorage/feedback.html +1 -1
  8. chef-app/customer/anchorage/gift.html +1 -1
  9. chef-app/customer/anchorage/lost.html +1 -1
  10. chef-app/customer/anchorage/loyalty.html +1 -1
  11. chef-app/customer/anchorage/merch.html +1 -1
  12. chef-app/customer/anchorage/offers.html +1 -1
  13. chef-app/customer/anchorage/refer.html +1 -1
  14. chef-app/customer/anchorage/waitlist.html +1 -1
  15. chef-app/customer/anchorage/whatson.html +1 -1
  16. chef-app/customer/basket.html +1 -1
  17. chef-app/customer/profile.html +1 -1
  18. chef-app/demo.html +1 -1
  19. chef-app/display.html +1 -1
  20. chef-app/index.html +1 -1
  21. chef-app/kitchen.html +1 -1
  22. chef-app/owner.html +1 -1
  23. chef-app/staff.html +1 -1
  24. chef-app/sw.js +2 -2
  25. chef-app/team.html +1 -1
  26. customer-app/_expo/static/js/web/bundle.js +3 -3
  27. customer-app/admin.html +1 -1
  28. customer-app/customer.html +1 -1
  29. customer-app/customer/anchorage.html +1 -1
  30. customer-app/customer/anchorage/book.html +1 -1
  31. customer-app/customer/anchorage/feedback.html +1 -1
  32. customer-app/customer/anchorage/gift.html +1 -1
  33. customer-app/customer/anchorage/lost.html +1 -1
  34. customer-app/customer/anchorage/loyalty.html +1 -1
  35. customer-app/customer/anchorage/merch.html +1 -1
  36. customer-app/customer/anchorage/offers.html +1 -1
  37. customer-app/customer/anchorage/refer.html +1 -1
  38. customer-app/customer/anchorage/waitlist.html +1 -1
  39. customer-app/customer/anchorage/whatson.html +1 -1
  40. customer-app/customer/basket.html +1 -1
  41. customer-app/customer/profile.html +1 -1
  42. customer-app/demo.html +1 -1
  43. customer-app/display.html +1 -1
  44. customer-app/index.html +1 -1
  45. customer-app/kitchen.html +1 -1
  46. customer-app/owner.html +1 -1
  47. customer-app/staff.html +1 -1
  48. customer-app/sw.js +2 -2
  49. customer-app/team.html +1 -1
  50. display-app/_expo/static/js/web/bundle.js +3 -3
CHECKSUMS.txt CHANGED
@@ -1,23 +1,23 @@
1
- Cover Charge v0.3.12.115: web apps, plus the Cover Charge for Display tablet app for Android (downloads/android/, its SHA-256 is in downloads/android/SHA256.txt). No phone APKs were built for v0.1.2 to v0.3.12.115.
2
  SHA-256 of each web app's start page, service worker, manifest and logo:
3
 
4
- f6627242620c5591e8444e99db21a97035fd5805ffdac4fc6ea5f47421ae1967 owner-app/index.html
5
- 5b6e4e3028756c088263b24de759b10163313d0bee9bd19ed2485fea72ae3dc5 owner-app/sw.js
6
  e305c44d11a9c25f37372f3fa4d329d4ffb04df2edee6e7b4b9ac91f3875ac67 owner-app/manifest.webmanifest
7
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 owner-app/brand-logo.png
8
- 132ae2400aa5e7ccbc83d6d3097e4879261eb7377aad98211ed019d1e476fb67 staff-app/index.html
9
- 998ebf31ebf19901e99666e509240ae73e4c34b48cff443e5f9d5e519d996569 staff-app/sw.js
10
  bd1d310ebf8e2a80808e100c41fb7fe1c4369d3026478f3ad8eececaeadaf4ac staff-app/manifest.webmanifest
11
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 staff-app/brand-logo.png
12
- 6b72cc4756b0590bccbfe5a4429951ba34ffa8d3dbc3229c925a2d77393639ec customer-app/index.html
13
- 35374bfb510238edb65350a7a70a2ec138a5ab74beb46cff2adeb8c6cbc44c5f customer-app/sw.js
14
  3bfb1fd10cc13f09ca6be65c461e1f6b5750ae51a3ece12e079750b2a066052e customer-app/manifest.webmanifest
15
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 customer-app/brand-logo.png
16
- 12b5a4a8dc46ad60b81392572d58377396a0990cc108b8817f6104db32d6ca70 display-app/index.html
17
- b130e1ab1e30a290d53ce2d5b499dc2c14b38c4c43f3808dcf5dff324f27632e display-app/sw.js
18
  35e2721b86eb1ae1605e55bee64177adcee72f4e53a24ac417d19ea2873434a1 display-app/manifest.webmanifest
19
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 display-app/brand-logo.png
20
- ef0d4e6f31946eab1d06e9930baccd5e8b810b08eee87f0d1714a5501d7da640 chef-app/index.html
21
- 3ad60b3cb164f5756633f786f3bca52d2c56ddeadb721d099dc8b5f18d2d970c chef-app/sw.js
22
  97ed43decde8a888e22b7411e13a2122c6f8b9944cf38b2e28e8f62ef2e25397 chef-app/manifest.webmanifest
23
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 chef-app/brand-logo.png
 
1
+ Cover Charge v0.3.12.116: web apps, plus the Cover Charge for Display tablet app for Android (downloads/android/, its SHA-256 is in downloads/android/SHA256.txt). No phone APKs were built for v0.1.2 to v0.3.12.116.
2
  SHA-256 of each web app's start page, service worker, manifest and logo:
3
 
4
+ b5ef5202d7e8ca8e37c03583c234070bcd1f6099ed329e56f2be8036d433057d owner-app/index.html
5
+ a3424554793db286868ab21de5cb25fd3768932e6a96c3a6a530ec54b1285e75 owner-app/sw.js
6
  e305c44d11a9c25f37372f3fa4d329d4ffb04df2edee6e7b4b9ac91f3875ac67 owner-app/manifest.webmanifest
7
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 owner-app/brand-logo.png
8
+ de523c719981a98e4d9947666cc10dfd042897e470d839face3fb3eed31ba189 staff-app/index.html
9
+ 72d2181da8c043d705f38d3f4489daa1ead361946fd04fdcde029aa33fe7725e staff-app/sw.js
10
  bd1d310ebf8e2a80808e100c41fb7fe1c4369d3026478f3ad8eececaeadaf4ac staff-app/manifest.webmanifest
11
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 staff-app/brand-logo.png
12
+ 04205f726aa830d4b6bbe9bc34110607d6b6099b7694aca98ea1377525290a98 customer-app/index.html
13
+ d83a27b6a20776f7dbf74e833378cbabdeb0bc41c9cfea145207a4b672d003f4 customer-app/sw.js
14
  3bfb1fd10cc13f09ca6be65c461e1f6b5750ae51a3ece12e079750b2a066052e customer-app/manifest.webmanifest
15
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 customer-app/brand-logo.png
16
+ ce4e9fbd836331b82940ca9b88c67b9e3db9c204f647cf8e6293f3817d0e0567 display-app/index.html
17
+ 087aa40b8f91d7b32df647ab830ceb3246b6420a4df217c046e2b66b347eb2fb display-app/sw.js
18
  35e2721b86eb1ae1605e55bee64177adcee72f4e53a24ac417d19ea2873434a1 display-app/manifest.webmanifest
19
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 display-app/brand-logo.png
20
+ 713c7f994d8562d5b575e12ff5bb3e1233b966f0a90dbeff6fc9fd5f8d34d00e chef-app/index.html
21
+ 5633f210619fca36eaac11d7ab362e896d7a821e24f9928299eae3eab0704ca3 chef-app/sw.js
22
  97ed43decde8a888e22b7411e13a2122c6f8b9944cf38b2e28e8f62ef2e25397 chef-app/manifest.webmanifest
23
  cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 chef-app/brand-logo.png
chef-app/_expo/static/js/web/bundle.js CHANGED
@@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
19
  __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n<r.slice(0,7),k=b(n,-1),h=p(Number(k.slice(0,4)),Number(k.slice(5,7))),S=y?Math.min(Number(r.slice(8,10)),h):h;let O=0,C=0;for(let e=1;e<=S;e++){const t=o.get(`${k}-${String(e).padStart(2,'0')}`);null!=t&&(O+=t,C++)}const D=s.length&&C&&O>0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]);
20
  __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t<Math.max(1,e.fromParty)?0:t*e.perPersonPence}const n=e=>`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]);
21
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]);
22
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]);
23
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?<![A-Za-z])':''}${a.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')}${/[A-Za-z]$/.test(a)?'(?![a-z])':''}`,'g'),n])},17,[]);
24
  __d(function(e,a,l,r,t,o,s){t.exports={venue:"The Anchorage",note:"From Gordon 28 Oct 2026; layout from Gordon's floor-plan photo 29 Oct 2026 (positions, sizes, shapes, labels scaled from the photo, one scale for all areas). Photo shows MT12 and no MT8: table 8 replaced by 12. Gordon confirmed 29 Oct: no table 8; MT11 and MT12 both exist, MT11 keeps 2 seats, MT12 = 2 seats. No tables 4 or 8. No joined tables: Gordon confirmed 29 Oct that DT1 and DT2 are not joined.",areas:[{name:"Public Bar",label:"Dog friendly area (Public Bar), Area 1",colour:"#CFA45F",server:"BR",dogFriendly:!0,tables:[[1,4],[2,4],[3,5],[5,2],[6,4]],layout:{1:{label:"DT1",shape:"rect",x:600,y:125,w:205,h:90},2:{label:"DT2",shape:"rect",x:395,y:130,w:100,h:190},3:{label:"DT3",shape:"rect",x:205,y:120,w:110,h:245},5:{label:"DT5",shape:"square",x:500,y:395,w:105,h:105},6:{label:"DT6",shape:"rect",x:195,y:395,w:205,h:110}},best:[1,3]},{name:"Main Restaurant",label:"Main restaurant (no pets)",colour:"#8EC5FF",server:"SV",dogFriendly:!1,tables:[[7,5],[9,7],[10,4],[11,2],[12,2],[13,4],[14,4],[15,4],[16,2]],layout:{7:{label:"MT7",shape:"rect",x:590,y:410,w:225,h:115},9:{label:"MT9",shape:"rect",x:560,y:105,w:260,h:110},10:{label:"MT10",shape:"square",x:430,y:400,w:130,h:130},11:{label:"MT11",shape:"rect",x:545,y:270,w:115,h:90},12:{label:"MT12",shape:"rect",x:400,y:270,w:120,h:95},13:{label:"MT13",shape:"rect",x:400,y:100,w:90,h:115},14:{label:"MT14",shape:"rect",x:185,y:420,w:230,h:100},15:{label:"MT15",shape:"rect",x:190,y:220,w:165,h:145},16:{label:"MT16",shape:"rect",x:185,y:105,w:125,h:80}},best:[7,9]},{name:"Sitooterie",label:"Sitooterie (fully covered conservatory, no pets)",colour:"#C79BE8",server:"DM",dogFriendly:!1,tables:[[17,2],[18,6],[19,4],[20,6],[21,4],[22,4],[23,4]],layout:{17:{label:"ST17",shape:"square",x:760,y:325,w:110,h:110},18:{label:"ST18",shape:"rect",x:605,y:135,w:270,h:115},19:{label:"ST19",shape:"rect",x:460,y:160,w:105,h:150},20:{label:"ST20",shape:"rect",x:135,y:125,w:265,h:120},21:{label:"ST21",shape:"rect",x:120,y:305,w:110,h:175},22:{label:"ST22",shape:"rect",x:255,y:310,w:115,h:175},23:{label:"ST23",shape:"rect",x:410,y:350,w:110,h:155}},best:[19,21]},{name:"Beer Garden",label:"Outdoor beer garden (weather permitting, no shelter, pets allowed)",colour:"#B08D57",server:"GD",dogFriendly:!0,outdoor:!0,weatherDependent:!0,tables:[[24,4],[25,4],[26,4],[27,6],[28,6],[29,4],[30,4],[31,4]],layout:{24:{label:"BGT24",shape:"round",x:740,y:70,w:130,h:130},25:{label:"BGT25",shape:"round",x:515,y:50,w:135,h:135},26:{label:"BGT26",shape:"round",x:310,y:50,w:135,h:135},27:{label:"BGT27",shape:"rect",x:560,y:235,w:280,h:115},28:{label:"BGT28",shape:"rect",x:245,y:235,w:270,h:110},29:{label:"BGT29",shape:"rect",x:210,y:365,w:190,h:60},30:{label:"BGT30",shape:"rect",x:180,y:445,w:190,h:55},31:{label:"BGT31",shape:"rect",x:130,y:520,w:215,h:60}},best:[27,28]}],photoScale:1.8,joins:[],bestNote:"Best tables per area from Gordon, 1 Nov 2026: Bar 1 and 3; Restaurant 7 and 9; Sitooterie 19 and 21; Outside (Beer Garden) 27 and 28. Shown as BEST for walk-ins and bookings when they fit; editable per area in the table plan."}},18,[]);
25
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0])},19,[20]);
26
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0]);var n=r(d[1]);(0,r(d[2]).renderRootComponent)(n.App)},20,[21,24,1449]);
@@ -1119,7 +1119,7 @@ __d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},1035,[1036]);
1119
  __d(function(g,r,i,a,m,e,d){function n(n,t){const o=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(null!=o){const s=String(n);if(null!=t){const n=t[s];if(null!=n)return o(n)}}}function t(t,o,s){const u=()=>r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]);
1120
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]);
1121
  __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*v<w+4;return(0,h.jsxs)(o.default,{testID:"screen-title-row",onLayout:e=>u(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]);
1122
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]);
1123
  __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]);
1124
  __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]);
1125
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i},u=()=>'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]);
 
19
  __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n<r.slice(0,7),k=b(n,-1),h=p(Number(k.slice(0,4)),Number(k.slice(5,7))),S=y?Math.min(Number(r.slice(8,10)),h):h;let O=0,C=0;for(let e=1;e<=S;e++){const t=o.get(`${k}-${String(e).padStart(2,'0')}`);null!=t&&(O+=t,C++)}const D=s.length&&C&&O>0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]);
20
  __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t<Math.max(1,e.fromParty)?0:t*e.perPersonPence}const n=e=>`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]);
21
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]);
22
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='e33e971b7b00',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lily",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]);
23
+ __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Lily','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?<![A-Za-z])':''}${a.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')}${/[A-Za-z]$/.test(a)?'(?![a-z])':''}`,'g'),n])},17,[]);
24
  __d(function(e,a,l,r,t,o,s){t.exports={venue:"The Anchorage",note:"From Gordon 28 Oct 2026; layout from Gordon's floor-plan photo 29 Oct 2026 (positions, sizes, shapes, labels scaled from the photo, one scale for all areas). Photo shows MT12 and no MT8: table 8 replaced by 12. Gordon confirmed 29 Oct: no table 8; MT11 and MT12 both exist, MT11 keeps 2 seats, MT12 = 2 seats. No tables 4 or 8. No joined tables: Gordon confirmed 29 Oct that DT1 and DT2 are not joined.",areas:[{name:"Public Bar",label:"Dog friendly area (Public Bar), Area 1",colour:"#CFA45F",server:"BR",dogFriendly:!0,tables:[[1,4],[2,4],[3,5],[5,2],[6,4]],layout:{1:{label:"DT1",shape:"rect",x:600,y:125,w:205,h:90},2:{label:"DT2",shape:"rect",x:395,y:130,w:100,h:190},3:{label:"DT3",shape:"rect",x:205,y:120,w:110,h:245},5:{label:"DT5",shape:"square",x:500,y:395,w:105,h:105},6:{label:"DT6",shape:"rect",x:195,y:395,w:205,h:110}},best:[1,3]},{name:"Main Restaurant",label:"Main restaurant (no pets)",colour:"#8EC5FF",server:"SV",dogFriendly:!1,tables:[[7,5],[9,7],[10,4],[11,2],[12,2],[13,4],[14,4],[15,4],[16,2]],layout:{7:{label:"MT7",shape:"rect",x:590,y:410,w:225,h:115},9:{label:"MT9",shape:"rect",x:560,y:105,w:260,h:110},10:{label:"MT10",shape:"square",x:430,y:400,w:130,h:130},11:{label:"MT11",shape:"rect",x:545,y:270,w:115,h:90},12:{label:"MT12",shape:"rect",x:400,y:270,w:120,h:95},13:{label:"MT13",shape:"rect",x:400,y:100,w:90,h:115},14:{label:"MT14",shape:"rect",x:185,y:420,w:230,h:100},15:{label:"MT15",shape:"rect",x:190,y:220,w:165,h:145},16:{label:"MT16",shape:"rect",x:185,y:105,w:125,h:80}},best:[7,9]},{name:"Sitooterie",label:"Sitooterie (fully covered conservatory, no pets)",colour:"#C79BE8",server:"DM",dogFriendly:!1,tables:[[17,2],[18,6],[19,4],[20,6],[21,4],[22,4],[23,4]],layout:{17:{label:"ST17",shape:"square",x:760,y:325,w:110,h:110},18:{label:"ST18",shape:"rect",x:605,y:135,w:270,h:115},19:{label:"ST19",shape:"rect",x:460,y:160,w:105,h:150},20:{label:"ST20",shape:"rect",x:135,y:125,w:265,h:120},21:{label:"ST21",shape:"rect",x:120,y:305,w:110,h:175},22:{label:"ST22",shape:"rect",x:255,y:310,w:115,h:175},23:{label:"ST23",shape:"rect",x:410,y:350,w:110,h:155}},best:[19,21]},{name:"Beer Garden",label:"Outdoor beer garden (weather permitting, no shelter, pets allowed)",colour:"#B08D57",server:"GD",dogFriendly:!0,outdoor:!0,weatherDependent:!0,tables:[[24,4],[25,4],[26,4],[27,6],[28,6],[29,4],[30,4],[31,4]],layout:{24:{label:"BGT24",shape:"round",x:740,y:70,w:130,h:130},25:{label:"BGT25",shape:"round",x:515,y:50,w:135,h:135},26:{label:"BGT26",shape:"round",x:310,y:50,w:135,h:135},27:{label:"BGT27",shape:"rect",x:560,y:235,w:280,h:115},28:{label:"BGT28",shape:"rect",x:245,y:235,w:270,h:110},29:{label:"BGT29",shape:"rect",x:210,y:365,w:190,h:60},30:{label:"BGT30",shape:"rect",x:180,y:445,w:190,h:55},31:{label:"BGT31",shape:"rect",x:130,y:520,w:215,h:60}},best:[27,28]}],photoScale:1.8,joins:[],bestNote:"Best tables per area from Gordon, 1 Nov 2026: Bar 1 and 3; Restaurant 7 and 9; Sitooterie 19 and 21; Outside (Beer Garden) 27 and 28. Shown as BEST for walk-ins and bookings when they fit; editable per area in the table plan."}},18,[]);
25
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0])},19,[20]);
26
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0]);var n=r(d[1]);(0,r(d[2]).renderRootComponent)(n.App)},20,[21,24,1449]);
 
1119
  __d(function(g,r,i,a,m,e,d){function n(n,t){const o=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(null!=o){const s=String(n);if(null!=t){const n=t[s];if(null!=n)return o(n)}}}function t(t,o,s){const u=()=>r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]);
1120
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]);
1121
  __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*v<w+4;return(0,h.jsxs)(o.default,{testID:"screen-title-row",onLayout:e=>u(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]);
1122
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]);
1123
  __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]);
1124
  __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]);
1125
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i},u=()=>'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]);
chef-app/admin.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/book.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/feedback.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/gift.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/lost.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/loyalty.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/merch.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/offers.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/refer.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/waitlist.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/anchorage/whatson.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/basket.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/customer/profile.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/demo.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/display.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/index.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/kitchen.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/owner.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/staff.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
chef-app/sw.js CHANGED
@@ -1,7 +1,7 @@
1
  // Anchorage Head Chef service worker: precache the app shell so it opens offline after the first visit.
2
- const V = "cc-chef-9c601505df";
3
  const BASE = "/chef-app/";
4
- const PRECACHE = ["/chef-app/apple-touch-icon.png", "/chef-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/chef-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/chef-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/chef-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/chef-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/chef-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/chef-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/chef-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/chef-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/chef-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/chef-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/chef-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/chef-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/chef-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/chef-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/chef-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/chef-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/chef-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/chef-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/chef-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/chef-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/chef-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/chef-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/chef-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/chef-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/chef-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/chef-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/chef-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/chef-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/chef-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/chef-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/chef-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/chef-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/chef-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/chef-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/chef-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/chef-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/chef-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/chef-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/chef-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/chef-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/chef-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/chef-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/chef-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/chef-app/brand-logo.png", "/chef-app/favicon.ico", "/chef-app/icon-192.png", "/chef-app/icon-512.png", "/chef-app/icon-maskable-192.png", "/chef-app/icon-maskable-512.png", "/chef-app/manifest.webmanifest", "/chef-app/index.html", "/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5"];
5
  // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached
6
  // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline).
7
  const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r);
 
1
  // Anchorage Head Chef service worker: precache the app shell so it opens offline after the first visit.
2
+ const V = "cc-chef-6e46ce179d";
3
  const BASE = "/chef-app/";
4
+ const PRECACHE = ["/chef-app/apple-touch-icon.png", "/chef-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/chef-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/chef-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/chef-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/chef-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/chef-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/chef-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/chef-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/chef-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/chef-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/chef-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/chef-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/chef-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/chef-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/chef-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/chef-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/chef-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/chef-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/chef-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/chef-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/chef-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/chef-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/chef-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/chef-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/chef-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/chef-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/chef-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/chef-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/chef-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/chef-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/chef-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/chef-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/chef-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/chef-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/chef-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/chef-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/chef-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/chef-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/chef-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/chef-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/chef-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/chef-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/chef-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/chef-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/chef-app/brand-logo.png", "/chef-app/favicon.ico", "/chef-app/icon-192.png", "/chef-app/icon-512.png", "/chef-app/icon-maskable-192.png", "/chef-app/icon-maskable-512.png", "/chef-app/manifest.webmanifest", "/chef-app/index.html", "/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c"];
5
  // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached
6
  // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline).
7
  const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r);
chef-app/team.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c" defer></script></body>
100
  </html>
customer-app/_expo/static/js/web/bundle.js CHANGED
@@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
19
  __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n<r.slice(0,7),k=b(n,-1),h=p(Number(k.slice(0,4)),Number(k.slice(5,7))),S=y?Math.min(Number(r.slice(8,10)),h):h;let O=0,C=0;for(let e=1;e<=S;e++){const t=o.get(`${k}-${String(e).padStart(2,'0')}`);null!=t&&(O+=t,C++)}const D=s.length&&C&&O>0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]);
20
  __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t<Math.max(1,e.fromParty)?0:t*e.perPersonPence}const n=e=>`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]);
21
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]);
22
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]);
23
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?<![A-Za-z])':''}${a.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')}${/[A-Za-z]$/.test(a)?'(?![a-z])':''}`,'g'),n])},17,[]);
24
  __d(function(e,a,l,r,t,o,s){t.exports={venue:"The Anchorage",note:"From Gordon 28 Oct 2026; layout from Gordon's floor-plan photo 29 Oct 2026 (positions, sizes, shapes, labels scaled from the photo, one scale for all areas). Photo shows MT12 and no MT8: table 8 replaced by 12. Gordon confirmed 29 Oct: no table 8; MT11 and MT12 both exist, MT11 keeps 2 seats, MT12 = 2 seats. No tables 4 or 8. No joined tables: Gordon confirmed 29 Oct that DT1 and DT2 are not joined.",areas:[{name:"Public Bar",label:"Dog friendly area (Public Bar), Area 1",colour:"#CFA45F",server:"BR",dogFriendly:!0,tables:[[1,4],[2,4],[3,5],[5,2],[6,4]],layout:{1:{label:"DT1",shape:"rect",x:600,y:125,w:205,h:90},2:{label:"DT2",shape:"rect",x:395,y:130,w:100,h:190},3:{label:"DT3",shape:"rect",x:205,y:120,w:110,h:245},5:{label:"DT5",shape:"square",x:500,y:395,w:105,h:105},6:{label:"DT6",shape:"rect",x:195,y:395,w:205,h:110}},best:[1,3]},{name:"Main Restaurant",label:"Main restaurant (no pets)",colour:"#8EC5FF",server:"SV",dogFriendly:!1,tables:[[7,5],[9,7],[10,4],[11,2],[12,2],[13,4],[14,4],[15,4],[16,2]],layout:{7:{label:"MT7",shape:"rect",x:590,y:410,w:225,h:115},9:{label:"MT9",shape:"rect",x:560,y:105,w:260,h:110},10:{label:"MT10",shape:"square",x:430,y:400,w:130,h:130},11:{label:"MT11",shape:"rect",x:545,y:270,w:115,h:90},12:{label:"MT12",shape:"rect",x:400,y:270,w:120,h:95},13:{label:"MT13",shape:"rect",x:400,y:100,w:90,h:115},14:{label:"MT14",shape:"rect",x:185,y:420,w:230,h:100},15:{label:"MT15",shape:"rect",x:190,y:220,w:165,h:145},16:{label:"MT16",shape:"rect",x:185,y:105,w:125,h:80}},best:[7,9]},{name:"Sitooterie",label:"Sitooterie (fully covered conservatory, no pets)",colour:"#C79BE8",server:"DM",dogFriendly:!1,tables:[[17,2],[18,6],[19,4],[20,6],[21,4],[22,4],[23,4]],layout:{17:{label:"ST17",shape:"square",x:760,y:325,w:110,h:110},18:{label:"ST18",shape:"rect",x:605,y:135,w:270,h:115},19:{label:"ST19",shape:"rect",x:460,y:160,w:105,h:150},20:{label:"ST20",shape:"rect",x:135,y:125,w:265,h:120},21:{label:"ST21",shape:"rect",x:120,y:305,w:110,h:175},22:{label:"ST22",shape:"rect",x:255,y:310,w:115,h:175},23:{label:"ST23",shape:"rect",x:410,y:350,w:110,h:155}},best:[19,21]},{name:"Beer Garden",label:"Outdoor beer garden (weather permitting, no shelter, pets allowed)",colour:"#B08D57",server:"GD",dogFriendly:!0,outdoor:!0,weatherDependent:!0,tables:[[24,4],[25,4],[26,4],[27,6],[28,6],[29,4],[30,4],[31,4]],layout:{24:{label:"BGT24",shape:"round",x:740,y:70,w:130,h:130},25:{label:"BGT25",shape:"round",x:515,y:50,w:135,h:135},26:{label:"BGT26",shape:"round",x:310,y:50,w:135,h:135},27:{label:"BGT27",shape:"rect",x:560,y:235,w:280,h:115},28:{label:"BGT28",shape:"rect",x:245,y:235,w:270,h:110},29:{label:"BGT29",shape:"rect",x:210,y:365,w:190,h:60},30:{label:"BGT30",shape:"rect",x:180,y:445,w:190,h:55},31:{label:"BGT31",shape:"rect",x:130,y:520,w:215,h:60}},best:[27,28]}],photoScale:1.8,joins:[],bestNote:"Best tables per area from Gordon, 1 Nov 2026: Bar 1 and 3; Restaurant 7 and 9; Sitooterie 19 and 21; Outside (Beer Garden) 27 and 28. Shown as BEST for walk-ins and bookings when they fit; editable per area in the table plan."}},18,[]);
25
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0])},19,[20]);
26
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0]);var n=r(d[1]);(0,r(d[2]).renderRootComponent)(n.App)},20,[21,24,1426]);
@@ -1119,7 +1119,7 @@ __d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},1035,[1036]);
1119
  __d(function(g,r,i,a,m,e,d){function n(n,t){const o=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(null!=o){const s=String(n);if(null!=t){const n=t[s];if(null!=n)return o(n)}}}function t(t,o,s){const u=()=>r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]);
1120
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]);
1121
  __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*v<w+4;return(0,h.jsxs)(o.default,{testID:"screen-title-row",onLayout:e=>u(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]);
1122
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]);
1123
  __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]);
1124
  __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]);
1125
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i},u=()=>'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]);
 
19
  __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n<r.slice(0,7),k=b(n,-1),h=p(Number(k.slice(0,4)),Number(k.slice(5,7))),S=y?Math.min(Number(r.slice(8,10)),h):h;let O=0,C=0;for(let e=1;e<=S;e++){const t=o.get(`${k}-${String(e).padStart(2,'0')}`);null!=t&&(O+=t,C++)}const D=s.length&&C&&O>0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]);
20
  __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t<Math.max(1,e.fromParty)?0:t*e.perPersonPence}const n=e=>`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]);
21
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]);
22
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='e33e971b7b00',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lily",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]);
23
+ __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Lily','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?<![A-Za-z])':''}${a.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')}${/[A-Za-z]$/.test(a)?'(?![a-z])':''}`,'g'),n])},17,[]);
24
  __d(function(e,a,l,r,t,o,s){t.exports={venue:"The Anchorage",note:"From Gordon 28 Oct 2026; layout from Gordon's floor-plan photo 29 Oct 2026 (positions, sizes, shapes, labels scaled from the photo, one scale for all areas). Photo shows MT12 and no MT8: table 8 replaced by 12. Gordon confirmed 29 Oct: no table 8; MT11 and MT12 both exist, MT11 keeps 2 seats, MT12 = 2 seats. No tables 4 or 8. No joined tables: Gordon confirmed 29 Oct that DT1 and DT2 are not joined.",areas:[{name:"Public Bar",label:"Dog friendly area (Public Bar), Area 1",colour:"#CFA45F",server:"BR",dogFriendly:!0,tables:[[1,4],[2,4],[3,5],[5,2],[6,4]],layout:{1:{label:"DT1",shape:"rect",x:600,y:125,w:205,h:90},2:{label:"DT2",shape:"rect",x:395,y:130,w:100,h:190},3:{label:"DT3",shape:"rect",x:205,y:120,w:110,h:245},5:{label:"DT5",shape:"square",x:500,y:395,w:105,h:105},6:{label:"DT6",shape:"rect",x:195,y:395,w:205,h:110}},best:[1,3]},{name:"Main Restaurant",label:"Main restaurant (no pets)",colour:"#8EC5FF",server:"SV",dogFriendly:!1,tables:[[7,5],[9,7],[10,4],[11,2],[12,2],[13,4],[14,4],[15,4],[16,2]],layout:{7:{label:"MT7",shape:"rect",x:590,y:410,w:225,h:115},9:{label:"MT9",shape:"rect",x:560,y:105,w:260,h:110},10:{label:"MT10",shape:"square",x:430,y:400,w:130,h:130},11:{label:"MT11",shape:"rect",x:545,y:270,w:115,h:90},12:{label:"MT12",shape:"rect",x:400,y:270,w:120,h:95},13:{label:"MT13",shape:"rect",x:400,y:100,w:90,h:115},14:{label:"MT14",shape:"rect",x:185,y:420,w:230,h:100},15:{label:"MT15",shape:"rect",x:190,y:220,w:165,h:145},16:{label:"MT16",shape:"rect",x:185,y:105,w:125,h:80}},best:[7,9]},{name:"Sitooterie",label:"Sitooterie (fully covered conservatory, no pets)",colour:"#C79BE8",server:"DM",dogFriendly:!1,tables:[[17,2],[18,6],[19,4],[20,6],[21,4],[22,4],[23,4]],layout:{17:{label:"ST17",shape:"square",x:760,y:325,w:110,h:110},18:{label:"ST18",shape:"rect",x:605,y:135,w:270,h:115},19:{label:"ST19",shape:"rect",x:460,y:160,w:105,h:150},20:{label:"ST20",shape:"rect",x:135,y:125,w:265,h:120},21:{label:"ST21",shape:"rect",x:120,y:305,w:110,h:175},22:{label:"ST22",shape:"rect",x:255,y:310,w:115,h:175},23:{label:"ST23",shape:"rect",x:410,y:350,w:110,h:155}},best:[19,21]},{name:"Beer Garden",label:"Outdoor beer garden (weather permitting, no shelter, pets allowed)",colour:"#B08D57",server:"GD",dogFriendly:!0,outdoor:!0,weatherDependent:!0,tables:[[24,4],[25,4],[26,4],[27,6],[28,6],[29,4],[30,4],[31,4]],layout:{24:{label:"BGT24",shape:"round",x:740,y:70,w:130,h:130},25:{label:"BGT25",shape:"round",x:515,y:50,w:135,h:135},26:{label:"BGT26",shape:"round",x:310,y:50,w:135,h:135},27:{label:"BGT27",shape:"rect",x:560,y:235,w:280,h:115},28:{label:"BGT28",shape:"rect",x:245,y:235,w:270,h:110},29:{label:"BGT29",shape:"rect",x:210,y:365,w:190,h:60},30:{label:"BGT30",shape:"rect",x:180,y:445,w:190,h:55},31:{label:"BGT31",shape:"rect",x:130,y:520,w:215,h:60}},best:[27,28]}],photoScale:1.8,joins:[],bestNote:"Best tables per area from Gordon, 1 Nov 2026: Bar 1 and 3; Restaurant 7 and 9; Sitooterie 19 and 21; Outside (Beer Garden) 27 and 28. Shown as BEST for walk-ins and bookings when they fit; editable per area in the table plan."}},18,[]);
25
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0])},19,[20]);
26
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0]);var n=r(d[1]);(0,r(d[2]).renderRootComponent)(n.App)},20,[21,24,1426]);
 
1119
  __d(function(g,r,i,a,m,e,d){function n(n,t){const o=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(null!=o){const s=String(n);if(null!=t){const n=t[s];if(null!=n)return o(n)}}}function t(t,o,s){const u=()=>r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]);
1120
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]);
1121
  __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*v<w+4;return(0,h.jsxs)(o.default,{testID:"screen-title-row",onLayout:e=>u(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]);
1122
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]);
1123
  __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]);
1124
  __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]);
1125
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i},u=()=>'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]);
customer-app/admin.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/book.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/feedback.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/gift.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/lost.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/loyalty.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/merch.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/offers.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/refer.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/waitlist.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/anchorage/whatson.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/basket.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/customer/profile.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/demo.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/display.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/index.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/kitchen.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/owner.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/staff.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
customer-app/sw.js CHANGED
@@ -1,7 +1,7 @@
1
  // Anchorage service worker: precache the app shell so it opens offline after the first visit.
2
- const V = "cc-customer-f8e3769f1b";
3
  const BASE = "/customer-app/";
4
- const PRECACHE = ["/customer-app/apple-touch-icon.png", "/customer-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/customer-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/customer-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/customer-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/customer-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/customer-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/customer-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/customer-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/customer-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/customer-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/customer-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/customer-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/customer-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/customer-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/customer-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/customer-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/customer-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/customer-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/customer-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/customer-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/customer-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/customer-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/customer-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/customer-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/customer-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/customer-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/customer-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/customer-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/customer-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/customer-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/customer-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/customer-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/customer-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/customer-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/customer-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/customer-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/customer-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/customer-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/customer-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/customer-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/customer-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/customer-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/customer-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/customer-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/customer-app/brand-logo.png", "/customer-app/favicon.ico", "/customer-app/icon-192.png", "/customer-app/icon-512.png", "/customer-app/icon-maskable-192.png", "/customer-app/icon-maskable-512.png", "/customer-app/manifest.webmanifest", "/customer-app/index.html", "/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53"];
5
  // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached
6
  // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline).
7
  const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r);
 
1
  // Anchorage service worker: precache the app shell so it opens offline after the first visit.
2
+ const V = "cc-customer-46f6f742eb";
3
  const BASE = "/customer-app/";
4
+ const PRECACHE = ["/customer-app/apple-touch-icon.png", "/customer-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/customer-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/customer-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/customer-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/customer-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/customer-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/customer-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/customer-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/customer-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/customer-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/customer-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/customer-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/customer-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/customer-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/customer-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/customer-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/customer-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/customer-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/customer-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/customer-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/customer-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/customer-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/customer-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/customer-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/customer-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/customer-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/customer-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/customer-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/customer-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/customer-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/customer-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/customer-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/customer-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/customer-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/customer-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/customer-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/customer-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/customer-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/customer-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/customer-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/customer-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/customer-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/customer-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/customer-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/customer-app/brand-logo.png", "/customer-app/favicon.ico", "/customer-app/icon-192.png", "/customer-app/icon-512.png", "/customer-app/icon-maskable-192.png", "/customer-app/icon-maskable-512.png", "/customer-app/manifest.webmanifest", "/customer-app/index.html", "/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f"];
5
  // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached
6
  // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline).
7
  const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r);
customer-app/team.html CHANGED
@@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat
96
  }, 1000);
97
  })();
98
  </script>
99
- <script src="/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53" defer></script></body>
100
  </html>
 
96
  }, 1000);
97
  })();
98
  </script>
99
+ <script src="/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f" defer></script></body>
100
  </html>
display-app/_expo/static/js/web/bundle.js CHANGED
@@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
19
  __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n<r.slice(0,7),k=b(n,-1),h=p(Number(k.slice(0,4)),Number(k.slice(5,7))),S=y?Math.min(Number(r.slice(8,10)),h):h;let O=0,C=0;for(let e=1;e<=S;e++){const t=o.get(`${k}-${String(e).padStart(2,'0')}`);null!=t&&(O+=t,C++)}const D=s.length&&C&&O>0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]);
20
  __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t<Math.max(1,e.fromParty)?0:t*e.perPersonPence}const n=e=>`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]);
21
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]);
22
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]);
23
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?<![A-Za-z])':''}${a.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')}${/[A-Za-z]$/.test(a)?'(?![a-z])':''}`,'g'),n])},17,[]);
24
  __d(function(e,a,l,r,t,o,s){t.exports={venue:"The Anchorage",note:"From Gordon 28 Oct 2026; layout from Gordon's floor-plan photo 29 Oct 2026 (positions, sizes, shapes, labels scaled from the photo, one scale for all areas). Photo shows MT12 and no MT8: table 8 replaced by 12. Gordon confirmed 29 Oct: no table 8; MT11 and MT12 both exist, MT11 keeps 2 seats, MT12 = 2 seats. No tables 4 or 8. No joined tables: Gordon confirmed 29 Oct that DT1 and DT2 are not joined.",areas:[{name:"Public Bar",label:"Dog friendly area (Public Bar), Area 1",colour:"#CFA45F",server:"BR",dogFriendly:!0,tables:[[1,4],[2,4],[3,5],[5,2],[6,4]],layout:{1:{label:"DT1",shape:"rect",x:600,y:125,w:205,h:90},2:{label:"DT2",shape:"rect",x:395,y:130,w:100,h:190},3:{label:"DT3",shape:"rect",x:205,y:120,w:110,h:245},5:{label:"DT5",shape:"square",x:500,y:395,w:105,h:105},6:{label:"DT6",shape:"rect",x:195,y:395,w:205,h:110}},best:[1,3]},{name:"Main Restaurant",label:"Main restaurant (no pets)",colour:"#8EC5FF",server:"SV",dogFriendly:!1,tables:[[7,5],[9,7],[10,4],[11,2],[12,2],[13,4],[14,4],[15,4],[16,2]],layout:{7:{label:"MT7",shape:"rect",x:590,y:410,w:225,h:115},9:{label:"MT9",shape:"rect",x:560,y:105,w:260,h:110},10:{label:"MT10",shape:"square",x:430,y:400,w:130,h:130},11:{label:"MT11",shape:"rect",x:545,y:270,w:115,h:90},12:{label:"MT12",shape:"rect",x:400,y:270,w:120,h:95},13:{label:"MT13",shape:"rect",x:400,y:100,w:90,h:115},14:{label:"MT14",shape:"rect",x:185,y:420,w:230,h:100},15:{label:"MT15",shape:"rect",x:190,y:220,w:165,h:145},16:{label:"MT16",shape:"rect",x:185,y:105,w:125,h:80}},best:[7,9]},{name:"Sitooterie",label:"Sitooterie (fully covered conservatory, no pets)",colour:"#C79BE8",server:"DM",dogFriendly:!1,tables:[[17,2],[18,6],[19,4],[20,6],[21,4],[22,4],[23,4]],layout:{17:{label:"ST17",shape:"square",x:760,y:325,w:110,h:110},18:{label:"ST18",shape:"rect",x:605,y:135,w:270,h:115},19:{label:"ST19",shape:"rect",x:460,y:160,w:105,h:150},20:{label:"ST20",shape:"rect",x:135,y:125,w:265,h:120},21:{label:"ST21",shape:"rect",x:120,y:305,w:110,h:175},22:{label:"ST22",shape:"rect",x:255,y:310,w:115,h:175},23:{label:"ST23",shape:"rect",x:410,y:350,w:110,h:155}},best:[19,21]},{name:"Beer Garden",label:"Outdoor beer garden (weather permitting, no shelter, pets allowed)",colour:"#B08D57",server:"GD",dogFriendly:!0,outdoor:!0,weatherDependent:!0,tables:[[24,4],[25,4],[26,4],[27,6],[28,6],[29,4],[30,4],[31,4]],layout:{24:{label:"BGT24",shape:"round",x:740,y:70,w:130,h:130},25:{label:"BGT25",shape:"round",x:515,y:50,w:135,h:135},26:{label:"BGT26",shape:"round",x:310,y:50,w:135,h:135},27:{label:"BGT27",shape:"rect",x:560,y:235,w:280,h:115},28:{label:"BGT28",shape:"rect",x:245,y:235,w:270,h:110},29:{label:"BGT29",shape:"rect",x:210,y:365,w:190,h:60},30:{label:"BGT30",shape:"rect",x:180,y:445,w:190,h:55},31:{label:"BGT31",shape:"rect",x:130,y:520,w:215,h:60}},best:[27,28]}],photoScale:1.8,joins:[],bestNote:"Best tables per area from Gordon, 1 Nov 2026: Bar 1 and 3; Restaurant 7 and 9; Sitooterie 19 and 21; Outside (Beer Garden) 27 and 28. Shown as BEST for walk-ins and bookings when they fit; editable per area in the table plan."}},18,[]);
25
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0])},19,[20]);
26
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0]);var n=r(d[1]);(0,r(d[2]).renderRootComponent)(n.App)},20,[21,24,1445]);
@@ -1119,7 +1119,7 @@ __d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},1035,[1036]);
1119
  __d(function(g,r,i,a,m,e,d){function n(n,t){const o=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(null!=o){const s=String(n);if(null!=t){const n=t[s];if(null!=n)return o(n)}}}function t(t,o,s){const u=()=>r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]);
1120
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]);
1121
  __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*v<w+4;return(0,h.jsxs)(o.default,{testID:"screen-title-row",onLayout:e=>u(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]);
1122
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]);
1123
  __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]);
1124
  __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]);
1125
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i},u=()=>'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]);
 
19
  __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n<r.slice(0,7),k=b(n,-1),h=p(Number(k.slice(0,4)),Number(k.slice(5,7))),S=y?Math.min(Number(r.slice(8,10)),h):h;let O=0,C=0;for(let e=1;e<=S;e++){const t=o.get(`${k}-${String(e).padStart(2,'0')}`);null!=t&&(O+=t,C++)}const D=s.length&&C&&O>0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]);
20
  __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t<Math.max(1,e.fromParty)?0:t*e.perPersonPence}const n=e=>`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]);
21
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]);
22
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='e33e971b7b00',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lily",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]);
23
+ __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Lily','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?<![A-Za-z])':''}${a.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')}${/[A-Za-z]$/.test(a)?'(?![a-z])':''}`,'g'),n])},17,[]);
24
  __d(function(e,a,l,r,t,o,s){t.exports={venue:"The Anchorage",note:"From Gordon 28 Oct 2026; layout from Gordon's floor-plan photo 29 Oct 2026 (positions, sizes, shapes, labels scaled from the photo, one scale for all areas). Photo shows MT12 and no MT8: table 8 replaced by 12. Gordon confirmed 29 Oct: no table 8; MT11 and MT12 both exist, MT11 keeps 2 seats, MT12 = 2 seats. No tables 4 or 8. No joined tables: Gordon confirmed 29 Oct that DT1 and DT2 are not joined.",areas:[{name:"Public Bar",label:"Dog friendly area (Public Bar), Area 1",colour:"#CFA45F",server:"BR",dogFriendly:!0,tables:[[1,4],[2,4],[3,5],[5,2],[6,4]],layout:{1:{label:"DT1",shape:"rect",x:600,y:125,w:205,h:90},2:{label:"DT2",shape:"rect",x:395,y:130,w:100,h:190},3:{label:"DT3",shape:"rect",x:205,y:120,w:110,h:245},5:{label:"DT5",shape:"square",x:500,y:395,w:105,h:105},6:{label:"DT6",shape:"rect",x:195,y:395,w:205,h:110}},best:[1,3]},{name:"Main Restaurant",label:"Main restaurant (no pets)",colour:"#8EC5FF",server:"SV",dogFriendly:!1,tables:[[7,5],[9,7],[10,4],[11,2],[12,2],[13,4],[14,4],[15,4],[16,2]],layout:{7:{label:"MT7",shape:"rect",x:590,y:410,w:225,h:115},9:{label:"MT9",shape:"rect",x:560,y:105,w:260,h:110},10:{label:"MT10",shape:"square",x:430,y:400,w:130,h:130},11:{label:"MT11",shape:"rect",x:545,y:270,w:115,h:90},12:{label:"MT12",shape:"rect",x:400,y:270,w:120,h:95},13:{label:"MT13",shape:"rect",x:400,y:100,w:90,h:115},14:{label:"MT14",shape:"rect",x:185,y:420,w:230,h:100},15:{label:"MT15",shape:"rect",x:190,y:220,w:165,h:145},16:{label:"MT16",shape:"rect",x:185,y:105,w:125,h:80}},best:[7,9]},{name:"Sitooterie",label:"Sitooterie (fully covered conservatory, no pets)",colour:"#C79BE8",server:"DM",dogFriendly:!1,tables:[[17,2],[18,6],[19,4],[20,6],[21,4],[22,4],[23,4]],layout:{17:{label:"ST17",shape:"square",x:760,y:325,w:110,h:110},18:{label:"ST18",shape:"rect",x:605,y:135,w:270,h:115},19:{label:"ST19",shape:"rect",x:460,y:160,w:105,h:150},20:{label:"ST20",shape:"rect",x:135,y:125,w:265,h:120},21:{label:"ST21",shape:"rect",x:120,y:305,w:110,h:175},22:{label:"ST22",shape:"rect",x:255,y:310,w:115,h:175},23:{label:"ST23",shape:"rect",x:410,y:350,w:110,h:155}},best:[19,21]},{name:"Beer Garden",label:"Outdoor beer garden (weather permitting, no shelter, pets allowed)",colour:"#B08D57",server:"GD",dogFriendly:!0,outdoor:!0,weatherDependent:!0,tables:[[24,4],[25,4],[26,4],[27,6],[28,6],[29,4],[30,4],[31,4]],layout:{24:{label:"BGT24",shape:"round",x:740,y:70,w:130,h:130},25:{label:"BGT25",shape:"round",x:515,y:50,w:135,h:135},26:{label:"BGT26",shape:"round",x:310,y:50,w:135,h:135},27:{label:"BGT27",shape:"rect",x:560,y:235,w:280,h:115},28:{label:"BGT28",shape:"rect",x:245,y:235,w:270,h:110},29:{label:"BGT29",shape:"rect",x:210,y:365,w:190,h:60},30:{label:"BGT30",shape:"rect",x:180,y:445,w:190,h:55},31:{label:"BGT31",shape:"rect",x:130,y:520,w:215,h:60}},best:[27,28]}],photoScale:1.8,joins:[],bestNote:"Best tables per area from Gordon, 1 Nov 2026: Bar 1 and 3; Restaurant 7 and 9; Sitooterie 19 and 21; Outside (Beer Garden) 27 and 28. Shown as BEST for walk-ins and bookings when they fit; editable per area in the table plan."}},18,[]);
25
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0])},19,[20]);
26
  __d(function(g,r,i,a,m,e,d){"use strict";r(d[0]);var n=r(d[1]);(0,r(d[2]).renderRootComponent)(n.App)},20,[21,24,1445]);
 
1119
  __d(function(g,r,i,a,m,e,d){function n(n,t){const o=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(null!=o){const s=String(n);if(null!=t){const n=t[s];if(null!=n)return o(n)}}}function t(t,o,s){const u=()=>r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]);
1120
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]);
1121
  __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*v<w+4;return(0,h.jsxs)(o.default,{testID:"screen-title-row",onLayout:e=>u(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]);
1122
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]);
1123
  __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]);
1124
  __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]);
1125
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i},u=()=>'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]);