PageSourceSearch

https://basicattentiontoken.org/static-assets/js/accordion.min.js

js basicattentiontoken.org collected 2026-09-24 17:54:08 UTC 3,206 bytes, 1 lines download raw bytes

1"use strict";function _typeof(e){return"@babel/helpers - typeof",_typeof="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},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n,s=e[Symbol.toPrimitive];if(void 0!==s){if(n=s.call(e,t||"default"),"object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Accordion=function(){function e(t){var n=this;_classCallCheck(this,e),this.el=t,this.summary=t.querySelector("[data-accordion-heading]"),this.content=t.querySelector("[data-accordion-content]"),this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.summary.addEventListener("click",function(e){return n.onClick(e)})}return _createClass(e,[{key:"onClick",value:function(t){t.preventDefault(),this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.open():(this.isExpanding||this.el.open)&&this.shrink()}},{key:"animateElement",value:function(t,n,s){var o=this;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:100,easing:"ease-out"}),this.animation.onfinish=s,this.animation.oncancel=function(){o.isClosing=!1,o.isExpanding=!1}}},{key:"shrink",value:function(){var t=this;this.isClosing=!0,this.animateElement("".concat(this.el.offsetHeight,"px"),"".concat(this.summary.offsetHeight,"px"),function(){return t.onAnimationFinish(!1)})}},{key:"open",value:function(){var t=this;this.el.style.height="".concat(this.el.offsetHeight,"px"),this.el.open=!0,window.requestAnimationFrame(function(){return t.expand()})}},{key:"expand",value:function(){var t,n=this;this.isExpanding=!0,t="".concat(this.summary.offsetHeight+this.content.offsetHeight,"px"),this.animateElement("".concat(this.el.offsetHeight,"px"),t,function(){return n.onAnimationFinish(!0)})}},{key:"onAnimationFinish",value:function(t){this.el.open=t,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow=""}}])}();document.addEventListener("DOMContentLoaded",function(){var t,n,e=location.hash;e&&!/fn:/.test(e)&&(t=document.querySelector(e),t&&(t.open=!0)),n=document.querySelectorAll("[data-accordion-heading]"),n.forEach(function(e){e.addEventListener("click",function(e){var t,n=(t=e.target.closest("details"))===null||t===void 0?void 0:t.id;n&&(history.pushState?history.pushState(null,null,"#".concat(n)):location.hash="#".concat(n))})}),document.querySelectorAll("details").forEach(function(e){return new Accordion(e)})})

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.