{"version":3,"sources":["common-theme.js","arrow/Arrow.js","form/Form.js","header/Header.js","preloader/Preloader.js","utilities/MobileBarHeight.js","utilities/math.js","utilities/runOnHighPerformanceGPU.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"components.js","sourcesContent":["/**\n * Global Vars\n */\nwindow.$document = $(document);\nwindow.$window = $(window);\nwindow.$body = $('body');\nwindow.$html = $('html');\nwindow.$spinner = $('#js-spinner');\nwindow.$barbaWrapper = $('[data-barba=\"wrapper\"]');\nwindow.$pageHeader = $('#page-header');\nwindow.$pageWrapper = $('#page-wrapper');\nwindow.$pageContent = $('.page-wrapper__content');\nwindow.$pagePreloader = $('#js-preloader');\nwindow.PagePreloader = new Preloader({\n\tscope: window.$document,\n\ttarget: window.$pagePreloader,\n\tcurtain: {\n\t\telement: $('#js-page-transition-curtain'),\n\t\tbackground: $('.section-masthead').attr('data-background-color')\n\t},\n\tcounter: {\n\t\teasing: 'power4.out',\n\t\tduration: 25,\n\t\tstart: 0,\n\t\ttarget: 100,\n\t\tprefix: '',\n\t\tsuffix: ''\n\t}\n});\n\n/**\n * Begin Page Load\n */\nwindow.PagePreloader.start();\n\n/**\n * Default Theme Options\n * Used to prevent errors if there is\n * no data provided from backend\n */\nif (typeof window.theme === 'undefined') {\n\twindow.theme = {\n\t\tajax: {\n\t\t\tenabled: true,\n\t\t\tpreventRules: '', // jQuery selectors of the elements to exclude them from AJAX transitions\n\t\t\tevalInlineContainerScripts: false,\n\t\t\tloadMissingScripts: true,\n\t\t\tloadMissingStyles: true\n\t\t},\n\t\tanimations: {\n\t\t\ttriggerHook: 0.85, // more info https://scrollmagic.io/docs/ScrollMagic.Scene.html#triggerHook\n\t\t\ttimeScale: {\n\t\t\t\tonScrollReveal: 1, // on-scroll animations global speed\n\t\t\t\toverlayMenuOpen: 1, // fullscreen menu open speed\n\t\t\t\toverlayMenuClose: 1, // fullscreen menu close speed\n\t\t\t\tpreloader: 0.9,\n\t\t\t\tajaxFlyingImageTransition: 1,\n\t\t\t\tajaxCurtainTransition: 1\n\t\t\t}\n\t\t},\n\t\tcursorFollower: {\n\t\t\tenabled: true,\n\t\t\tlabels: {\n\t\t\t\tslider: 'Drag'\n\t\t\t},\n\t\t\tfactorTrailing: 6,\n\t\t\tanimationDuration: 0.25,\n\t\t\telements: {\n\t\t\t\tsocialItems: true,\n\t\t\t\tblogPagination: true\n\t\t\t},\n\t\t},\n\t\tsmoothScroll: { // more info https://github.com/idiotWu/smooth-scrollbar/tree/develop/docs\n\t\t\tenabled: true,\n\t\t\tdamping: 0.12,\n\t\t\trenderByPixels: true,\n\t\t\tcontinuousScrolling: false,\n\t\t\tplugins: {\n\t\t\t\tedgeEasing: true\n\t\t\t},\n\t\t},\n\t\tcontactForm7: {\n\t\t\tcustomModals: true\n\t\t},\n\t\tcustomJSInit: '',\n\t\tupdateHeadNodes: '',\n\t\tmobileBarFix: {\n\t\t\tenabled: true,\n\t\t\tupdate: true\n\t\t},\n\t\telementor: {\n\t\t\tisEditor: false\n\t\t},\n\t\thighPerformance: true,\n\t\tasync: {\n\t\t\tenabled: true,\n\t\t\tassets: [],\n\t\t\tpromises: []\n\t\t}\n\t}\n}\n\n/**\n * ScrollMagic Setup\n */\n// window.SMController = new ScrollMagic.Controller();\n// window.SMController.enabled(false); // don't start animations yet\nwindow.SMSceneTriggerHook = window.theme.animations.triggerHook;\nwindow.SMSceneReverse = false;\n\n/**\n * Don't save scroll position\n * after AJAX transition\n */\nif ('scrollRestoration' in history) {\n\thistory.scrollRestoration = 'manual';\n}\n\n\n/**\n * Page Load Strategy\n */\ndocument.addEventListener('DOMContentLoaded', (e) => {\n\n\t// init on AJAX transition\n\tif (e.detail) {\n\n\t\tinitComponents(e.detail);\n\n\t} else { // init on initial page load\n\n\t\tinitComponents({\n\t\t\tscope: window.$document,\n\t\t\tscrollToHashElement: false\n\t\t});\n\n\t\tinitComponentsOnce({\n\t\t\tscope: window.$document\n\t\t});\n\n\t}\n\n});\n\n/**\n * Init Template Components\n * You can init your custom scripts here\n * in that function\n */\nfunction initComponents({\n\tscope = window.$document,\n\tcontainer = window.$pageWrapper,\n\tscrollToHashElement = true\n}) {\n\n\tconst\n\t\t$arrow = scope.find('.js-arrow'),\n\t\t$smoothScrollContainer = container.filter('.js-smooth-scroll'),\n\t\t$sectionBlog = scope.find('.section-blog.section-grid'),\n\t\t$section404 = scope.find('.section-404'),\n\t\t$scrollDown = scope.find('[data-arts-scroll-down]'),\n\t\t$changeTextHover = scope.find('.js-change-text-hover:not(.js-change-text-hover .js-change-text-hover)'), // exclude nested elements\n\t\t$sectionMasthead = scope.find('.section-masthead:not(.d-none):not(.js-cancel-init)'),\n\t\t$sectionNavPortfolioPrevNext = scope.find('#page-bottom-nav.section-list');\t\n\n\tif ($smoothScrollContainer.length) {\n\t\twindow.rhye.components.AssetsManager\n\t\t\t.load(window.theme.assets['smooth-scrolling-js'])\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.SmoothScroll({\n\t\t\t\t\ttarget: $smoothScrollContainer,\n\t\t\t\t\tadminBar: $('#wpadminbar'),\n\t\t\t\t\tabsoluteElements: $('[data-arts-scroll-absolute]'), // correct handling of absolute elements OUTSIDE scrolling container\n\t\t\t\t\tfixedElements: $('[data-arts-scroll-fixed]') // correct handling of fixed elements INSIDE scrolling container\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tif ($sectionMasthead.length) {\n\t\twindow.rhye.components.AssetsManager.load(window.theme.assets['section-masthead-js'])\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.SectionMasthead({\n\t\t\t\t\ttarget: $sectionMasthead,\n\t\t\t\t\tscope\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tif ($scrollDown.length) {\n\t\twindow.rhye.components.AssetsManager\n\t\t\t.loadScrollDown()\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.ScrollDown({\n\t\t\t\t\ttarget: scope.find('[data-arts-scroll-down]'),\n\t\t\t\t\tscope,\n\t\t\t\t\tduration: 0.8\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tif ($arrow.length) {\n\t\tnew window.rhye.components.Arrow({\n\t\t\ttarget: $arrow\n\t\t});\n\t}\n\n\tif ($changeTextHover.length) {\n\t\twindow.rhye.components.AssetsManager\n\t\t\t.loadChangeTextHover()\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.ChangeTextHover({\n\t\t\t\t\ttarget: $changeTextHover,\n\t\t\t\t\tscope,\n\t\t\t\t\tpageIndicator: scope.find('.js-page-indicator'), // fixed page indicator\n\t\t\t\t\ttriggers: scope.find('.js-page-indicator-trigger'), // elements that triggers the change of page indicator\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tif ($sectionBlog.length) {\n\t\tif (typeof window.plugin === 'undefined') {\n\t\t\t$sectionBlog.attr('data-arts-os-animation', 'animated');\n\t\t} else {\n\t\t\twindow.rhye.components.AssetsManager\n\t\t\t.loadMasonryGrid()\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.SectionGrid({\n\t\t\t\t\ttarget: $sectionBlog,\n\t\t\t\t\tscope\n\t\t\t\t});\n\n\t\t\t\tnew window.rhye.components.SectionContent({\n\t\t\t\t\ttarget: $sectionBlog,\n\t\t\t\t\tscope\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\tif ($section404.length) {\n\t\tif (typeof window.plugin === 'undefined') {\n\t\t\t$section404.attr('data-arts-os-animation', 'animated');\n\t\t} else {\n\t\t\twindow.rhye.components.AssetsManager\n\t\t\t.loadSectionContent()\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.SectionContent({\n\t\t\t\t\ttarget: $section404,\n\t\t\t\t\tscope\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\tif ($sectionNavPortfolioPrevNext.length) {\n\t\twindow.rhye.components.AssetsManager\n\t\t\t.loadSectionList()\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.SectionList({\n\t\t\t\t\ttarget: $sectionNavPortfolioPrevNext,\n\t\t\t\t\tscope\n\t\t\t\t});\n\t\t});\n\t}\n\n\t// mobile bottom bar height fix\n\tif (window.theme.mobileBarFix.enabled) {\n\t\tnew MobileBarHeight();\n\t}\n\n\t// floating input fields\n\tnew Form({\n\t\ttarget: scope,\n\t\tscope\n\t});\n\n\t// refresh animation triggers\n\t// for Waypoints library\n\tif (typeof Waypoint !== 'undefined') {\n\t\tWaypoint.refreshAll();\n\t}\n\n\t// custom JS code\n\tif (window.theme.customJSInit) {\n\t\ttry {\n\t\t\twindow.eval(window.theme.customJSInit);\n\t\t} catch (error) {\n\t\t\tconsole.warn(error);\n\t\t}\n\t}\n\n\t// scroll to anchor from URL hash\n\tif ( scrollToHashElement ) {\n\t\twindow.rhye.components.Scroll.scrollToAnchorFromHash();\n\t}\n\n}\n\n/**\n * Init Template Components\n * only once after the initial\n * page load\n */\nfunction initComponentsOnce({\n\tscope = window.$document,\n\tcontainer = window.$pageWrapper,\n\tscrollToHashElement = true\n}) {\n\n\tconst $sectionNavProjects = container.find('.section-nav-projects');\n\n\t// Init page header\n\tif (window.$pageHeader.length) {\n\t\twindow.theme.Header = new Header({\n\t\t\ttarget: window.$pageHeader,\n\t\t\tscope\n\t\t});\n\t}\n\n\t// Init cursor only on non-touch browsers\n\tif (window.theme.cursorFollower.enabled && !window.Modernizr.touchevents) {\n\t\tlet highlightElements;\n\t\tlet exclusionString = '';\n\n\t\tif (window.theme.cursorFollower.elements.socialItems) {\n\t\t\texclusionString += ':not(.social__item a)';\n\t\t}\n\n\t\tif (window.theme.cursorFollower.elements.blogPagination) {\n\t\t\texclusionString += ':not(a.page-numbers)';\n\t\t}\n\n\t\thighlightElements = `a:not(a[data-arts-cursor])${exclusionString}:not(.section-video__link):not(.no-highlight), button:not(button[data-arts-cursor]), .filter__item, .section-nav-projects__header`;\n\n\t\tif (!window.theme.cursorFollower.elements.sliderDots) {\n\t\t\thighlightElements += ' ,.slider__dot';\n\t\t}\n\n\t\tif (!window.theme.cursorFollower.elements.circleArrows) {\n\t\t\thighlightElements += ' ,.js-arrow';\n\t\t}\n\n\t\tPromise\n\t\t\t.all([\n\t\t\t\twindow.rhye.components.AssetsManager.load(window.theme.assets['cursor-js']),\n\t\t\t\twindow.rhye.components.AssetsManager.load(window.theme.assets['cursor-css'])\n\t\t\t])\n\t\t\t.then(() => window.PagePreloader.finish())\n\t\t\t.then(() => {\n\t\t\t\twindow.rhye.components.Scroll.scrollToTop();\n\n\t\t\t\tnew window.rhye.components.Cursor({\n\t\t\t\t\tscope: window.$document,\n\t\t\t\t\ttarget: $('#js-cursor'),\n\t\t\t\t\tcursorElements: '[data-arts-cursor]',\n\t\t\t\t\thighlightElements, // links to highlight\n\t\t\t\t\thighlightScale: 1.5, // default highlight scaling\n\t\t\t\t\tmagneticElements: '[data-arts-cursor-magnetic]', // magnetic elements\n\t\t\t\t\tmagneticScaleCursorBy: 1.3, // default magnetic scaling\n\t\t\t\t\tfactorTrailing: window.theme.cursorFollower.factorTrailing,\n\t\t\t\t\tanimDuration: window.theme.cursorFollower.animationDuration,\n\t\t\t\t});\n\n\t\t\t\t// begin animations\n\t\t\t\twindow.rhye.functions.enableAnimations();\n\t\t\t\t// scroll to anchor from URL hash\n\t\t\t\tif (scrollToHashElement) {\n\t\t\t\t\twindow.rhye.components.Scroll.scrollToAnchorFromHash();\n\t\t\t\t}\n\t\t});\n\t} else {\n\t\twindow.PagePreloader.finish().then(() => {\n\t\t\t// scroll to anchor from URL hash\n\t\t\tif ( scrollToHashElement ) {\n\t\t\t\twindow.rhye.components.Scroll.scrollToAnchorFromHash();\n\t\t\t}\n\n\t\t\t// Begin animations\n\t\t\twindow.rhye.functions.enableAnimations();\n\t\t});\n\t}\n\n\t// init AJAX navigation\n\tif (window.theme.ajax.enabled && window.$barbaWrapper.length) {\n\t\twindow.rhye.components.AssetsManager\n\t\t\t.loadPJAX()\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.PJAX({\n\t\t\t\t\ttarget: window.$barbaWrapper,\n\t\t\t\t\tscope: window.$document\n\t\t\t\t});\n\t\t});\n\t}\n\n\t// Init auto scroll navigation\n\tif ($sectionNavProjects.length) {\n\t\twindow.rhye.components.AssetsManager\n\t\t\t.loadSectionNavProjects()\n\t\t\t.then(() => {\n\t\t\t\tnew window.rhye.components.SectionNavProjects({\n\t\t\t\t\ttarget: $sectionNavProjects,\n\t\t\t\t\tscope\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\t// Try to use high performance GPU on dual-GPU systems\n\trunOnHighPerformanceGPU();\n}\n","/* ======================================================================== */\n/* 1. Arrow */\n/* ======================================================================== */\nwindow.rhye.components.Arrow = class Arrow extends window.rhye.components.Base {\n\n\tconstructor({\n\t\tscope,\n\t\ttarget\n\t}) {\n\t\tsuper({\n\t\t\ttarget,\n\t\t\tscope\n\t\t});\n\n\t}\n\n\trun($el) {\n\t\tthis._bindEvents($el);\n\t}\n\n\tset($el) {\n\t\tthis.$circles = $el.find('.circle');\n\t\tthis.initialSVGPath = '10% 90%';\n\n\t\tgsap.set(this.$circles, {\n\t\t\tclearProps: 'all',\n\t\t});\n\n\t\tgsap.set(this.$circles, {\n\t\t\trotation: 180,\n\t\t\tdrawSVG: this.initialSVGPath,\n\t\t\ttransformOrigin: 'center center',\n\t\t});\n\t}\n\n\t_bindEvents($el) {\n\t\tconst\n\t\t\t$circle = $el.find(this.$circles),\n\t\t\ttl = new gsap.timeline();\n\n\t\t$el\n\t\t\t.on('mouseenter touchstart', () => {\n\t\t\t\ttl\n\t\t\t\t\t.clear()\n\t\t\t\t\t.to($circle, {\n\t\t\t\t\t\tduration: 0.3,\n\t\t\t\t\t\tdrawSVG: '0% 100%',\n\t\t\t\t\t\trotation: 180,\n\t\t\t\t\t\ttransformOrigin: 'center center'\n\t\t\t\t\t});\n\t\t\t})\n\t\t\t.on('mouseleave touchend', () => {\n\t\t\t\ttl\n\t\t\t\t\t.clear()\n\t\t\t\t\t.to($circle, {\n\t\t\t\t\t\tduration: 0.3,\n\t\t\t\t\t\tdrawSVG: this.initialSVGPath,\n\t\t\t\t\t\trotation: 180,\n\t\t\t\t\t\ttransformOrigin: 'center center'\n\t\t\t\t\t});\n\t\t\t});\n\n\t}\n\n}\n","/* ======================================================================== */\n/* 2. Form */\n/* ======================================================================== */\nclass Form {\n\tconstructor({\n\t\tscope,\n\t\ttarget\n\t}) {\n\t\tthis.$scope = scope;\n\t\tthis.$target = target;\n\n\t\tif (this.$scope.length) {\n\t\t\tthis.set();\n\t\t\tthis.run();\n\t\t}\n\t}\n\n\tset() {\n\t\tthis.input = '.input-float__input';\n\t\tthis.inputClassNotEmpty = 'input-float__input_not-empty';\n\t\tthis.inputClassFocused = 'input-float__input_focused';\n\t\tthis.$inputs = this.$scope.find(this.input);\n\t}\n\n\trun() {\n\t\tthis._floatLabels();\n\t\tthis._bindEvents();\n\n\t\tif (typeof window.theme !== 'undefined' && window.theme.contactForm7.customModals) {\n\t\t\tif ($('.wpcf7-form').length) {\n\t\t\t\twindow.rhye.components.AssetsManager.loadBootstrapModal().then(() => this._attachModalsEvents());\n\t\t\t}\n\t\t}\n\t}\n\n\t_floatLabels() {\n\t\tconst self = this;\n\n\t\tif (!this.$inputs || !this.$inputs.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.$inputs.each(function () {\n\t\t\tconst\n\t\t\t\t$el = $(this),\n\t\t\t\t$controlWrap = $el.parent('.wpcf7-form-control-wrap');\n\n\t\t\t// not empty value\n\t\t\tif ($el.val()) {\n\t\t\t\t$el.addClass(self.inputClassNotEmpty);\n\t\t\t\t$controlWrap.addClass(self.inputClassNotEmpty);\n\t\t\t\t// empty value\n\t\t\t} else {\n\t\t\t\t$el.removeClass([self.inputClassFocused, self.inputClassNotEmpty]);\n\t\t\t\t$controlWrap.removeClass([self.inputClassFocused, self.inputClassNotEmpty]);\n\t\t\t}\n\n\t\t\t// has placeholder & empty value\n\t\t\tif ($el.attr('placeholder') && !$el.val()) {\n\t\t\t\t$el.addClass(self.inputClassNotEmpty);\n\t\t\t\t$controlWrap.addClass(self.inputClassNotEmpty);\n\t\t\t}\n\t\t});\n\n\t}\n\n\t_bindEvents() {\n\t\tconst self = this;\n\n\t\tthis.$scope\n\t\t\t.off('focusin')\n\t\t\t.on('focusin', self.input, function () {\n\t\t\t\tconst\n\t\t\t\t\t$el = $(this),\n\t\t\t\t\t$controlWrap = $el.parent('.wpcf7-form-control-wrap');\n\n\t\t\t\t$el.addClass(self.inputClassFocused).removeClass(self.inputClassNotEmpty);\n\t\t\t\t$controlWrap.addClass(self.inputClassFocused).removeClass(self.inputClassNotEmpty);\n\n\t\t\t})\n\t\t\t.off('focusout')\n\t\t\t.on('focusout', self.input, function () {\n\n\t\t\t\tconst\n\t\t\t\t\t$el = $(this),\n\t\t\t\t\t$controlWrap = $el.parent('.wpcf7-form-control-wrap');\n\n\t\t\t\t// not empty value\n\t\t\t\tif ($el.val()) {\n\t\t\t\t\t$el.removeClass(self.inputClassFocused).addClass(self.inputClassNotEmpty);\n\t\t\t\t\t$controlWrap.removeClass(self.inputClassFocused).addClass(self.inputClassNotEmpty);\n\t\t\t\t} else {\n\t\t\t\t\t// has placeholder & empty value\n\t\t\t\t\tif ($el.attr('placeholder')) {\n\t\t\t\t\t\t$el.addClass(self.inputClassNotEmpty);\n\t\t\t\t\t\t$controlWrap.addClass(self.inputClassNotEmpty);\n\t\t\t\t\t}\n\n\t\t\t\t\t$el.removeClass(self.inputClassFocused);\n\t\t\t\t\t$controlWrap.removeClass(self.inputClassFocused);\n\t\t\t\t}\n\n\t\t\t});\n\n\t}\n\n\t_attachModalsEvents() {\n\t\twindow.$document.off('wpcf7submit').on('wpcf7submit', (e) => {\n\n\t\t\tconst $modal = $('#modalContactForm7');\n\t\t\tlet template;\n\n\t\t\t$modal.modal('dispose').remove();\n\n\t\t\tif (e.detail.apiResponse.status === 'mail_sent') {\n\n\t\t\t\ttemplate = this._getModalTemplate({\n\t\t\t\t\ticon: 'icon-success.svg',\n\t\t\t\t\tmessage: e.detail.apiResponse.message,\n\t\t\t\t});\n\n\t\t\t\tthis._createModal({\n\t\t\t\t\ttemplate,\n\t\t\t\t\tonDismiss: () => {\n\t\t\t\t\t\t$(e.srcElement).find(this.input).parent().val('').removeClass(this.inputClassFocused).removeClass(this.inputClassNotEmpty);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (e.detail.apiResponse.status === 'mail_failed') {\n\t\t\t\ttemplate = this._getModalTemplate({\n\t\t\t\t\ticon: 'icon-error.svg',\n\t\t\t\t\tmessage: e.detail.apiResponse.message\n\t\t\t\t});\n\n\t\t\t\tthis._createModal({ template });\n\t\t\t}\n\n\t\t});\n\t}\n\n\t_getModalTemplate({\n\t\ticon,\n\t\tmessage\n\t}) {\n\t\treturn `\n
\n
\n
\n
\n
\n\t\t\t\t\t\t\t\t\"\"/\n

${message}

\n
\n \n
\n
\n
\n `;\n\t}\n\n\t_createModal({\n\t\ttemplate,\n\t\tonDismiss\n\t}) {\n\n\t\tif (!template) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet $modal;\n\t\twindow.$body.append(template);\n\t\t$modal = $('#modalContactForm');\n\n\t\t$modal.modal('show');\n\t\t$modal.on('hidden.bs.modal', () => {\n\t\t\tif (typeof onDismiss === 'function') {\n\t\t\t\tonDismiss();\n\t\t\t}\n\t\t\t$modal.modal('dispose').remove();\n\t\t});\n\t}\n\n}\n","/* ======================================================================== */\n/* 3. Header */\n/* ======================================================================== */\nclass Header extends window.rhye.components.Base {\n constructor({\n scope,\n target\n }) {\n\t\tsuper({\n\t\t\ttarget,\n\t\t\tscope\n\t\t});\n }\n\n mount($el) {\n return new Promise((resolve) => {\n\t\t// prepare all the texts\n document.fonts.ready\n .then(() => window.rhye.components.SetText.splitText({\n target: $el.find('.js-split-text, .header__widget.split-text > *')\n }))\n .then(() => window.rhye.components.SetText.setLines({\n target: $el.find('.split-text[data-split-text-set=\"lines\"]')\n }))\n .then(() => window.rhye.components.SetText.setWords({\n target: $el.find('.split-text[data-split-text-set=\"words\"]')\n }))\n .then(() => window.rhye.components.SetText.setChars({\n target: $el.find('.split-text[data-split-text-set=\"chars\"]')\n }))\n .then(() => resolve(true));\n });\n }\n\n run() {\n this.overlayBackground = this.$el.attr('data-arts-header-overlay-background');\n this.stickyTheme = this.$stickyHeader.attr('data-arts-header-sticky-theme');\n\n if (typeof this.stickyScene !== 'undefined') {\n this.stickyScene.kill(true);\n }\n\n this.timeline = new gsap.timeline();\n\n this._correctTopOffset();\n this._stick();\n this._bindEvents();\n this._handleAnchors();\n this._runSmoothScrollOverlayMenu();\n }\n\n set() {\n this.$controls = this.$el.find('.header__controls');\n this.$stickyHeader = this.$el.filter('.js-header-sticky');\n this.$adminBar = $('#wpadminbar');\n this.$burger = $('#js-burger');\n this.$curtain = $('#js-header-curtain');\n this.$curtainTransition = $('#js-header-curtain-transition');\n this.$overlay = $('.header__wrapper-overlay-menu');\n this.burgerOpenClass = 'header__burger_opened';\n this.$headerColumns = this.$el.find('.header__col');\n this.$headerLeft = this.$el.find('.header__col-left');\n this.$overlayWidgets = this.$el.find('.header__wrapper-overlay-widgets');\n this.$allLinksOverlay = this.$el.find('.menu-overlay a');\n this.$allLinksClassic = this.$el.find('.menu a');\n this.$divider = this.$el.find('.header__wrapper-overlay-widgets__border');\n\n // Menu\n this.$menuOverlay = this.$overlay.find('.js-menu-overlay');\n this.$menuLinks = this.$overlay.find('.menu-overlay > li > a');\n this.selectedClass = 'selected';\n this.openClass = 'opened';\n\n // Submenu\n this.$submenu = this.$overlay.find('.menu-overlay .sub-menu');\n this.$submenuButton = $('#js-submenu-back');\n this.$submenuOpeners = this.$overlay.find('.menu-item-has-children > a');\n this.$submenuLinks = this.$submenu.find('> li > a');\n\n // Sticky\n this.stickyScene = undefined;\n this.stickyClass = 'header_sticky';\n\n // Scrollbar\n this.SB = undefined;\n\n gsap.fromTo(this.$headerColumns, {\n immediateRender: true,\n autoAlpha: 0,\n },\n {\n delay: window.$pagePreloader.length ? 2.4 : 0,\n autoAlpha: 1,\n stagger: 0.2,\n duration: 0.6\n });\n\n this.setMenu();\n }\n\n setBurger(open = false) {\n if (open) {\n this.$el.addClass(this.openClass);\n this.$burger.addClass(this.burgerOpenClass);\n } else {\n this.$el.removeClass(this.openClass);\n this.$burger.removeClass(this.burgerOpenClass);\n }\n }\n\n setMenu() {\n\n if (this.$overlay.length) {\n gsap.set(this.$overlay, {\n autoAlpha: 0,\n display: 'none'\n });\n }\n\n if (this.$submenu.length) {\n gsap.set(this.$submenu, {\n autoAlpha: 0\n });\n }\n\n if (this.$submenuButton.length) {\n gsap.set(this.$submenuButton, {\n autoAlpha: 0\n });\n }\n\n if (this.$divider.length) {\n gsap.set(this.$divider, {\n scaleX: 0\n });\n }\n\n this.$submenu.removeClass(this.openClass);\n this.$el.removeClass(this.openClass);\n this.$burger.removeClass(this.burgerOpenClass);\n\n if (this.$menuLinks.length) {\n gsap.effects.hideLines(this.$menuLinks, {\n autoAlpha: 1,\n y: '-100%',\n duration: 0,\n });\n }\n\n if (this.$submenuLinks.length) {\n gsap.effects.hideLines(this.$submenuLinks, {\n autoAlpha: 1,\n y: '-100%',\n duration: 0,\n });\n }\n\n if (this.$overlayWidgets.length) {\n gsap.effects.hideLines(this.$overlayWidgets, {\n autoAlpha: 1,\n y: this._isMediumScreen() ? '-100%' : '100%',\n duration: 0\n });\n }\n\n if (this.$curtain.length) {\n gsap.set(this.$curtain, {\n display: 'none',\n autoAlpha: 0\n });\n }\n\n if (typeof this.SB !== 'undefined') {\n this.SB.scrollTop = 0;\n }\n }\n\n openMenu() {\n return this.timeline\n .clear()\n .set(this.$curtain, {\n display: 'block',\n })\n .setCurtain(this.$curtain, {\n background: this.overlayBackground,\n y: '100%'\n })\n .set(this.$overlay, {\n autoAlpha: 1,\n display: 'flex'\n })\n .add([() => {\n this._setTransition(true);\n this._unstick();\n }])\n .set(this.$adminBar, {\n position: 'fixed',\n })\n .to(this.$headerLeft, {\n duration: 1.2,\n x: 30,\n autoAlpha: 0,\n ease: 'expo.inOut'\n }, 'start')\n .moveCurtain(this.$curtain, {\n duration: 1.2,\n y: '0%',\n }, 'start')\n .add(() => {\n this.$el.addClass(this.openClass);\n }, '-=0.6')\n .add([\n gsap.effects.animateLines(this.$menuLinks, {\n stagger: {\n amount: 0.2,\n from: 'end'\n },\n duration: 1.2,\n ease: 'power4.out'\n }),\n gsap.effects.animateLines(this.$overlayWidgets, {\n stagger: {\n amount: 0.2,\n from: this._isMediumScreen() ? 'end' : 'start'\n },\n duration: 1.2,\n ease: 'power4.out'\n }),\n gsap.to(this.$divider, {\n scaleX: 1,\n transformOrigin: 'center center',\n duration: 1.2,\n ease: 'expo.inOut'\n })\n ], '-=0.6')\n .add(() => {\n this._setTransition(false);\n }, '-=0.6')\n .timeScale(window.theme.animations.timeScale.overlayMenuOpen || 1);\n }\n\n closeMenu(force = false, cb) {\n\n if (!this.$el.hasClass(this.openClass) && !force) {\n return this.timeline;\n }\n\n const\n $submenuLinksCurrent = this.$submenu.filter(`.${this.openClass}`).find(this.$submenuLinks);\n\n return this.timeline\n .clear()\n .add(() => {\n this._setTransition(true);\n this._stick();\n\n if (typeof window.SB !== 'undefined' && window.SB.offset.y >= 1) {\n this.$stickyHeader.addClass(this.stickyClass);\n }\n })\n .set(this.$adminBar, {\n clearProps: 'position'\n })\n .to(this.$headerLeft, {\n duration: 1.2,\n x: 0,\n autoAlpha: 1,\n ease: 'expo.inOut'\n }, 'start')\n .to(this.$submenuButton, {\n x: -10,\n autoAlpha: 0,\n duration: 0.3,\n ease: 'expo.inOut'\n }, 'start')\n .moveCurtain(this.$curtain, {\n duration: 1.2,\n y: '-100%',\n curve: 'bottom'\n }, 'start')\n .add(() => {\n this.$el.removeClass(this.openClass);\n }, '-=0.9')\n .add([\n gsap.effects.hideLines([$submenuLinksCurrent, this.$menuLinks, this.$overlayWidgets], {\n stagger: {\n amount: 0,\n from: 'end'\n },\n y: '100%',\n duration: 0.6,\n }),\n gsap.to(this.$divider, {\n scaleX: 0,\n transformOrigin: 'center center',\n duration: 0.6,\n ease: 'expo.inOut'\n })\n ], 'start')\n .add(() => {\n if (typeof cb === 'function') {\n cb();\n }\n this.$el.attr('data-arts-header-animation', '');\n }, '-=0.3')\n .add(() => {\n this.setMenu();\n })\n .timeScale(window.theme.animations.timeScale.overlayMenuClose || 1);\n }\n\n closeMenuTransition(force = false) {\n\n if (!this.$el.hasClass(this.openClass) && !force) {\n return this.timeline;\n }\n\n const\n $submenuLinksCurrent = this.$submenu.filter(`.${this.openClass}`).find(this.$submenuLinks);\n\n return this.timeline\n .clear()\n .add(() => {\n this._setTransition(true);\n // Scroll.restoreScrollTop();\n this._stick();\n\n if (typeof window.SB !== 'undefined' && window.SB.offset.y >= 1) {\n this.$stickyHeader.addClass(this.stickyClass);\n }\n })\n .to(this.$headerLeft, {\n duration: 1.2,\n x: 0,\n autoAlpha: 1,\n ease: 'expo.inOut',\n clearProps: 'transform'\n }, 'start')\n .to(this.$submenuButton, {\n x: -10,\n autoAlpha: 0,\n duration: 0.3,\n ease: 'expo.inOut'\n }, 'start')\n .add(() => {\n this.$el.removeClass(this.openClass);\n }, '-=0.9')\n .add([\n gsap.effects.hideLines([$submenuLinksCurrent, this.$menuLinks, this.$overlayWidgets], {\n stagger: {\n amount: 0,\n from: 'end'\n },\n y: '100%',\n duration: 0.6,\n }),\n gsap.to(this.$divider, {\n scaleX: 0,\n transformOrigin: 'center center',\n duration: 0.6,\n ease: 'expo.inOut'\n })\n ], 'start')\n .add(() => {\n this.$el.attr('data-arts-header-animation', '');\n }, '-=0.3')\n .add(() => {\n this.setMenu();\n });\n }\n\n _bindEvents() {\n const self = this;\n\n if (this.$adminBar.length && this.$stickyHeader.length) {\n window.$window.on('resize', window.rhye.functions.debounce(() => {\n this._correctTopOffset();\n }, 250));\n }\n\n if (this.$burger.length) {\n this.$burger.off('click').on('click', (e) => {\n e.preventDefault();\n\n if (this._isInTransition()) {\n return;\n }\n\n if (this.$burger.hasClass(this.burgerOpenClass)) {\n this.closeMenu();\n this.$burger.removeClass(this.burgerOpenClass);\n } else {\n this.openMenu();\n this.$burger.addClass(this.burgerOpenClass);\n }\n });\n }\n\n if (this.$submenuOpeners.length) {\n this.$submenuOpeners.on('click', function (e) {\n e.preventDefault();\n\n if (self._isInTransition()) {\n return;\n }\n\n const\n $el = $(this),\n $currentMenu = $el.parents('ul'),\n $submenu = $el.next('.sub-menu');\n\n $el.addClass(self.linkSelectedClass);\n\n self._openSubmenu({\n submenu: $submenu,\n currentMenu: $currentMenu\n });\n });\n }\n\n if (this.$submenuButton.length) {\n this.$submenuButton.on('click', (e) => {\n e.preventDefault();\n\n if (self._isInTransition()) {\n return;\n }\n\n const $submenu = this.$submenu.filter(`.${this.openClass}`),\n $prevMenu = $submenu.parent('li').parent('ul');\n\n self._closeSubmenu({\n submenu: $submenu,\n currentMenu: $prevMenu\n });\n });\n }\n\n window.$window\n .on('arts/barba/transition/start', () => {\n this.$controls.addClass('pointer-events-none');\n this._unstick();\n })\n .on('arts/barba/transition/end', () => {\n this.$controls.removeClass('pointer-events-none');\n });\n }\n\n isOverlayOpened() {\n return this.$el.hasClass(this.openClass);\n }\n\n _isMediumScreen() {\n return true; //window.Modernizr.mq('(max-width: 991px)');\n }\n\n _isInTransition() {\n return this.$el.attr('data-arts-header-animation') === 'intransition';\n }\n\n _setTransition(inTransition = true) {\n return this.$el.attr('data-arts-header-animation', inTransition ? 'intransition' : '');\n }\n\n _correctTopOffset() {\n this.$adminBar = $('#wpadminbar');\n const top = this.$adminBar.length ? this.$adminBar.height() : 0;\n\n if (this.$stickyHeader.length && top > 0) {\n gsap.to(this.$el, {\n duration: 0.6,\n top\n });\n }\n }\n\n _stick() {\n if (!this.$stickyHeader.length) {\n return;\n }\n\n this.stickyScene = ScrollTrigger.create({\n trigger: window.$pageContent,\n start: `top+=1px top`,\n scrub: true,\n once: false,\n onToggle: ({ isActive }) => {\n if (isActive) {\n this.$stickyHeader.addClass([this.stickyTheme, this.stickyClass].join(' '));\n } else {\n this.$stickyHeader.removeClass([this.stickyTheme, this.stickyClass].join(' '));\n }\n }\n });\n }\n\n _unstick() {\n if (!this.$stickyHeader.length || !this.stickyScene) {\n return;\n }\n\n this.stickyScene.kill(true);\n this.stickyScene = undefined;\n this.$stickyHeader.removeClass([this.stickyTheme, this.stickyClass].join(' '));\n }\n\n _openSubmenu({\n submenu,\n currentMenu\n }) {\n const\n $currentLinks = currentMenu.find('> li > a .menu-overlay__item-wrapper'),\n $submenuLinks = submenu.find('> li > a .menu-overlay__item-wrapper');\n\n this.timeline\n .clear()\n .add(() => {\n this._setTransition(true);\n this.$submenu.removeClass(this.openClass);\n submenu.not(this.$menuOverlay).addClass(this.openClass);\n\n if (this.$submenu.hasClass(this.openClass)) {\n gsap.to(this.$submenuButton, {\n autoAlpha: 1,\n x: 0,\n duration: 0.3\n });\n\n if (this._isMediumScreen()) {\n gsap.effects.hideLines(this.$overlayWidgets, {\n stagger: {\n amount: 0.1,\n from: 'end'\n },\n y: '100%',\n duration: 1.2,\n ease: 'power4.out',\n });\n gsap.to(this.$divider, {\n scaleX: 0,\n transformOrigin: 'center center',\n duration: 0.6,\n ease: 'expo.inOut'\n });\n }\n } else {\n gsap.to(this.$submenuButton, {\n autoAlpha: 0,\n x: -10,\n duration: 0.3\n });\n\n gsap.effects.animateLines(this.$overlayWidgets, {\n stagger: {\n amount: 0.2,\n from: 'end'\n },\n duration: 1.2,\n ease: 'power4.out',\n });\n }\n })\n .set(submenu, {\n autoAlpha: 1,\n zIndex: 100\n })\n .add(gsap.effects.hideLines($currentLinks, {\n stagger: {\n amount: 0.2,\n from: 'end'\n },\n y: '100%',\n duration: 1.2,\n ease: 'power4.out'\n }))\n .add(gsap.effects.animateLines($submenuLinks, {\n stagger: {\n amount: 0.2,\n from: 'end'\n },\n duration: 1.2,\n ease: 'power4.out'\n }), '-=1.0')\n .add(() => {\n this.$menuLinks.removeClass(this.openClass);\n this._setTransition(false);\n }, '-=0.6')\n .timeScale(1.25);\n }\n\n _closeSubmenu({\n submenu,\n currentMenu\n }) {\n const\n $currentLinks = currentMenu.find('> li > a .menu-overlay__item-wrapper'),\n $submenuLinks = submenu.find('> li > a .menu-overlay__item-wrapper');\n\n this.timeline\n .clear()\n .add(() => {\n this._setTransition(true);\n this.$submenu.removeClass(this.openClass);\n currentMenu.not(this.$menuOverlay).addClass(this.openClass);\n\n if (this.$submenu.hasClass(this.openClass)) {\n gsap.to(this.$submenuButton, {\n autoAlpha: 1,\n x: 0,\n duration: 0.3\n });\n\n if (this._isMediumScreen()) {\n gsap.effects.hideLines(this.$overlayWidgets, {\n stagger: {\n amount: 0.1,\n from: 'start'\n },\n y: '100%',\n duration: 1.2,\n ease: 'power4.out',\n });\n }\n } else {\n gsap.to(this.$submenuButton, {\n autoAlpha: 0,\n x: -10,\n duration: 0.3\n });\n\n gsap.effects.animateLines(this.$overlayWidgets, {\n stagger: {\n amount: 0.2,\n from: 'start'\n },\n duration: 1.2,\n ease: 'power4.out',\n });\n\n gsap.to(this.$divider, {\n scaleX: 1,\n transformOrigin: 'center center',\n duration: 1.2,\n ease: 'expo.inOut'\n });\n }\n })\n .set(submenu, {\n zIndex: -1\n })\n .add(gsap.effects.animateLines($currentLinks, {\n y: '100%',\n duration: 0\n }), 'start')\n .add(gsap.effects.hideLines($submenuLinks, {\n stagger: {\n amount: 0.1,\n from: 'start'\n },\n y: '-100%',\n duration: 1.2,\n ease: 'power4.out'\n }))\n .add(\n gsap.effects.animateLines($currentLinks, {\n stagger: {\n amount: 0.2,\n from: 'start'\n },\n duration: 1.2,\n ease: 'power4.out'\n }), '-=1.0')\n .set(submenu, {\n autoAlpha: 0,\n })\n .add(() => {\n this._setTransition(false);\n }, '-=0.6')\n .timeScale(1.25);\n }\n\n _handleAnchors() {\n\n const self = this;\n\n // overlay anchor links\n this.$allLinksOverlay.filter('a[href*=\"#\"]:not([href=\"#\"]):not([href*=\"#elementor-action\"])').each(function () {\n const\n $current = $(this),\n url = $current.attr('href');\n\n self._scrollToAnchorFromMenu({\n element: $current,\n url,\n menu: 'overlay'\n });\n });\n\n // regular menu anchor links\n this.$allLinksClassic.filter('a[href*=\"#\"]:not([href=\"#\"]):not([href*=\"#elementor-action\"])').each(function () {\n const\n $current = $(this),\n url = $current.attr('href');\n\n self._scrollToAnchorFromMenu({\n element: $current,\n url,\n menu: 'classic'\n });\n });\n\n }\n\n _scrollToAnchorFromMenu({\n element,\n url,\n menu = 'classic'\n }) {\n if (!url || !element) {\n return;\n }\n\n const filteredUrl = url.substring(url.indexOf('#'));\n\n try {\n if (filteredUrl.length) {\n const $el = window.$pageWrapper.find(filteredUrl);\n\n if ($el.length) {\n element.on('click', (e) => {\n e.stopPropagation();\n e.preventDefault();\n\n if (menu === 'classic') {\n window.rhye.components.Scroll.scrollTo({\n y: $el.offset().top - this.$el.innerHeight(),\n duration: 800\n });\n }\n\n if (menu === 'overlay') {\n this.closeMenu(false, () => {\n window.rhye.components.Scroll.scrollTo({\n y: $el.offset().top - this.$el.innerHeight(),\n duration: 800\n });\n });\n }\n });\n\n } else {\n element.off('click');\n }\n }\n } catch (error) {\n console.error('An error occured while handling menu anchor links: ' + error);\n }\n\n }\n\n _runSmoothScrollOverlayMenu() {\n if (!window.Modernizr.touchevents && this.$overlay.hasClass('js-smooth-scroll-container')) {\n window.rhye.components.AssetsManager\n .load(window.theme.assets['smooth-scrolling-js'])\n .then(() => {\n this.SB = window.Scrollbar.init(this.$overlay[0], window.theme.smoothScroll);\n });\n }\n }\n}\n","/* ======================================================================== */\n/* 4. Preloader */\n/* ======================================================================== */\nfunction Preloader({\n scope = window.$document,\n target = $('#js-preloader'),\n curtain = {\n element: $('#js-page-transition-curtain'),\n background: $('.section-masthead').attr('data-background-color')\n },\n cursor = {\n element: $('#js-cursor'),\n offset: {\n top: 0.0,\n left: 0.0\n }\n },\n counter = {\n easing: 'power4.out',\n duration: 25,\n start: 0,\n target: 100,\n prefix: '',\n suffix: ''\n }\n}) {\n\n const self = this;\n this.$scope = scope;\n this.$target = target;\n\n // Preloader\n this.$header = this.$target.find('.preloader__header');\n this.$content = this.$target.find('.preloader__content');\n this.$wrapperCounter = this.$target.find('.preloader__counter');\n this.$counter = this.$target.find('.preloader__counter-current');\n this.$wrapperCircle = this.$target.find('.preloader__circle');\n\n // Cursor\n this.cursor = cursor;\n\n if (this.cursor.element) {\n gsap.set(this.cursor.element, {\n autoAlpha: 1\n });\n }\n\n this.cursor.centerX = parseFloat(this.$wrapperCircle.innerWidth() / 2);\n this.cursor.centerY = parseFloat(this.$wrapperCircle.innerHeight() / 2);\n this.cursor.posX = 0;\n this.cursor.posY = 0;\n this.cursor.follower = {};\n this.cursor.follower.element = this.cursor.element.find('.cursor__follower');\n this.cursor.follower.inner = this.cursor.element.find('#inner');\n this.cursor.follower.outer = this.cursor.element.find('#outer');\n this.cursor.follower.size = {\n element: {\n width: this.cursor.follower.element.width(),\n height: this.cursor.follower.element.height()\n },\n inner: {\n cx: this.cursor.follower.inner.attr('cx'),\n cy: this.cursor.follower.inner.attr('cy'),\n r: this.cursor.follower.inner.attr('r')\n },\n outer: {\n cx: this.cursor.follower.outer.attr('cx'),\n cy: this.cursor.follower.outer.attr('cy'),\n r: this.cursor.follower.outer.attr('r')\n }\n }; // original circles dimensions\n\n // Mouse Coordinates\n this.mouseX = window.mouseX || window.innerWidth / 2;\n this.mouseY = window.mouseY || window.innerHeight / 2;\n\n // Curtain\n this.curtain = curtain;\n this.curtain.svg = this.curtain.element.find('.curtain-svg');\n this.curtain.rect = this.curtain.element.find('.curtain__rect');\n\n // Counter\n this.counter = counter;\n this.counter.val = 0;\n\n // Main Preloader Timeline\n this.timeline = new gsap.timeline({});\n\n // Animation Tweens\n this.tweens = {\n drawCircle: gsap.fromTo(this.cursor.follower.outer, {\n rotate: 90,\n drawSVG: '100% 100%',\n transformOrigin: 'center center',\n }, {\n drawSVG: '0% 100%',\n rotate: 0,\n transformOrigin: 'center center',\n ease: this.counter.easing,\n duration: this.counter.duration,\n paused: true,\n }),\n count: gsap.to(this.counter, {\n duration: this.counter.duration,\n val: this.counter.target,\n ease: this.counter.easing,\n paused: true,\n onUpdate: () => {\n const value = parseFloat(this.counter.val).toFixed(0);\n this.$counter.text(this.counter.prefix + value + this.counter.suffix);\n },\n }),\n followMouse: gsap.to({}, {\n paused: true,\n duration: 0.01,\n repeat: -1,\n onRepeat: () => {\n this.cursor.posX += (window.mouseX - this.cursor.posX);\n this.cursor.posY += (window.mouseY - this.cursor.posY - this.cursor.offset.top);\n gsap.to(this.cursor.element, {\n duration: 0.3,\n top: 0,\n left: 0,\n scale: (window.theme.cursorFollower.enabled && this.cursor.posX && this.cursor.posY) ? 1 : 0,\n autoAlpha: (this.cursor.posX && this.cursor.posY) ? 1 : 0,\n x: this.cursor.posX || window.innerWidth / 2,\n y: this.cursor.posY + this.cursor.offset.top || window.innerHeight / 2,\n });\n },\n })\n };\n\n _bindEvents();\n\n this.start = () => {\n window.dispatchEvent(new CustomEvent('arts/preloader/start'));\n\n if (!this.$target.length) {\n return;\n }\n\n window.$body.addClass('cursor-progress');\n\n if (this.cursor.element.length) {\n gsap.set(this.cursor.element, {\n display: 'block',\n top: '50%',\n left: '50%',\n });\n\n gsap.set(this.cursor.follower.element, {\n width: this.$wrapperCircle.innerWidth(),\n height: this.$wrapperCircle.innerHeight(),\n });\n\n gsap.set([this.cursor.follower.inner, this.cursor.follower.outer], {\n attr: {\n cx: this.cursor.centerX,\n cy: this.cursor.centerY,\n r: this.cursor.centerX - 1,\n }\n });\n }\n\n if (this.curtain.element.length) {\n gsap.set(this.curtain.svg, {\n fill: this.curtain.background\n });\n\n gsap.set(this.curtain.rect, {\n background: this.curtain.background\n });\n\n gsap.set(window.$pageContent, {\n autoAlpha: 0\n });\n }\n\n this.timeline.add([\n this.tweens.count.play(),\n this.tweens.drawCircle.play()\n ]);\n\n }\n\n this.finish = () => {\n return new Promise((resolve, reject) => {\n if (!this.$target.length) {\n window.dispatchEvent(new CustomEvent('arts/preloader/end'));\n resolve(true);\n return;\n }\n\n this.timeline\n .clear()\n .set(this.cursor.follower.outer, {\n attr: {\n transform: ''\n }\n })\n .to(this.cursor.follower.outer, {\n drawSVG: '0% 100%',\n rotate: 0,\n transformOrigin: 'center center',\n ease: 'expo.inOut',\n duration: 2.0\n }, 'start')\n .add([\n gsap.to(this.counter, {\n duration: 2.0,\n val: this.counter.target,\n ease: 'expo.inOut',\n onUpdate: () => {\n const value = parseFloat(this.counter.val).toFixed(0);\n this.$counter.text(this.counter.prefix + value + this.counter.suffix);\n }\n }),\n ], 'start')\n .add([\n this.tweens.followMouse.play(),\n gsap.to(this.cursor.follower.element, {\n width: this.cursor.follower.size.element.width,\n height: this.cursor.follower.size.element.height,\n ease: 'expo.out',\n duration: 1.2\n }),\n gsap.to(this.cursor.follower.inner, {\n attr: this.cursor.follower.size.inner,\n ease: 'expo.out',\n duration: 1.2,\n }),\n gsap.to(this.cursor.follower.outer, {\n attr: this.cursor.follower.size.outer,\n ease: 'expo.out',\n autoAlpha: 0,\n duration: 1.2,\n }),\n ])\n .add([\n gsap.effects.moveCurtain(this.curtain.element, {\n duration: 1.2\n }),\n gsap.to(this.$content, {\n y: -30,\n delay: 0.1,\n duration: 0.8,\n ease: 'power3.inOut',\n }),\n gsap.to(this.$target, {\n delay: 0.2,\n display: 'none',\n duration: 0.8,\n ease: 'power3.inOut',\n })\n ], '-=1.2')\n .set(window.$pageContent, {\n autoAlpha: 1\n })\n .to(this.curtain.element, {\n autoAlpha: 0,\n delay: 0.4,\n duration: 0.3\n })\n .set([this.$target, this.curtain.element], {\n y: '-100%',\n display: 'none',\n })\n .set(this.cursor.element, {\n clearProps: 'top,left',\n x: '-50%',\n y: '-50%'\n })\n .add(() => {\n window.dispatchEvent(new CustomEvent('arts/preloader/end'));\n window.$body.removeClass('cursor-progress');\n this.tweens.followMouse.kill();\n resolve(true);\n }, '-=0.6')\n\n });\n }\n\n function _bindEvents() {\n self.$scope.on('mousemove', (e) => {\n window.mouseX = e.clientX;\n window.mouseY = e.clientY;\n });\n }\n\n}\n","/* ======================================================================== */\n/* 5. MobileBarHeight */\n/* ======================================================================== */\nclass MobileBarHeight {\n\tconstructor() {\n\t\tthis.vh = 0;\n\t\tthis._createStyleElement();\n\t\tthis._setVh();\n\t\tif (window.theme.mobileBarFix.update) {\n\t\t\tthis._bindEvents();\n\t\t}\n\t}\n\n\t_setVh() {\n\t\tthis.vh = window.innerHeight * 0.01;\n\t\t$('#arts-fix-bar').html(`:root { --fix-bar-vh: ${this.vh}px; }`);\n\t}\n\n\t_bindEvents() {\n\t\tconst event = window.Modernizr.touchevents ? 'orientationchange' : 'resize';\n\n\t\twindow.$window.on(event, window.rhye.functions.debounce(() => {\n\t\t\tthis._setVh();\n\t\t}, 250))\n\t\t\t.on('arts/barba/transition/clone/before', () => {\n\t\t\t\tthis._setVh();\n\t\t\t});\n\t}\n\n\t_createStyleElement() {\n\t\tif (!$('#arts-fix-bar').length) {\n\t\t\t$('head').append('');\n\t\t}\n\t}\n}\n","/* ======================================================================== */\n/* 6. math */\n/* ======================================================================== */\nNumber.prototype.map = function (in_min, in_max, out_min, out_max) {\n\treturn ((this - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min\n}\n","/* ======================================================================== */\n/* 7. runOnHighPerformanceGPU */\n/* ======================================================================== */\nfunction runOnHighPerformanceGPU() {\n\tif (!window.Modernizr.touchevents && window.theme.highPerformance) {\n\t\tlet element = document.getElementsByTagName('canvas')[0];\n\n\t\tif (typeof element === 'undefined' || element === null) {\n\t\t\telement = document.createElement('canvas');\n\t\t\telement.getContext('webgl', {\n\t\t\t\tpowerPreference: 'high-performance'\n\t\t\t});\n\t\t}\n\t}\n\n}\n"]}