"use strict";(self.webpackChunkwebpackWcBlocksStylingJsonp=self.webpackChunkwebpackWcBlocksStylingJsonp||[]).push([[8268],{93373:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var o=n(51609),r=n(70851),c=n(36610),i=n(14656),s=n(86087);const h=({children:e,className:t})=>{const[n,h,u]=function(){const[e,t]=(0,s.useState)({height:0,width:0}),[n,o]=(0,s.useState)({height:0,width:0}),r=(0,s.useRef)(null);return(0,s.useEffect)((()=>{if(!r.current)return;const e=r.current,n=new ResizeObserver((n=>{n.forEach((n=>{if(n.target===e){let r="0";var o;r=e.computedStyleMap?(null===(o=e.computedStyleMap().get("top"))||void 0===o?void 0:o.toString())||r:getComputedStyle(e).top||r;const{height:c,width:i}=n.contentRect;t({height:c+parseInt(r,10),width:i})}}))})),c=new IntersectionObserver((e=>{e.forEach((e=>{const{height:n,width:r}=e.boundingClientRect;var c,i;t({height:n,width:r}),e.target.ownerDocument.defaultView&&o({height:null===(c=e.target.ownerDocument.defaultView)||void 0===c?void 0:c.innerHeight,width:null===(i=e.target.ownerDocument.defaultView)||void 0===i?void 0:i.innerWidth})}))}),{root:null,rootMargin:"0px",threshold:1});return n.observe(e),c.observe(e),()=>{e&&(n.unobserve(e),c.unobserve(e))}}),[]),[r,e,n]}(),l=h.height<u.height;return(0,o.createElement)(c.A,{ref:n,className:(0,r.A)("wc-block-checkout__sidebar",t,{"is-sticky":l})},(0,o.createElement)(i.StoreNoticesContainer,{context:"woocommerce/checkout-totals-block"}),e)}}}]);