PageSourceSearch

https://chokotto-fudousan.jp/ui_assets/components/sidebar.js

js chokotto-fudousan.jp collected 2026-10-07 23:57:05 UTC 34,510 bytes, 1,036 lines download raw bytes

vendor: 8,731 bytes, lines 1-264
1/*!
2 * # Semantic UI 2.2.10 - Sidebar
3 * http://github.com/semantic-org/semantic-ui/
4 *
5 *
6 * Released under the MIT license
7 * http://opensource.org/licenses/MIT
8 *
9 */
10
11;(function ($, window, document, undefined) {
12
13"use strict";
14
15window = (typeof window != 'undefined' && window.Math == Math)
16  ? window
17  : (typeof self != 'undefined' && self.Math == Math)
18    ? self
19    : Function('return this')()
20;
21
22$.fn.sidebar = function(parameters) {
23  var
24    $allModules     = $(this),
25    $window         = $(window),
26    $document       = $(document),
27    $html           = $('html'),
28    $head           = $('head'),
29
30    moduleSelector  = $allModules.selector || '',
31
32    time            = new Date().getTime(),
33    performance     = [],
34
35    query           = arguments[0],
36    methodInvoked   = (typeof query == 'string'),
37    queryArguments  = [].slice.call(arguments, 1),
38
39    requestAnimationFrame = window.requestAnimationFrame
40      || window.mozRequestAnimationFrame
41      || window.webkitRequestAnimationFrame
42      || window.msRequestAnimationFrame
43      || function(callback) { setTimeout(callback, 0); },
44
45    returnedValue
46  ;
47
48  $allModules
49    .each(function() {
50      var
51        settings        = ( $.isPlainObject(parameters) )
52          ? $.extend(true, {}, $.fn.sidebar.settings, parameters)
53          : $.extend({}, $.fn.sidebar.settings),
54
55        selector        = settings.selector,
56        className       = settings.className,
57        namespace       = settings.namespace,
58        regExp          = settings.regExp,
59        error           = settings.error,
60
61        eventNamespace  = '.' + namespace,
62        moduleNamespace = 'module-' + namespace,
63
64        $module         = $(this),
65        $context        = $(settings.context),
66
67        $sidebars       = $module.children(selector.sidebar),
68        $fixed          = $context.children(selector.fixed),
69        $pusher         = $context.children(selector.pusher),
70        $style,
71
72        element         = this,
73        instance        = $module.data(moduleNamespace),
74
75        elementNamespace,
76        id,
77        currentScroll,
78        transitionEvent,
79
80        module
81      ;
82
83      module      = {
84
85        initialize: function() {
86          module.debug('Initializing sidebar', parameters);
87
88          module.create.id();
89
90          transitionEvent = module.get.transitionEvent();
91
92          if(module.is.ios()) {
93            module.set.ios();
94          }
95
96          // avoids locking rendering if initialized in onReady
97          if(settings.delaySetup) {
98            requestAnimationFrame(module.setup.layout);
99          }
100          else {
101            module.setup.layout();
102          }
103
104          requestAnimationFrame(function() {
105            module.setup.cache();
106          });
107
108          module.instantiate();
109        },
110
111        instantiate: function() {
112          module.verbose('Storing instance of module', module);
113          instance = module;
114          $module
115            .data(moduleNamespace, module)
116          ;
117        },
118
119        create: {
120          id: function() {
121            id = (Math.random().toString(16) + '000000000').substr(2,8);
122            elementNamespace = '.' + id;
123            module.verbose('Creating unique id for element', id);
124          }
125        },
126
127        destroy: function() {
128          module.verbose('Destroying previous module for', $module);
129          $module
130            .off(eventNamespace)
131            .removeData(moduleNamespace)
132          ;
133          if(module.is.ios()) {
134            module.remove.ios();
135          }
136          // bound by uuid
137          $context.off(elementNamespace);
138          $window.off(elementNamespace);
139          $document.off(elementNamespace);
140        },
141
142        event: {
143          clickaway: function(event) {
144            var
145              clickedInPusher = ($pusher.find(event.target).length > 0 || $pusher.is(event.target)),
146              clickedContext  = ($context.is(event.target))
147            ;
148            if(clickedInPusher) {
149              module.verbose('User clicked on dimmed page');
150              module.hide();
151            }
152            if(clickedContext) {
153              module.verbose('User clicked on dimmable context (scaled out page)');
154              module.hide();
155            }
156          },
157          touch: function(event) {
158            //event.stopPropagation();
159          },
160          containScroll: function(event) {
161            if(element.scrollTop <= 0)  {
162              element.scrollTop = 1;
163            }
164            if((element.scrollTop + element.offsetHeight) >= element.scrollHeight) {
165              element.scrollTop = element.scrollHeight - element.offsetHeight - 1;
166            }
167          },
168          scroll: function(event) {
169            if( $(event.target).closest(selector.sidebar).length === 0 ) {
170              event.preventDefault();
171            }
172          }
173        },
174
175        bind: {
176          clickaway: function() {
177            module.verbose('Adding clickaway events to context', $context);
178            if(settings.closable) {
179              $context
180                .on('click'    + elementNamespace, module.event.clickaway)
181                .on('touchend' + elementNamespace, module.event.clickaway)
182              ;
183            }
184          },
185          scrollLock: function() {
186            if(settings.scrollLock) {
187              module.debug('Disabling page scroll');
188              $window
189                .on('DOMMouseScroll' + elementNamespace, module.event.scroll)
190              ;
191            }
192            module.verbose('Adding events to contain sidebar scroll');
193            $document
194              .on('touchmove' + elementNamespace, module.event.touch)
195            ;
196            $module
197              .on('scroll' + eventNamespace, module.event.containScroll)
198            ;
199          }
200        },
201        unbind: {
202          clickaway: function() {
203            module.verbose('Removing clickaway events from context', $context);
204            $context.off(elementNamespace);
205          },
206          scrollLock: function() {
207            module.verbose('Removing scroll lock from page');
208            $document.off(elementNamespace);
209            $window.off(elementNamespace);
210            $module.off('scroll' + eventNamespace);
211          }
212        },
213
214        add: {
215          inlineCSS: function() {
216            var
217              width     = module.cache.width  || $module.outerWidth(),
218              height    = module.cache.height || $module.outerHeight(),
219              isRTL     = module.is.rtl(),
220              direction = module.get.direction(),
221              distance  = {
222                left   : width,
223                right  : -width,
224                top    : height,
225                bottom : -height
226              },
227              style
228            ;
229
230            if(isRTL){
231              module.verbose('RTL detected, flipping widths');
232              distance.left = -width;
233              distance.right = width;
234            }
235
236            style  = '<style>';
237
238            if(direction === 'left' || direction === 'right') {
239              module.debug('Adding CSS rules for animation distance', width);
240              style  += ''
241                + ' .ui.visible.' + direction + '.sidebar ~ .fixed,'
242                + ' .ui.visible.' + direction + '.sidebar ~ .pusher {'
243                + '   -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'
244                + '           transform: translate3d('+ distance[direction] + 'px, 0, 0);'
245                + ' }'
246              ;
247            }
248            else if(direction === 'top' || direction == 'bottom') {
249              style  += ''
250                + ' .ui.visible.' + direction + '.sidebar ~ .fixed,'
251                + ' .ui.visible.' + direction + '.sidebar ~ .pusher {'
252                + '   -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
253                + '           transform: translate3d(0, ' + distance[direction] + 'px, 0);'
254                + ' }'
255              ;
256            }
257
258            /* IE is only browser not to create context with transforms */
259            /* https://www.w3.org/Bugs/Public/show_bug.cgi?id=16328 */
260            if( module.is.ie() ) {
261              if(direction === 'left' || direction === 'right') {
262                module.debug('Adding CSS rules for animation distance', width);
263                style  += ''
264                  + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
vendor: 25,191 bytes, lines 265-1022
265                  + '   -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'
266                  + '           transform: translate3d('+ distance[direction] + 'px, 0, 0);'
267                  + ' }'
268                ;
269              }
270              else if(direction === 'top' || direction == 'bottom') {
271                style  += ''
272                  + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
273                  + '   -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
274                  + '           transform: translate3d(0, ' + distance[direction] + 'px, 0);'
275                  + ' }'
276                ;
277              }
278              /* opposite sides visible forces content overlay */
279              style += ''
280                + ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
281                + ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
282                + '   -webkit-transform: translate3d(0px, 0, 0);'
283                + '           transform: translate3d(0px, 0, 0);'
284                + ' }'
285              ;
286            }
287            style += '</style>';
288            $style = $(style)
289              .appendTo($head)
290            ;
291            module.debug('Adding sizing css to head', $style);
292          }
293        },
294
295        refresh: function() {
296          module.verbose('Refreshing selector cache');
297          $context  = $(settings.context);
298          $sidebars = $context.children(selector.sidebar);
299          $pusher   = $context.children(selector.pusher);
300          $fixed    = $context.children(selector.fixed);
301          module.clear.cache();
302        },
303
304        refreshSidebars: function() {
305          module.verbose('Refreshing other sidebars');
306          $sidebars = $context.children(selector.sidebar);
307        },
308
309        repaint: function() {
310          module.verbose('Forcing repaint event');
311          element.style.display = 'none';
312          var ignored = element.offsetHeight;
313          element.scrollTop = element.scrollTop;
314          element.style.display = '';
315        },
316
317        setup: {
318          cache: function() {
319            module.cache = {
320              width  : $module.outerWidth(),
321              height : $module.outerHeight(),
322              rtl    : ($module.css('direction') == 'rtl')
323            };
324          },
325          layout: function() {
326            if( $context.children(selector.pusher).length === 0 ) {
327              module.debug('Adding wrapper element for sidebar');
328              module.error(error.pusher);
329              $pusher = $('<div class="pusher" />');
330              $context
331                .children()
332                  .not(selector.omitted)
333                  .not($sidebars)
334                  .wrapAll($pusher)
335              ;
336              module.refresh();
337            }
338            if($module.nextAll(selector.pusher).length === 0 || $module.nextAll(selector.pusher)[0] !== $pusher[0]) {
339              module.debug('Moved sidebar to correct parent element');
340              module.error(error.movedSidebar, element);
341              $module.detach().prependTo($context);
342              module.refresh();
343            }
344            module.clear.cache();
345            module.set.pushable();
346            module.set.direction();
347          }
348        },
349
350        attachEvents: function(selector, event) {
351          var
352            $toggle = $(selector)
353          ;
354          event = $.isFunction(module[event])
355            ? module[event]
356            : module.toggle
357          ;
358          if($toggle.length > 0) {
359            module.debug('Attaching sidebar events to element', selector, event);
360            $toggle
361              .on('click' + eventNamespace, event)
362            ;
363          }
364          else {
365            module.error(error.notFound, selector);
366          }
367        },
368
369        show: function(callback) {
370          callback = $.isFunction(callback)
371            ? callback
372            : function(){}
373          ;
374          if(module.is.hidden()) {
375            module.refreshSidebars();
376            if(settings.overlay)  {
377              module.error(error.overlay);
378              settings.transition = 'overlay';
379            }
380            module.refresh();
381            if(module.othersActive()) {
382              module.debug('Other sidebars currently visible');
383              if(settings.exclusive) {
384                // if not overlay queue animation after hide
385                if(settings.transition != 'overlay') {
386                  module.hideOthers(module.show);
387                  return;
388                }
389                else {
390                  module.hideOthers();
391                }
392              }
393              else {
394                settings.transition = 'overlay';
395              }
396            }
397            module.pushPage(function() {
398              callback.call(element);
399              settings.onShow.call(element);
400            });
401            settings.onChange.call(element);
402            settings.onVisible.call(element);
403          }
404          else {
405            module.debug('Sidebar is already visible');
406          }
407        },
408
409        hide: function(callback) {
410          callback = $.isFunction(callback)
411            ? callback
412            : function(){}
413          ;
414          if(module.is.visible() || module.is.animating()) {
415            module.debug('Hiding sidebar', callback);
416            module.refreshSidebars();
417            module.pullPage(function() {
418              callback.call(element);
419              settings.onHidden.call(element);
420            });
421            settings.onChange.call(element);
422            settings.onHide.call(element);
423          }
424        },
425
426        othersAnimating: function() {
427          return ($sidebars.not($module).filter('.' + className.animating).length > 0);
428        },
429        othersVisible: function() {
430          return ($sidebars.not($module).filter('.' + className.visible).length > 0);
431        },
432        othersActive: function() {
433          return(module.othersVisible() || module.othersAnimating());
434        },
435
436        hideOthers: function(callback) {
437          var
438            $otherSidebars = $sidebars.not($module).filter('.' + className.visible),
439            sidebarCount   = $otherSidebars.length,
440            callbackCount  = 0
441          ;
442          callback = callback || function(){};
443          $otherSidebars
444            .sidebar('hide', function() {
445              callbackCount++;
446              if(callbackCount == sidebarCount) {
447                callback();
448              }
449            })
450          ;
451        },
452
453        toggle: function() {
454          module.verbose('Determining toggled direction');
455          if(module.is.hidden()) {
456            module.show();
457          }
458          else {
459            module.hide();
460          }
461        },
462
463        pushPage: function(callback) {
464          var
465            transition = module.get.transition(),
466            $transition = (transition === 'overlay' || module.othersActive())
467              ? $module
468              : $pusher,
469            animate,
470            dim,
471            transitionEnd
472          ;
473          callback = $.isFunction(callback)
474            ? callback
475            : function(){}
476          ;
477          if(settings.transition == 'scale down') {
478            module.scrollToTop();
479          }
480          module.set.transition(transition);
481          module.repaint();
482          animate = function() {
483            module.bind.clickaway();
484            module.add.inlineCSS();
485            module.set.animating();
486            module.set.visible();
487          };
488          dim = function() {
489            module.set.dimmed();
490          };
491          transitionEnd = function(event) {
492            if( event.target == $transition[0] ) {
493              $transition.off(transitionEvent + elementNamespace, transitionEnd);
494              module.remove.animating();
495              module.bind.scrollLock();
496              callback.call(element);
497            }
498          };
499          $transition.off(transitionEvent + elementNamespace);
500          $transition.on(transitionEvent + elementNamespace, transitionEnd);
501          requestAnimationFrame(animate);
502          if(settings.dimPage && !module.othersVisible()) {
503            requestAnimationFrame(dim);
504          }
505        },
506
507        pullPage: function(callback) {
508          var
509            transition = module.get.transition(),
510            $transition = (transition == 'overlay' || module.othersActive())
511              ? $module
512              : $pusher,
513            animate,
514            transitionEnd
515          ;
516          callback = $.isFunction(callback)
517            ? callback
518            : function(){}
519          ;
520          module.verbose('Removing context push state', module.get.direction());
521
522          module.unbind.clickaway();
523          module.unbind.scrollLock();
524
525          animate = function() {
526            module.set.transition(transition);
527            module.set.animating();
528            module.remove.visible();
529            if(settings.dimPage && !module.othersVisible()) {
530              $pusher.removeClass(className.dimmed);
531            }
532          };
533          transitionEnd = function(event) {
534            if( event.target == $transition[0] ) {
535              $transition.off(transitionEvent + elementNamespace, transitionEnd);
536              module.remove.animating();
537              module.remove.transition();
538              module.remove.inlineCSS();
539              if(transition == 'scale down' || (settings.returnScroll && module.is.mobile()) ) {
540                module.scrollBack();
541              }
542              callback.call(element);
543            }
544          };
545          $transition.off(transitionEvent + elementNamespace);
546          $transition.on(transitionEvent + elementNamespace, transitionEnd);
547          requestAnimationFrame(animate);
548        },
549
550        scrollToTop: function() {
551          module.verbose('Scrolling to top of page to avoid animation issues');
552          currentScroll = $(window).scrollTop();
553          $module.scrollTop(0);
554          window.scrollTo(0, 0);
555        },
556
557        scrollBack: function() {
558          module.verbose('Scrolling back to original page position');
559          window.scrollTo(0, currentScroll);
560        },
561
562        clear: {
563          cache: function() {
564            module.verbose('Clearing cached dimensions');
565            module.cache = {};
566          }
567        },
568
569        set: {
570
571          // ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios
572          ios: function() {
573            $html.addClass(className.ios);
574          },
575
576          // container
577          pushed: function() {
578            $context.addClass(className.pushed);
579          },
580          pushable: function() {
581            $context.addClass(className.pushable);
582          },
583
584          // pusher
585          dimmed: function() {
586            $pusher.addClass(className.dimmed);
587          },
588
589          // sidebar
590          active: function() {
591            $module.addClass(className.active);
592          },
593          animating: function() {
594            $module.addClass(className.animating);
595          },
596          transition: function(transition) {
597            transition = transition || module.get.transition();
598            $module.addClass(transition);
599          },
600          direction: function(direction) {
601            direction = direction || module.get.direction();
602            $module.addClass(className[direction]);
603          },
604          visible: function() {
605            $module.addClass(className.visible);
606          },
607          overlay: function() {
608            $module.addClass(className.overlay);
609          }
610        },
611        remove: {
612
613          inlineCSS: function() {
614            module.debug('Removing inline css styles', $style);
615            if($style && $style.length > 0) {
616              $style.remove();
617            }
618          },
619
620          // ios scroll on html not document
621          ios: function() {
622            $html.removeClass(className.ios);
623          },
624
625          // context
626          pushed: function() {
627            $context.removeClass(className.pushed);
628          },
629          pushable: function() {
630            $context.removeClass(className.pushable);
631          },
632
633          // sidebar
634          active: function() {
635            $module.removeClass(className.active);
636          },
637          animating: function() {
638            $module.removeClass(className.animating);
639          },
640          transition: function(transition) {
641            transition = transition || module.get.transition();
642            $module.removeClass(transition);
643          },
644          direction: function(direction) {
645            direction = direction || module.get.direction();
646            $module.removeClass(className[direction]);
647          },
648          visible: function() {
649            $module.removeClass(className.visible);
650          },
651          overlay: function() {
652            $module.removeClass(className.overlay);
653          }
654        },
655
656        get: {
657          direction: function() {
658            if($module.hasClass(className.top)) {
659              return className.top;
660            }
661            else if($module.hasClass(className.right)) {
662              return className.right;
663            }
664            else if($module.hasClass(className.bottom)) {
665              return className.bottom;
666            }
667            return className.left;
668          },
669          transition: function() {
670            var
671              direction = module.get.direction(),
672              transition
673            ;
674            transition = ( module.is.mobile() )
675              ? (settings.mobileTransition == 'auto')
676                ? settings.defaultTransition.mobile[direction]
677                : settings.mobileTransition
678              : (settings.transition == 'auto')
679                ? settings.defaultTransition.computer[direction]
680                : settings.transition
681            ;
682            module.verbose('Determined transition', transition);
683            return transition;
684          },
685          transitionEvent: function() {
686            var
687              element     = document.createElement('element'),
688              transitions = {
689                'transition'       :'transitionend',
690                'OTransition'      :'oTransitionEnd',
691                'MozTransition'    :'transitionend',
692                'WebkitTransition' :'webkitTransitionEnd'
693              },
694              transition
695            ;
696            for(transition in transitions){
697              if( element.style[transition] !== undefined ){
698                return transitions[transition];
699              }
700            }
701          }
702        },
703
704        is: {
705
706          ie: function() {
707            var
708              isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),
709              isIE   = ('ActiveXObject' in window)
710            ;
711            return (isIE11 || isIE);
712          },
713
714          ios: function() {
715            var
716              userAgent      = navigator.userAgent,
717              isIOS          = userAgent.match(regExp.ios),
718              isMobileChrome = userAgent.match(regExp.mobileChrome)
719            ;
720            if(isIOS && !isMobileChrome) {
721              module.verbose('Browser was found to be iOS', userAgent);
722              return true;
723            }
724            else {
725              return false;
726            }
727          },
728          mobile: function() {
729            var
730              userAgent    = navigator.userAgent,
731              isMobile     = userAgent.match(regExp.mobile)
732            ;
733            if(isMobile) {
734              module.verbose('Browser was found to be mobile', userAgent);
735              return true;
736            }
737            else {
738              module.verbose('Browser is not mobile, using regular transition', userAgent);
739              return false;
740            }
741          },
742          hidden: function() {
743            return !module.is.visible();
744          },
745          visible: function() {
746            return $module.hasClass(className.visible);
747          },
748          // alias
749          open: function() {
750            return module.is.visible();
751          },
752          closed: function() {
753            return module.is.hidden();
754          },
755          vertical: function() {
756            return $module.hasClass(className.top);
757          },
758          animating: function() {
759            return $context.hasClass(className.animating);
760          },
761          rtl: function () {
762            if(module.cache.rtl === undefined) {
763              module.cache.rtl = ($module.css('direction') == 'rtl');
764            }
765            return module.cache.rtl;
766          }
767        },
768
769        setting: function(name, value) {
770          module.debug('Changing setting', name, value);
771          if( $.isPlainObject(name) ) {
772            $.extend(true, settings, name);
773          }
774          else if(value !== undefined) {
775            if($.isPlainObject(settings[name])) {
776              $.extend(true, settings[name], value);
777            }
778            else {
779              settings[name] = value;
780            }
781          }
782          else {
783            return settings[name];
784          }
785        },
786        internal: function(name, value) {
787          if( $.isPlainObject(name) ) {
788            $.extend(true, module, name);
789          }
790          else if(value !== undefined) {
791            module[name] = value;
792          }
793          else {
794            return module[name];
795          }
796        },
797        debug: function() {
798          if(!settings.silent && settings.debug) {
799            if(settings.performance) {
800              module.performance.log(arguments);
801            }
802            else {
803              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
804              module.debug.apply(console, arguments);
805            }
806          }
807        },
808        verbose: function() {
809          if(!settings.silent && settings.verbose && settings.debug) {
810            if(settings.performance) {
811              module.performance.log(arguments);
812            }
813            else {
814              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
815              module.verbose.apply(console, arguments);
816            }
817          }
818        },
819        error: function() {
820          if(!settings.silent) {
821            module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
822            module.error.apply(console, arguments);
823          }
824        },
825        performance: {
826          log: function(message) {
827            var
828              currentTime,
829              executionTime,
830              previousTime
831            ;
832            if(settings.performance) {
833              currentTime   = new Date().getTime();
834              previousTime  = time || currentTime;
835              executionTime = currentTime - previousTime;
836              time          = currentTime;
837              performance.push({
838                'Name'           : message[0],
839                'Arguments'      : [].slice.call(message, 1) || '',
840                'Element'        : element,
841                'Execution Time' : executionTime
842              });
843            }
844            clearTimeout(module.performance.timer);
845            module.performance.timer = setTimeout(module.performance.display, 500);
846          },
847          display: function() {
848            var
849              title = settings.name + ':',
850              totalTime = 0
851            ;
852            time = false;
853            clearTimeout(module.performance.timer);
854            $.each(performance, function(index, data) {
855              totalTime += data['Execution Time'];
856            });
857            title += ' ' + totalTime + 'ms';
858            if(moduleSelector) {
859              title += ' \'' + moduleSelector + '\'';
860            }
861            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
862              console.groupCollapsed(title);
863              if(console.table) {
864                console.table(performance);
865              }
866              else {
867                $.each(performance, function(index, data) {
868                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
869                });
870              }
871              console.groupEnd();
872            }
873            performance = [];
874          }
875        },
876        invoke: function(query, passedArguments, context) {
877          var
878            object = instance,
879            maxDepth,
880            found,
881            response
882          ;
883          passedArguments = passedArguments || queryArguments;
884          context         = element         || context;
885          if(typeof query == 'string' && object !== undefined) {
886            query    = query.split(/[\. ]/);
887            maxDepth = query.length - 1;
888            $.each(query, function(depth, value) {
889              var camelCaseValue = (depth != maxDepth)
890                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
891                : query
892              ;
893              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
894                object = object[camelCaseValue];
895              }
896              else if( object[camelCaseValue] !== undefined ) {
897                found = object[camelCaseValue];
898                return false;
899              }
900              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
901                object = object[value];
902              }
903              else if( object[value] !== undefined ) {
904                found = object[value];
905                return false;
906              }
907              else {
908                module.error(error.method, query);
909                return false;
910              }
911            });
912          }
913          if ( $.isFunction( found ) ) {
914            response = found.apply(context, passedArguments);
915          }
916          else if(found !== undefined) {
917            response = found;
918          }
919          if($.isArray(returnedValue)) {
920            returnedValue.push(response);
921          }
922          else if(returnedValue !== undefined) {
923            returnedValue = [returnedValue, response];
924          }
925          else if(response !== undefined) {
926            returnedValue = response;
927          }
928          return found;
929        }
930      }
931    ;
932
933    if(methodInvoked) {
934      if(instance === undefined) {
935        module.initialize();
936      }
937      module.invoke(query);
938    }
939    else {
940      if(instance !== undefined) {
941        module.invoke('destroy');
942      }
943      module.initialize();
944    }
945  });
946
947  return (returnedValue !== undefined)
948    ? returnedValue
949    : this
950  ;
951};
952
953$.fn.sidebar.settings = {
954
955  name              : 'Sidebar',
956  namespace         : 'sidebar',
957
958  silent            : false,
959  debug             : false,
960  verbose           : false,
961  performance       : true,
962
963  transition        : 'auto',
964  mobileTransition  : 'auto',
965
966  defaultTransition : {
967    computer: {
968      left   : 'uncover',
969      right  : 'uncover',
970      top    : 'overlay',
971      bottom : 'overlay'
972    },
973    mobile: {
974      left   : 'uncover',
975      right  : 'uncover',
976      top    : 'overlay',
977      bottom : 'overlay'
978    }
979  },
980
981  context           : 'body',
982  exclusive         : false,
983  closable          : true,
984  dimPage           : true,
985  scrollLock        : false,
986  returnScroll      : false,
987  delaySetup        : false,
988
989  duration          : 500,
990
991  onChange          : function(){},
992  onShow            : function(){},
993  onHide            : function(){},
994
995  onHidden          : function(){},
996  onVisible         : function(){},
997
998  className         : {
999    active    : 'active',
1000    animating : 'animating',
1001    dimmed    : 'dimmed',
1002    ios       : 'ios',
1003    pushable  : 'pushable',
1004    pushed    : 'pushed',
1005    right     : 'right',
1006    top       : 'top',
1007    left      : 'left',
1008    bottom    : 'bottom',
1009    visible   : 'visible'
1010  },
1011
1012  selector: {
1013    fixed   : '.fixed',
1014    omitted : 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed',
1015    pusher  : '.pusher',
1016    sidebar : '.ui.sidebar'
1017  },
1018
1019  regExp: {
1020    ios          : /(iPad|iPhone|iPod)/g,
1021    mobileChrome : /(CriOS)/g,
1022    mobile       : /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolf
1022in|Dolphin|Skyfire|Zune/g
1023  },
1024
1025  error   : {
1026    method       : 'The method you called is not defined.',
1027    pusher       : 'Had to add pusher element. For optimal performance make sure body content is inside a pusher element',
1028    movedSidebar : 'Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag',
1029    overlay      : 'The overlay setting is no longer supported, use animation: overlay',
1030    notFound     : 'There were no elements that matched the specified selector'
1031  }
1032
1033};
1034
1035
1036})( jQuery, window, document );

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.