PageSourceSearch

https://mamc.ae/wp-content/plugins/arolax-essential/assets/js/wcf--global-core.min.js?ver=7.1.2

js mamc.ae collected 2026-09-26 03:37:15 UTC 10,007 bytes, 258 lines download raw bytes

1( function( $ ) {
2  /**
3   * @param $scope The Widget wrapper element as a jQuery element
4   * @param $ The jQuery alias
5   */
6  var Wcf_Accordion = function ($scope, $) {      
7 
8      var $wrapper = $scope.find('.elementor-accordion');
9      var $items   = $wrapper.find('.elementor-accordion-item');
10      
11      if($items.length && $wrapper.attr('data-active') === 'yes'){
12         $items.find('[data-active="yes"]').addClass('elementor-active');
13         $items.find('.elementor-tab-content[data-active="yes"]').addClass('elementor-active').slideToggle();               
14      }
15      
16      $scope.find('.elementor-tab-title').on('click',function(){       
17          $(this).toggleClass("elementor-active").next(".elementor-tab-content").slideToggle().parent().siblings().find(".elementor-tab-content").slideUp().prev().removeClass("elementor-active");            
18      });
19     
20  };
21  var Wcf_Accordion_2 = function ($scope, $) {      
22 
23      var $wrapper = $scope.find('.elementor-accordion');
24      var $items   = $wrapper.find('.elementor-accordion-item');
25      
26      if($items.length && $wrapper.attr('data-active') === 'yes'){
27         $items.find('[data-active="yes"]').addClass('elementor-active');
28         $items.find('.elementor-tab-content[data-active="yes"]').addClass('elementor-active').slideToggle();               
29      }
30      
31      $scope.find('.elementor-tab-title').on('click',function(){       
32          $(this).toggleClass("elementor-active").next(".elementor-tab-content").slideToggle().parent().siblings().find(".elementor-tab-content").slideUp().prev().removeClass("elementor-active");            
33      });
34     
35  };
36 
37  // Make sure you run this code under Elementor.
38  $( window ).on( 'elementor/frontend/init', function() {
39
40      const icon_box  =  elementorModules.frontend.handlers.Base.extend({
41          bindEvents : function bindEvents() {
42          this.run();            
43          },
44          
45          run : function(){
46    
47          if(this.getElementSettings('wcf_enable_bottom_top_scroll') === 'yes'){   
48              
49              if(this.findElement('a').length){
50              
51                  let target = this.findElement('a').attr('href');                      
52                  if ( !target ){                        
53                      this.findElement('a').on('click', function(e){
54                          e.preventDefault();
55                          if (typeof(gsap) === "object") {
56                              gsap.to(window, {duration: 1, scrollTo:{y:'body', offsetY:70}});
57                          }
58                      });
59                  }else{
60                  
61                      try{
62                          if (typeof(gsap) === "object") {
63                          let element = document.querySelector(this.findElement('a').attr('href'));
64                          let linkST = ScrollTrigger.create({
65                            trigger: element,
66                            start: "top top",
67                          });
68                          
69                          ScrollTrigger.create({
70                            trigger: element,
71                            start: "top center",
72                            end: "bottom center"                          
73                          });
74                          
75                          this.findElement('a').on('click', function(e){
76                              e.preventDefault();   
77                              gsap.to(window, {
78                                  duration: 0.1,
79                                  scrollTo: linkST.start,
80                                  overwrite: "auto"
81                              });                           
82                          });
83                      }
84                          
85                      }catch (e) {}
86                  }                                       
87                  
88              }else{
89                  
90                 this.findElement('.elementor-widget-container').css({'cursor':'pointer'});
91                 this.findElement('.elementor-widget-container').on('click' , function(e){
92                      e.preventDefault();  
93                      if (typeof(gsap) === "object") {
94                          gsap.to(window, {duration: 1, scrollTo:{y:'body', offsetY:70}});
95                      }
96                 }); 
97              }
98          } 
99         
100          }
101      
102      })
103  
104      elementorFrontend.hooks.addAction( 'frontend/element_ready/accordion.skin-wcf-accordion', Wcf_Accordion );
105      elementorFrontend.hooks.addAction( 'frontend/element_ready/accordion.skin-wcf-accordion-two', Wcf_Accordion_2 );
106      
107      const addIcon_BoxHandler = ( $element ) => {
108          elementorFrontend.elementsHandler.addHandler( icon_box, {
109              $element,
110          } );
111      };
112       
113      elementorFrontend.hooks.addAction( 'frontend/element_ready/icon-box.default', addIcon_BoxHandler );
114      elementorFrontend.hooks.addAction( 'frontend/element_ready/wcf--button.default', addIcon_BoxHandler );
115      elementorFrontend.hooks.addAction( 'frontend/element_ready/button.default', addIcon_BoxHandler );
116  } );
117} )( jQuery );
118
119// Sticky Section
120(function ($) {
121
122    // sticky
123    
124    var Wcf_Sticky_Menu = {
125
126        elementorSection: function( $scope ) {
127            var $_target   = $scope,
128                instance  = null,
129                editMode  = Boolean( elementorFrontend.isEditMode() );
130                instance = new Wcf_Sticky_Menu_Plugin( $_target );
131                // run main functionality                
132                instance.init(instance);
133              
134        },
135    };
136
137    Wcf_Sticky_Menu_Plugin = function( $target ) {
138
139        var self         = this,
140        sectionId        = $target.data('id'),
141        settings         = false,
142        editMode         = Boolean( elementorFrontend.isEditMode() ),
143        $window          = $( window ),
144        $body            = $( 'body' );
145       
146        /**
147         * Init
148         */
149        self.init = function() {
150            
151            self.wcf_infos_sticky( sectionId );         
152            return false;
153        };
154
155        
156        self.wcf_infos_sticky = function (sectionId){
157          
158            var wcf_global_sticky = false;
159            var wcf_sticky_offset = 150;
160            var wcf_sticky_type   = null;
161
162            wcf_global_sticky = self.getSettings( sectionId, 'wcf_global_sticky' );
163            wcf_sticky_type   = self.getSettings( sectionId, 'wcf_sticky_type' );
164            wcf_sticky_offset = parseInt(self.getSettings( sectionId, 'wcf_sticky_offset' ));
165            
166            if(isNaN( wcf_sticky_offset)){
167                wcf_sticky_offset = 150;  
168            }
169            //default offset
170            if(wcf_sticky_offset < 5 ){
171                 wcf_sticky_offset = 110;  
172            }
173          
174            if(wcf_global_sticky == 'yes'){
175
176                $target.addClass('wcf-sticky-container');
177
178                if(wcf_sticky_type == 'top'){
179                    $target.addClass('top');
180                    $target.removeClass('bottom');
181                }
182
183                if(wcf_sticky_type == 'bottom'){
184                    $target.addClass('bottom');
185                    $target.removeClass('top');
186                }
187                if(wcf_sticky_type == ''){
188                    $target.removeClass('top');
189                    $target.removeClass('bottom');
190                }   
191                  
192                $window.on('scroll', function (event) {                   
193                    var scroll = $window.scrollTop();                    
194                    if (scroll < wcf_sticky_offset) {
195                        $target.removeClass("wcf-is-sticky");
196                    } else {
197                        $target.addClass("wcf-is-sticky");
198                    }
199                });
200            }else{
201
202                $target.removeClass('wcf-sticky-container');                
203            }
204
205
206        };
207
208        self.getSettings = function(sectionId, key){
209            var editorElements      = null,
210            sectionData             = {};
211             
212
213            if ( ! editMode ) {
214                sectionId = 'section' + sectionId;
215
216                if(!window.wcf_section_sticky_data || ! window.wcf_section_sticky_data.hasOwnProperty( sectionId )){
217                    return false;
218                }
219
220                if(! window.wcf_section_sticky_data[ sectionId ].hasOwnProperty( key )){
221                    return false;
222                }
223
224                return window.wcf_section_sticky_data[ sectionId ][key];
225            }else{
226                 
227                if ( ! window.elementor.hasOwnProperty( 'elements' ) ) {
228                    return false;
229                }
230                editorElements = window.elementor.elements;
231                
232                if ( ! editorElements.models ) {
233                    return false;
234                }
235                $.each( editorElements.models, function( index, obj ) {
236                    if ( sectionId == obj.id ) {
237                        sectionData = obj.attributes.settings.attributes;
238                    }
239                });
240
241                if ( ! sectionData.hasOwnProperty( key ) ) {
242                    return false;
243                }
244            }
245
246            return sectionData[ key ];
247        };
248    }
249    
250    $(window).on('elementor/frontend/init', function () {
251      
252        elementorFrontend.hooks.addAction( 'frontend/element_ready/section', Wcf_Sticky_Menu.elementorSection );
253        elementorFrontend.hooks.addAction( 'frontend/element_ready/container', Wcf_Sticky_Menu.elementorSection );        
254      
255    });    
256 
257
258})(jQuery);

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.