@pinegrow/vite-plugin 3.0.73-alpha.10 → 3.0.73-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/astro/runtime.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={748:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},314:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},850:(e,t,r)=>{var n=r(748);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},290:(e,t,r)=>{var n=r(739);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},912:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},193:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,l=[],s=!0,a=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{if(!s&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(a)throw o}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports},147:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},96:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},681:(e,t,r)=>{var n=r(314),o=r(193),i=r(121),u=r(147);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},408:(e,t,r)=>{var n=r(850),o=r(912),i=r(121),u=r(96);e.exports=function(e){return n(e)||o(e)||i(e)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},64:(e,t,r)=>{var n=r(425).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},739:(e,t,r)=>{var n=r(425).default,o=r(64);e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},121:(e,t,r)=>{var n=r(748);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{createAstroComponentEntries:()=>A,createAstroElCacheEntry:()=>h,createAstroRuntimeBridge:()=>F,ensurePinegrowAstroBridge:()=>S,refreshAstroElCache:()=>E,scanAstroSourceDomMarkers:()=>_});var e=r(408),t=r(681),o=r(290);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l="data-pg-source-id",s="data-pg-id",a="astro",c=function(e){return{get value(){return e()}}},p=function(e){return{value:e}},f=function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).immediate&&"function"==typeof t&&t(function(e){return"function"==typeof e?e():null==e?void 0:e.value}(e),void 0),function(){}},d=function(e,t){return{uid:"astro:".concat(e.id),isMounted:!0,isUnmounted:!1,parent:null,type:{__name:e.name||"AstroElement",__file:null},props:{},attrs:{},slots:{},subTree:{el:t},appContext:null}},m=function(){return"undefined"!=typeof window?window:null},y=function(e,t){var r=function(e){return e&&"function"==typeof e.get&&"function"==typeof e.set&&"function"==typeof e.delete&&"function"==typeof e.entries}(t)?t:new Map,n=null==e?void 0:e.reactiveFromContext;return"function"==typeof n?n(r):r},v=function(e){return(null==e?void 0:e.sourceFile)||(null==e?void 0:e.id)||null},g=function(e){return Array.isArray(e)?e:[]},b=function(e){return"".concat(e||"").replace(/\\/g,"/")},x=function(e){return e&&b(e).split("/").pop()||""},w=function(e,t,r){return{uid:t,isMounted:!0,isUnmounted:!1,parent:null,type:{__name:x(null==e?void 0:e.sourceFile)||"AstroComponent",__file:(null==e?void 0:e.sourceFile)||null},props:{},attrs:{},slots:{},subTree:{el:r},appContext:null}},h=function(e){var t,r,n=e.element,o=e.manifest,i=e.markerAttribute,c=void 0===i?l:i,p=e.node,f=e.mirroredPgId,m=void 0!==f&&f,y={start:null!==(t=p.sourceStart)&&void 0!==t?t:null,end:null!==(r=p.sourceEnd)&&void 0!==r?r:null,status:p.sourceRangeStatus||"unknown"};return{el:n,framework:a,entryKind:"source-node",treeScopes:{pageTree:!0,appTree:!1},isAstro:!0,isAstroSourceDomEntry:!0,isAstroComponent:!1,isAppTreeComponent:!1,sourceId:p.id,pgId:p.id,key:p.id,localFile:null,sourceFile:o.sourceFile||null,nodeType:p.type||null,name:p.name||"",source:{id:p.id,file:o.sourceFile||null,range:y,nodeType:p.type||null,name:p.name||""},component:null,owners:[],sourceRange:y,sourceStart:y.start,sourceEnd:y.end,sourceRangeStatus:y.status,marker:u(u({},p.marker||{}),{},{liveAttribute:c,pinegrowAttribute:s,mirroredPgId:m}),editability:p.editability||null,attributes:p.attributes||[],isFragment:!1,isRootFragment:!1,isIsland:!1,rootEl:null,firstEl:n,lastEl:n,instance:d(p,n),vnode:null}},A=function(e){var t=function(e){var t=e.entries,r=e.manifest,n=e.root,o=null==r?void 0:r.sourceFile,i=function(e){return e?e.documentElement?e.documentElement:e.body?e.body:e.firstElementChild?e.firstElementChild:1===e.nodeType?e:null:null}(n),u=function(e){return/(^|\/)src\/pages\/.+\.astro$/i.test(b(e))}(o),l=u&&i;if(!o||!t.length&&!l)return null;var s=t[0],c=t[t.length-1],p="astro-component:".concat(o),f=l?i:s.firstEl||s.el,d=l?null:c.lastEl||c.el,m=x(o);return{el:f,framework:a,entryKind:l?"page-root":"component-boundary",treeScopes:{pageTree:!1,appTree:!0},isAstro:!0,isAstroSourceDomEntry:!1,isAstroComponent:!0,isAppTreeComponent:!0,isAstroPageRoot:Boolean(l),sourceId:p,pgId:null,key:null,localFile:o,sourceFile:o,nodeType:"component-file",name:m,source:{id:p,file:o,range:{start:null,end:null,status:"component-file"},nodeType:"component-file",name:m},component:{file:o,name:m,kind:u?"page":"component"},owners:[],sourceRange:{start:null,end:null,status:"component-file"},sourceStart:null,sourceEnd:null,sourceRangeStatus:"component-file",marker:null,editability:{mode:"inspect",operations:["select","open-source-file"],reasons:["astro-component-file"]},attributes:[],state:Array.isArray(r.state)?r.state:[],isFragment:!1,isRootFragment:!1,isIsland:!1,rootEl:null,firstEl:f,lastEl:d,instance:w(r,p,f),vnode:null}}({entries:e.entries,manifest:e.manifest,root:e.root});return t?[t]:[]},_=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=function(e){var t;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).markerAttribute||(null==e||null===(t=e.marker)||void 0===t?void 0:t.attribute)||l}(t,r),o=[],i=[];if("ready"!==(null==t?void 0:t.status))return{status:"unavailable",markerAttribute:n,entries:o,componentEntries:[],missing:i,reason:(null==t?void 0:t.reason)||"Astro source manifest is unavailable."};if(!e||"function"!=typeof e.querySelectorAll)return{status:"unavailable",markerAttribute:n,entries:o,componentEntries:[],missing:i,reason:"A DOM root with querySelectorAll() is required."};var u=function(e){var t=new Map;return((null==e?void 0:e.nodes)||[]).forEach((function(e){null!=e&&e.id&&t.set(e.id,e)})),t}(t);return function(e,t){return e&&"function"==typeof e.querySelectorAll?Array.from(e.querySelectorAll("[".concat(t,"]"))):[]}(e,n).forEach((function(e){var l=function(e,t){return e&&"function"==typeof e.getAttribute?e.getAttribute(t):null}(e,n),a=u.get(l);if(a){var c=function(e,t){if(!1===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).mirrorPgId||!t||!e||"function"!=typeof e.getAttribute||"function"!=typeof e.setAttribute)return!1;var r,n=e.getAttribute(s);return n===t||!((r=n)&&!r.startsWith("pgastro-"))&&(e.setAttribute(s,t),!0)}(e,l,r);o.push(h({element:e,manifest:t,markerAttribute:n,node:a,mirroredPgId:c}))}else r.reportMissingMarkers&&i.push({element:e,sourceId:l})})),{status:"ready",markerAttribute:n,entries:o,componentEntries:A({entries:o,manifest:t,root:e}),missing:i}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m();return e?(e.pinegrow||(e.pinegrow={}),"function"!=typeof e.pinegrow.reactiveFromContext&&(e.pinegrow.reactiveFromContext=function(e){return e}),"function"!=typeof e.pinegrow.refFromContext&&(e.pinegrow.refFromContext=p),"function"!=typeof e.pinegrow.computedFromContext&&(e.pinegrow.computedFromContext=c),"function"!=typeof e.pinegrow.watchFromContext&&(e.pinegrow.watchFromContext=f),e.pinegrow.elCache=y(e.pinegrow,e.pinegrow.elCache),e.pinegrow.astro||(e.pinegrow.astro={}),e.pinegrow.astro.sourceManifests=y(e.pinegrow,e.pinegrow.astro.sourceManifests),e.pinegrow):null},E=function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.win||m(),i=n.root||(null==o?void 0:o.document)||null,l=S(o),s=_(i,r,n);if(!l)return u(u({},s),{},{cached:0,removed:0,reason:s.reason||"A browser window is required."});if("ready"!==s.status)return u(u({},s),{},{cached:0,removed:0});var c=!1===n.clearPrevious?{elements:[],removed:0}:function(e,r){var n=v(r),o=0,i=[];return n?(Array.from(e.entries()).forEach((function(r){var u=t(r,2),l=u[0],s=u[1],c=g(s),p=c.filter((function(e){return!function(e,t){return(null==e?void 0:e.framework)===a&&(e.localFile===t||e.sourceFile===t)}(e,n)})),f=c.length-p.length;o+=f,f&&i.push(l),p.length?e.set(l,p):e.delete(l)})),{elements:i,removed:o}):{elements:i,removed:o}}(l.elCache,r),p=new Set(c.elements),f=[].concat(e(s.entries),e(s.componentEntries||[]));f.forEach((function(e){!function(e,t){var r=g(e.get(t.el)).filter((function(e){return e.framework!==a||e.sourceId!==t.sourceId||e.localFile!==t.localFile}));r.push(t),e.set(t.el,r)}(l.elCache,e),p.add(e.el)})),p.forEach((function(e){l.elUpdateHanderFn&&l.elUpdateHanderFn(e)}));var d=v(r);return d&&l.astro.sourceManifests.set(d,r),u(u({},s),{},{cached:f.length,removed:c.removed})},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{manifest:e,scan:function(r){var n,o;return _(r||t.root||(null===(n=t.win)||void 0===n?void 0:n.document)||(null===(o=m())||void 0===o?void 0:o.document),e,t)},refresh:function(r){return E(e,u(u({},t),r))}}}})(),module.exports=n})();
|
|
1
|
+
(()=>{var e={748:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},314:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},850:(e,t,r)=>{var n=r(748);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},290:(e,t,r)=>{var n=r(739);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},912:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},193:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,i,l=[],s=!0,a=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=u.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(a)throw o}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports},147:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},96:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},681:(e,t,r)=>{var n=r(314),o=r(193),u=r(121),i=r(147);e.exports=function(e,t){return n(e)||o(e,t)||u(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},408:(e,t,r)=>{var n=r(850),o=r(912),u=r(121),i=r(96);e.exports=function(e){return n(e)||o(e)||u(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},64:(e,t,r)=>{var n=r(425).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},739:(e,t,r)=>{var n=r(425).default,o=r(64);e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},121:(e,t,r)=>{var n=r(748);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n](u,u.exports,r),u.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{createAstroComponentEntries:()=>S,createAstroElCacheEntry:()=>E,createAstroRuntimeBridge:()=>F,ensurePinegrowAstroBridge:()=>C,refreshAstroElCache:()=>M,scanAstroSourceDomMarkers:()=>_});var e=r(681),t=r(290),o=r(408);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l="data-pg-id",s="data-pg-id",a="astro",c=function(e){return{get value(){return e()}}},f=function(e){return{value:e}},p=function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).immediate&&"function"==typeof t&&t(function(e){return"function"==typeof e?e():null==e?void 0:e.value}(e),void 0),function(){}},d=function(e,t){return{uid:"astro:".concat(e.id),isMounted:!0,isUnmounted:!1,parent:null,type:{__name:e.name||"AstroElement",__file:null},props:{},attrs:{},slots:{},subTree:{el:t},appContext:null}},m=function(){return"undefined"!=typeof window?window:null},v=function(e,t){var r=function(e){return e&&"function"==typeof e.get&&"function"==typeof e.set&&"function"==typeof e.delete&&"function"==typeof e.entries}(t)?t:new Map,n=null==e?void 0:e.reactiveFromContext;return"function"==typeof n?n(r):r},y=function(e){return(null==e?void 0:e.sourceFile)||(null==e?void 0:e.id)||null},g=function(e){return Array.isArray(e)?e:[]},b=function(e){return(null==e?void 0:e.firstEl)||(null==e?void 0:e.el)||null},x=function(e){return"".concat(e||"").replace(/\\/g,"/")},h=function(e){return e&&x(e).split("/").pop()||""},w=function(e,t,r){return{uid:t,isMounted:!0,isUnmounted:!1,parent:null,type:{__name:h(null==e?void 0:e.sourceFile)||"AstroComponent",__file:(null==e?void 0:e.sourceFile)||null},props:{},attrs:{},slots:{},subTree:{el:r},appContext:null}},A=function e(t,r){t&&(r(t),function(e){return Array.from((null==e?void 0:e.childNodes)||[])}(t).forEach((function(t){return e(t,r)})))},E=function(e){var t,r,n=e.boundary,o=void 0===n?null:n,u=e.element,c=e.firstElement,f=void 0===c?null:c,p=e.lastElement,m=void 0===p?null:p,v=e.manifest,y=e.markerAttribute,g=void 0===y?l:y,b=e.node,x=e.mirroredPgId,h=void 0!==x&&x,w=f||u,A=m||w,E=Boolean(o),S={start:null!==(t=b.sourceStart)&&void 0!==t?t:null,end:null!==(r=b.sourceEnd)&&void 0!==r?r:null,status:b.sourceRangeStatus||"unknown"};return{el:w,framework:a,entryKind:"source-node",treeScopes:{pageTree:!0,appTree:!1},isAstro:!0,isAstroSourceDomEntry:!0,isAstroComponent:!1,isAppTreeComponent:!1,sourceId:b.id,pgId:b.id,key:b.id,localFile:null,sourceFile:v.sourceFile||null,nodeType:b.type||null,name:b.name||"",source:{id:b.id,file:v.sourceFile||null,range:S,nodeType:b.type||null,name:b.name||""},component:null,owners:[],sourceRange:S,sourceStart:S.start,sourceEnd:S.end,sourceRangeStatus:S.status,marker:i(i({},b.marker||{}),{},{liveAttribute:g,pinegrowAttribute:s,mirroredPgId:h,boundary:o}),editability:b.editability||null,attributes:b.attributes||[],isFragment:E,isRootFragment:!1,isIsland:!1,rootEl:null,firstEl:w,lastEl:A,instance:d(b,w),vnode:null}},S=function(e){var t=function(e){var t=e.entries,r=e.manifest,n=e.root,u=null==r?void 0:r.sourceFile,i=function(e){return e?e.documentElement?e.documentElement:e.body?e.body:e.firstElementChild?e.firstElementChild:1===e.nodeType?e:null:null}(n),l=function(e){return/(^|\/)src\/pages\/.+\.astro$/i.test(x(e))}(u),s=l&&i;if(!u||!t.length&&!s)return null;var c,f=function(e){return o(e).sort((function(e,t){var r=b(e),n=b(t);if(!r||!n||r===n||"function"!=typeof r.compareDocumentPosition)return 0;var o=r.compareDocumentPosition(n);return 2&o?1:4&o?-1:0}))}(t),p=f[0],d=f[f.length-1],m="astro-component:".concat(u),v=s?i:b(p),y=s?null:(null==(c=d)?void 0:c.lastEl)||(null==c?void 0:c.el)||null,g=h(u);return{el:v,framework:a,entryKind:s?"page-root":"component-boundary",treeScopes:{pageTree:!1,appTree:!0},isAstro:!0,isAstroSourceDomEntry:!1,isAstroComponent:!0,isAppTreeComponent:!0,isAstroPageRoot:Boolean(s),sourceId:m,pgId:null,key:null,localFile:u,sourceFile:u,nodeType:"component-file",name:g,source:{id:m,file:u,range:{start:null,end:null,status:"component-file"},nodeType:"component-file",name:g},component:{file:u,name:g,kind:l?"page":"component"},owners:[],sourceRange:{start:null,end:null,status:"component-file"},sourceStart:null,sourceEnd:null,sourceRangeStatus:"component-file",marker:null,editability:{mode:"inspect",operations:["select","open-source-file"],reasons:["astro-component-file"]},attributes:[],state:Array.isArray(r.state)?r.state:[],isFragment:!1,isRootFragment:!1,isIsland:!1,rootEl:null,firstEl:v,lastEl:y,instance:w(r,m,v),vnode:null}}({entries:e.entries,manifest:e.manifest,root:e.root});return t?[t]:[]},_=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=function(e){var t;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).markerAttribute||(null==e||null===(t=e.marker)||void 0===t?void 0:t.attribute)||l}(t,r),o=[],u=[];if("ready"!==(null==t?void 0:t.status))return{status:"unavailable",markerAttribute:n,entries:o,componentEntries:[],missing:u,reason:(null==t?void 0:t.reason)||"Astro source manifest is unavailable."};if(!e||"function"!=typeof e.querySelectorAll)return{status:"unavailable",markerAttribute:n,entries:o,componentEntries:[],missing:u,reason:"A DOM root with querySelectorAll() is required."};var i=function(e){var t=new Map;return((null==e?void 0:e.nodes)||[]).forEach((function(e){null!=e&&e.id&&t.set(e.id,e)})),t}(t);return function(e,t){return e&&"function"==typeof e.querySelectorAll?Array.from(e.querySelectorAll("[".concat(t,"]"))):[]}(e,n).forEach((function(e){var l=function(e,t){return e&&"function"==typeof e.getAttribute?e.getAttribute(t):null}(e,n),a=i.get(l);if(a){var c=n!==s&&function(e,t){if(!1===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).mirrorPgId||!t||!e||"function"!=typeof e.getAttribute||"function"!=typeof e.setAttribute)return!1;var r,n=e.getAttribute(s);return n===t||!((r=n)&&!r.startsWith("pgastro-"))&&(e.setAttribute(s,t),!0)}(e,l,r);o.push(E({element:e,manifest:t,markerAttribute:n,node:a,mirroredPgId:c}))}else r.reportMissingMarkers&&u.push({element:e,sourceId:l})})),function(e,t){var r=new Map,n=[];return A(e,(function(e){var o=function(e){if(8!==(null==e?void 0:e.nodeType))return null;var t="".concat(e.nodeValue||"").trim().match(/^pgastro:(start|end):(.+)$/);return t?{boundary:t[1],sourceId:t[2]}:null}(e);if(o&&t.has(o.sourceId)){if("start"===o.boundary)return r.has(o.sourceId)||r.set(o.sourceId,[]),void r.get(o.sourceId).push(e);var u=r.get(o.sourceId),i=null==u?void 0:u.pop();if(i){var l=function(e,t){if(null==e||!e.parentNode||e.parentNode!==(null==t?void 0:t.parentNode))return{firstEl:null,lastEl:null};for(var r=null,n=null,o=e.nextSibling;o&&o!==t;)1===o.nodeType&&(r||(r=o),n=o),o=o.nextSibling;return{firstEl:r,lastEl:n}}(i,e),s=l.firstEl,a=l.lastEl;s&&n.push({sourceId:o.sourceId,firstEl:s,lastEl:a||s,startComment:i,endComment:e})}}})),n}(e,i).forEach((function(e){var r=i.get(e.sourceId);o.push(E({boundary:{strategy:"boundary-comment",startComment:e.startComment,endComment:e.endComment},element:e.firstEl,firstElement:e.firstEl,lastElement:e.lastEl,manifest:t,markerAttribute:n,node:r,mirroredPgId:!1}))})),{status:"ready",markerAttribute:n,entries:o,componentEntries:S({entries:o,manifest:t,root:e}),missing:u}},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m();return e?(e.pinegrow||(e.pinegrow={}),"function"!=typeof e.pinegrow.reactiveFromContext&&(e.pinegrow.reactiveFromContext=function(e){return e}),"function"!=typeof e.pinegrow.refFromContext&&(e.pinegrow.refFromContext=f),"function"!=typeof e.pinegrow.computedFromContext&&(e.pinegrow.computedFromContext=c),"function"!=typeof e.pinegrow.watchFromContext&&(e.pinegrow.watchFromContext=p),e.pinegrow.elCache=v(e.pinegrow,e.pinegrow.elCache),e.pinegrow.astro||(e.pinegrow.astro={}),e.pinegrow.astro.sourceManifests=v(e.pinegrow,e.pinegrow.astro.sourceManifests),e.pinegrow):null},M=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.win||m(),u=r.root||(null==n?void 0:n.document)||null,l=C(n),s=_(u,t,r);if(!l)return i(i({},s),{},{cached:0,removed:0,reason:s.reason||"A browser window is required."});if("ready"!==s.status)return i(i({},s),{},{cached:0,removed:0});var c=!1===r.clearPrevious?{elements:[],removed:0}:function(t,r){var n=y(r),o=0,u=[];return n?(Array.from(t.entries()).forEach((function(r){var i=e(r,2),l=i[0],s=i[1],c=g(s),f=c.filter((function(e){return!function(e,t){return(null==e?void 0:e.framework)===a&&(e.localFile===t||e.sourceFile===t)}(e,n)})),p=c.length-f.length;o+=p,p&&u.push(l),f.length?t.set(l,f):t.delete(l)})),{elements:u,removed:o}):{elements:u,removed:o}}(l.elCache,t),f=new Set(c.elements),p=[].concat(o(s.entries),o(s.componentEntries||[]));p.forEach((function(e){!function(e,t){var r=g(e.get(t.el)).filter((function(e){return e.framework!==a||e.sourceId!==t.sourceId||e.localFile!==t.localFile}));r.push(t),e.set(t.el,r)}(l.elCache,e),f.add(e.el)})),f.forEach((function(e){l.elUpdateHanderFn&&l.elUpdateHanderFn(e)}));var d=y(t);return d&&l.astro.sourceManifests.set(d,t),i(i({},s),{},{cached:p.length,removed:c.removed})},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{manifest:e,scan:function(r){var n,o;return _(r||t.root||(null===(n=t.win)||void 0===n?void 0:n.document)||(null===(o=m())||void 0===o?void 0:o.document),e,t)},refresh:function(r){return M(e,i(i({},t),r))}}}})(),module.exports=n})();
|