PageSourceSearch

https://henryrose.com/cdn/shop/t/172/assets/hr-chunk-debug.addIndicators-CvlHjQ-2.js

js henryrose.com collected 2026-09-25 15:00:53 UTC 7,620 bytes, 1 lines download raw bytes

1import{r as e}from"./hr-chunk-ScrollMagic-BnxCxgAi.js";var r;r||(r=1,function(e){var r="debug.addIndicators",t=window.console||{},o=Function.prototype.bind.call(t.error||t.log||function(){},t);e||o("("+r+") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.");var i="0.85em",n="9999",s=15,d=e._util,a=0;e.Scene.extend(function(){var e,r=this;r.addIndicators=function(t){if(!e){var o={name:"",indent:0,parent:void 0,colorStart:"green",colorEnd:"red",colorTrigger:"blue"};t=d.extend({},o,t),a++,e=new g(r,t),r.on("add.plugin_addIndicators",e.add),r.on("remove.plugin_addIndicators",e.remove),r.on("destroy.plugin_addIndicators",r.removeIndicators),r.controller()&&e.add()}return r},r.removeIndicators=function(){return e&&(e.remove(),this.off("*.plugin_addIndicators"),e=void 0),r}}),e.Controller.addOption("addIndicators",!1),e.Controller.extend(function(){var t=this,o=t.info(),i=o.container,n=o.isDocument,a=o.vertical,g={groups:[]},l=function(){t._log&&(Array.prototype.splice.call(arguments,1,0,"("+r+")","->"),t._log.apply(this,arguments))};t._indicators&&l(2,"WARNING: Scene already has a property '_indicators', which will be overwritten by plugin."),this._indicators=g;var p=function(){g.updateBoundsPositions()},c=function(){g.updateTriggerGroupPositions()};return i.addEventListener("resize",c),n||(window.addEventListener("resize",c),window.addEventListener("scroll",c)),i.addEventListener("resize",p),i.addEventListener("scroll",p),this._indicators.updateBoundsPositions=function(e){for(var r,t,o,n=e?[d.extend({},e.triggerGroup,{members:[e]})]:g.groups,l=n.length,p={},c=a?"left":"top",u=a?"width":"height",f=a?d.get.scrollLeft(i)+d.get.width(i)-s:d.get.scrollTop(i)+d.get.height(i)-s;l--;)for(r=(o=n[l]).members.length,t=d.get[u](o.element.firstChild);r--;)p[c]=f-t,d.css(o.members[r].bounds,p)},this._indicators.updateTriggerGroupPositions=function(e){for(var r,o,l,p,c=e?[e]:g.groups,u=c.length,f=n?document.body:i,h=n?{top:0,left:0}:d.get.offset(f,!0),m=a?d.get.width(i)-s:d.get.height(i)-s,v=a?"width":"height",b=a?"Y":"X";u--;)o=(r=c[u]).element,p=(l=r.triggerHook*t.info("size"))>d.get[v](o.firstChild.firstChild)?"translate"+b+"(-100%)":"",d.css(o,{top:h.top+(a?l:m-r.members[0].options.indent),left:h.left+(a?m-r.members[0].options.indent:l)}),d.css(o.firstChild.firstChild,{"-ms-transform":p,"-webkit-transform":p,transform:p})},this._indicators.updateTriggerGroupLabel=function(e){var r="trigger"+(e.members.length>1?"":" "+e.members[0].options.name),t=e.element.firstChild.firstChild;t.textContent!==r&&(t.textContent=r,a&&g.updateBoundsPositions())},this.addScene=function(r){this._options.addIndicators&&r instanceof e.Scene&&r.controller()===t&&r.addIndicators(),this.$super.addScene.apply(this,arguments)},this.destroy=function(){i.removeEventListener("resize",c),n||(window.removeEventListener("resize",c),window.removeEventListener("scroll",c)),i.removeEventListener("resize",p),i.removeEventListener("scroll",p),this.$super.destroy.apply(this,arguments)},t});var g=function(e,t){var o,i,n=this,s=l.bounds(),g=l.start(t.colorStart),p=l.end(t.colorEnd),c=t.parent&&d.get.elements(t.parent)[0],u=function(){e._log&&(Array.prototype.splice.call(arguments,1,0,"("+r+")","->"),e._log.apply(this,arguments))};t.name=t.name||a,g.firstChild.textContent+=" "+t.name,p.textContent+=" "+t.name,s.appendChild(g),s.appendChild(p),n.options=t,n.bounds=s,n.triggerGroup=void 0,this.add=function(){i=e.controller(),o=i.info("vertical");var r=i.info("isDocument");c||(c=r?document.body:i.info("container")),r||"static"!==d.css(c,"position")||d.css(c,{position:"relative"}),e.on("change.plugin_addIndicators",h),e.on("shift.plugin_addIndicators",f),_(),b(),setTimeout(function(){i._indicators.updateBoundsPositions(n)},0),u(3,"added indicators")},this.remove=function(){if(n.triggerGroup){if(e.off("change.plugin_addIndicators",h),e.off("shift.plugin_addIndicators",f),n.triggerGroup.members.length>1){var r=n.triggerGroup;r.members.splice(r.members.indexOf(n),1),i._indicators.updateTriggerGroupLabel(r),i._indicators.updateTriggerGroupPositions(r),n.triggerGroup=void 0}else w();v(),u(3,"removed indicators")}};var f=function(){b()},h=function(e){"triggerHook"===e.what&&_()},m=function(){var e=i.info("vertical");d.css(g.firstChild,{"border-bottom-width":e?1:0,"border-right-width":e?0:1,bottom:e?-1:t.indent,right:e?t.indent:-1,padding:e?"0 8px":"2px 4px"}),d.css(p,{"border-top-width":e?1:0,"border-left-width":e?0:1,top:e?"100%":"",right:e?t.indent:"",bottom:e?"":t.indent,left:e?"":"100%",padding:e?"0 8px":"2px 4px"}),c.appendChild(s)},v=function(){s.parentNode.removeChild(s)},b=function(){s.parentNode!==c&&m();var r={};r[o?"top":"left"]=e.triggerPosition(),r[o?"height":"width"]=e.duration(),d.css(s,r),d.css(p,{display:e.duration()>
10?"":"none"})},G=function(){var r=l.trigger(t.colorTrigger),s={};s[o?"right":"bottom"]=0,s[o?"border-top-width":"border-left-width"]=1,d.css(r.firstChild,s),d.css(r.firstChild.firstChild,{padding:o?"0 8px 3px 8px":"3px 4px"}),document.body.appendChild(r);var a={triggerHook:e.triggerHook(),element:r,members:[n]};i._indicators.groups.push(a),n.triggerGroup=a,i._indicators.updateTriggerGroupLabel(a),i._indicators.updateTriggerGroupPositions(a)},w=function(){i._indicators.groups.splice(i._indicators.groups.indexOf(n.triggerGroup),1),n.triggerGroup.element.parentNode.removeChild(n.triggerGroup.element),n.triggerGroup=void 0},_=function(){var r=e.triggerHook(),t=1e-4;if(!(n.triggerGroup&&Math.abs(n.triggerGroup.triggerHook-r)<t)){for(var o,s=i._indicators.groups,d=s.length;d--;)if(o=s[d],Math.abs(o.triggerHook-r)<t)return n.triggerGroup&&(1===n.triggerGroup.members.length?w():(n.triggerGroup.members.splice(n.triggerGroup.members.indexOf(n),1),i._indicators.updateTriggerGroupLabel(n.triggerGroup),i._indicators.updateTriggerGroupPositions(n.triggerGroup))),o.members.push(n),n.triggerGroup=o,void i._indicators.updateTriggerGroupLabel(o);if(n.triggerGroup){if(1===n.triggerGroup.members.length)return n.triggerGroup.triggerHook=r,void i._indicators.updateTriggerGroupPositions(n.triggerGroup);n.triggerGroup.members.splice(n.triggerGroup.members.indexOf(n),1),i._indicators.updateTriggerGroupLabel(n.triggerGroup),i._indicators.updateTriggerGroupPositions(n.triggerGroup),n.triggerGroup=void 0}G()}}},l={start:function(e){var r=document.createElement("div");r.textContent="start",d.css(r,{position:"absolute",overflow:"visible","border-width":0,"border-style":"solid",color:e,"border-color":e});var t=document.createElement("div");return d.css(t,{position:"absolute",overflow:"visible",width:0,height:0}),t.appendChild(r),t},end:function(e){var r=document.createElement("div");return r.textContent="end",d.css(r,{position:"absolute",overflow:"visible","border-width":0,"border-style":"solid",color:e,"border-color":e}),r},bounds:function(){var e=document.createElement("div");return d.css(e,{position:"absolute",overflow:"visible","white-space":"nowrap","pointer-events":"none","font-size":i}),e.style.zIndex=n,e},trigger:function(e){var r=document.createElement("div");r.textContent="trigger",d.css(r,{position:"relative"});var t=document.createElement("div");d.css(t,{position:"absolute",overflow:"visible","border-width":0,"border-style":"solid",color:e,"border-color":e}),t.appendChild(r);var o=document.createElement("div");return d.css(o,{position:"fixed",overflow:"visible","white-space":"nowrap","pointer-events":"none","font-size":i}),o.style.zIndex=n,o.appendChild(t),o}}}(e()));//# sourceMappingURL=hr-chunk-debug.addIndicators-CvlHjQ-2.js.map

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.