1const i=new Set,o={productUuid:null,categoryId:null,blogId:null,promotionId:null,couponId:null,context:null},c=n=>{let l=!1;if(Object.prototype.hasOwnProperty.call(n,"productUuid")){let t;const e=n.productUuid;if(typeof e=="string"){const r=e.trim();t=r.length?r:null}else t=null;o.productUuid!==t&&(o.productUuid=t,l=!0)}if(Object.prototype.hasOwnProperty.call(n,"categoryId")){const t=n.categoryId;let e=null;if(typeof t=="string"){const r=t.trim();e=r.length?r:null}else typeof t=="number"?e=Number.isFinite(t)?String(t):null:t===null&&(e=null);o.categoryId!==e&&(o.categoryId=e,l=!0)}if(Object.prototype.hasOwnProperty.call(n,"blogId")){const t=n.blogId;let e=null;if(typeof t=="string"){const r=t.trim();e=r.length?r:null}else typeof t=="number"?e=Number.isFinite(t)?String(t):null:t===null&&(e=null);o.blogId!==e&&(o.blogId=e,l=!0)}if(Object.prototype.hasOwnProperty.call(n,"promotionId")){const t=n.promotionId;let e=null;if(typeof t=="string"){const r=t.trim();e=r.length?r:null}else typeof t=="number"?e=Number.isFinite(t)?String(t):null:t===null&&(e=null);o.promotionId!==e&&(o.promotionId=e,l=!0)}if(Object.prototype.hasOwnProperty.call(n,"couponId")){const t=n.couponId;let e=null;if(typeof t=="string"){const r=t.trim();e=r.length?r:null}else typeof t=="number"?e=Number.isFinite(t)?String(t):null:t===null&&(e=null);o.couponId!==e&&(o.couponId=e,l=!0)}if(Object.prototype.hasOwnProperty.call(n,"context")){const t=typeof n.context>"u"?o.context:n.context??null;o.context!==t&&(o.context=t,l=!0)}return l},d=()=>{const n={productUuid:o.productUuid,categoryId:o.categoryId,blogId:o.blogId,promotionId:o.promotionId,couponId:o.couponId,context:o.context};i.forEach(l=>{try{l(n)}catch{}})},u=n=>{if(!n||typeof n!="object")return;c(n)&&d()},s=n=>(i.add(n),n({productUuid:o.productUuid,categoryId:o.categoryId,blogId:o.blogId,promotionId:o.promotionId,couponId:o.couponId,context:o.context}),()=>{i.delete(n)}),p=()=>({productUuid:o.productUuid,categoryId:o.categoryId,blogId:o.blogId,promotionId:o.promotionId,couponId:o.couponId,context:o.context});export{p as getPreviewIdentifierState,u as publishPreviewIdentifierUpdate,s as subscribePreviewIdentifierUpdates};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.