Get the whole scratchpad reserved for this extension (on an element or core) or get a single property of it
347855
function getScratch (cyOrEle, name) {
      if (cyOrEle.scratch('_cyExpandCollapse') === undefined) {
        cyOrEle.scratch('_cyExpandCollapse', {});
      }

      var scratch = cyOrEle.scratch('_cyExpandCollapse');
      var retVal = ( name === undefined ) ? scratch : scratch[name];
      return retVal;
    }
729375
function getGettextPluralPosition(ext, suffix) {
  if (ext) {
    for (let i = 0; i < ext.nplurals; i += 1) {
      if (i === suffix) {
        return i;
      }
    }
  }

  return -1;
}
820318
function getScriptInfo() {
    var bases = [ document.location.protocol + "//" + document.location.host ],
        scripts, src, rootUrl, baseMatch;
    if (typeof window.__vogue__ === "undefined") {
      scripts = document.getElementsByTagName("script");
      for (var i=0; i < scripts.length; i++) {
        src = scripts[i].getAttribute("src");
        if (src && src.slice(-15) === 'vogue-client.js') break;
      }
      rootUrl = src.match(/^https?\:\/\/(.*?)\//)[0];
      // There is an optional base argument, that can be used.
      baseMatch = src.match(/\bbase=(.*)(&|$)/);

      if (baseMatch) {
        bases = bases.concat(baseMatch[1].split(","));
      }
      return {
        rootUrl: rootUrl,
        bases: bases
      };
    } else {
      window.__vogue__.bases = bases;
      return window.__vogue__;
    }
  }
801540
public String getOnText() {
		String value = (String) getStateHelper().eval(PropertyKeys.onText);
		return value;
	}
716814
def get_script_extension_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_script_extensions if is_bytes else unidata.unicode_script_extensions

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['script'].get(negated, negated)
    else:
        value = unidata.unicode_alias['script'].get(value, value)

    return obj[value]
1021768
function getPointerType( event ) {
        var pointerTypeStr;
        if ( $.MouseTracker.unprefixedPointerEvents ) {
            pointerTypeStr = event.pointerType;
        } else {
            // IE10
            //  MSPOINTER_TYPE_TOUCH: 0x00000002
            //  MSPOINTER_TYPE_PEN:   0x00000003
            //  MSPOINTER_TYPE_MOUSE: 0x00000004
            switch( event.pointerType )
            {
                case 0x00000002:
                    pointerTypeStr = 'touch';
                    break;
                case 0x00000003:
                    pointerTypeStr = 'pen';
                    break;
                case 0x00000004:
                    pointerTypeStr = 'mouse';
                    break;
                default:
                    pointerTypeStr = '';
            }
        }
        return pointerTypeStr;
    }
1015247
function getStylingNodes (selector) {
    if (typeof queryCache[selector] === 'undefined') {
      queryCache[selector] = Array.prototype.map.call(
        document.querySelectorAll(selector),
        function (stylesheet) {
          return stylesheet.outerHTML;
        }
      ).join('');
    }

    return queryCache[selector];
  }
730621
function getClipboardData( evt, mode, callback )
	{
		var doc = this.document;

		// Avoid recursions on 'paste' event or consequent paste too fast. (#5730)
		if ( doc.getById( 'cke_pastebin' ) )
			return;

		// If the browser supports it, get the data directly
		if ( mode == 'text' && evt.data && evt.data.$.clipboardData )
		{
			// evt.data.$.clipboardData.types contains all the flavours in Mac's Safari, but not on windows.
			var plain = evt.data.$.clipboardData.getData( 'text/plain' );
			if ( plain )
			{
				evt.data.preventDefault();
				callback( plain );
				return;
			}
		}

		var sel = this.getSelection(),
			range = new CKEDITOR.dom.range( doc );

		// Create container to paste into
		var pastebin = new CKEDITOR.dom.element( mode == 'text' ? 'textarea' : CKEDITOR.env.webkit ? 'body' : 'div', doc );
		pastebin.setAttribute( 'id', 'cke_pastebin' );
		// Safari requires a filler node inside the div to have the content pasted into it. (#4882)
		CKEDITOR.env.webkit && pastebin.append( doc.createText( '\xa0' ) );
		doc.getBody().append( pastebin );

		pastebin.setStyles(
			{
				position : 'absolute',
				// Position the bin exactly at the position of the selected element
				// to avoid any subsequent document scroll.
				top : sel.getStartElement().getDocumentPosition().y + 'px',
				width : '1px',
				height : '1px',
				overflow : 'hidden'
			});

		// It's definitely a better user experience if we make the paste-bin pretty unnoticed
		// by pulling it off the screen.
		pastebin.setStyle( this.config.contentsLangDirection == 'ltr' ? 'left' : 'right', '-1000px' );

		var bms = sel.createBookmarks();

		this.on( 'selectionChange', cancel, null, null, 0 );

		// Turn off design mode temporarily before give focus to the paste bin.
		if ( mode == 'text' )
			pastebin.$.focus();
		else
		{
			range.setStartAt( pastebin, CKEDITOR.POSITION_AFTER_START );
			range.setEndAt( pastebin, CKEDITOR.POSITION_BEFORE_END );
			range.select( true );
		}

		var editor  = this;
		// Wait a while and grab the pasted contents
		window.setTimeout( function()
		{
			mode == 'text' && CKEDITOR.env.gecko && editor.focusGrabber.focus();
			pastebin.remove();
			editor.removeListener( 'selectionChange', cancel );

			// Grab the HTML contents.
			// We need to look for a apple style wrapper on webkit it also adds
			// a div wrapper if you copy/paste the body of the editor.
			// Remove hidden div and restore selection.
			var bogusSpan;
			pastebin = ( CKEDITOR.env.webkit
						 && ( bogusSpan = pastebin.getFirst() )
						 && ( bogusSpan.is && bogusSpan.hasClass( 'Apple-style-span' ) ) ?
							bogusSpan : pastebin );

			sel.selectBookmarks( bms );
			callback( pastebin[ 'get' + ( mode == 'text' ? 'Value' : 'Html' ) ]() );
		}, 0 );
	}
343051
function getScrollParent(element) {
  // Return body, `getScroll` will take care to get the correct `scrollTop` from it
  if (!element) {
    return document.body;
  }

  switch (element.nodeName) {
    case 'HTML':
    case 'BODY':
      return element.ownerDocument.body;
    case '#document':
      return element.body;
  }

  // Firefox want us to check `-x` and `-y` variations as well
  const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);
  if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
    return element;
  }

  return getScrollParent(getParentNode(element));
}
634089
function getControlIndex( dock, element ) {
        var controls = dock.controls,
            i;

        for ( i = controls.length - 1; i >= 0; i-- ) {
            if ( controls[ i ].element == element ) {
                return i;
            }
        }

        return -1;
    }
1244285
function getDebugger() {
	const isCustom = arguments.length === 1;
	const layoutDebug = isCustom ? new Debugger(arguments[0]) : defaultDebugger;
	return isCustom ? debuggerDecorator.bind(layoutDebug) : debuggerDecorator.call(layoutDebug, ...arguments);
}
1077759
def getOverlayTextureColorSpace(self, ulOverlayHandle):
        """"""

        fn = self.function_table.getOverlayTextureColorSpace
        peTextureColorSpace = EColorSpace()
        result = fn(ulOverlayHandle, byref(peTextureColorSpace))
        return result, peTextureColorSpace
1204661
function getWH(elem, name, extra) {
  if (isWindow(elem)) {
    return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
  } else if (elem.nodeType === 9) {
    return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
  }
  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
  var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;
  var computedStyle = getComputedStyleX(elem);
  var isBorderBox = isBorderBoxFn(elem, computedStyle);
  var cssBoxValue = 0;
  if (borderBoxValue == null || borderBoxValue <= 0) {
    borderBoxValue = undefined;
    // Fall back to computed then un computed css if necessary
    cssBoxValue = getComputedStyleX(elem, name);
    if (cssBoxValue == null || Number(cssBoxValue) < 0) {
      cssBoxValue = elem.style[name] || 0;
    }
    // Normalize '', auto, and prepare for extra
    cssBoxValue = parseFloat(cssBoxValue) || 0;
  }
  if (extra === undefined) {
    extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
  }
  var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
  var val = borderBoxValue || cssBoxValue;
  if (extra === CONTENT_INDEX) {
    if (borderBoxValueOrIsBorderBox) {
      return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);
    }
    return cssBoxValue;
  }
  if (borderBoxValueOrIsBorderBox) {
    var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);
    return val + (extra === BORDER_INDEX ? 0 : padding);
  }
  return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);
}
486917
function () {
    // Get the array of gamepads, the first method (getGamepads)
    // is the most modern one and is supported by Firefox 28+ and
    // Chrome 35+. The second one (webkitGetGamepads) is a deprecated method
    // used by older Chrome builds.
    var rawGamepads =
        (navigator.getGamepads && navigator.getGamepads()) ||
        (navigator.webkitGetGamepads && navigator.webkitGetGamepads());

    if (rawGamepads) {
      // We don't want to use rawGamepads coming straight from the browser,
      // since it can have "holes" (e.g. if you plug two gamepads, and then
      // unplug the first one, the remaining one will be at index [1]).
      gamepadSupport.gamepads = [];

      // We only refresh the display when we detect some gamepads are new
      // or removed; we do it by comparing raw gamepad table entries to
      // `undefined`.
      var gamepadsChanged = false;

      for (var i = 0; i < rawGamepads.length; i++) {
        if (typeof rawGamepads[i] !== gamepadSupport.prevRawGamepadTypes[i]) {
          gamepadsChanged = true;
          gamepadSupport.prevRawGamepadTypes[i] = typeof rawGamepads[i];
        }

        if (rawGamepads[i]) {
          gamepadSupport.gamepads.push(rawGamepads[i]);
        }
      }

      // Ask the tester to refresh the visual representations of gamepads
      // on the screen.
      if (gamepadsChanged) {
        window.tester.updateGamepads(gamepadSupport.gamepads);
      }
    }
  }
862828
function( cytoscape ){

    if( !cytoscape ){ return; } // can't register if cytoscape unspecified

    // Default options
    var defaults = {
      enabled: true, // Whether the extension is enabled on register
      selector: 'node', // Which elements will be affected by this extension
      speed: 1 // Speed of panning when elements exceed canvas bounds
    };

    // Merge default options with the ones coming from parameter
    function extend(defaults, options) {
      var obj = {};

      for (var i in defaults) {
        obj[i] = defaults[i];
      }

      for (var i in options) {
        obj[i] = options[i];
      }

      return obj;
    };

    // Get scratch pad reserved for this extension on the given element or the core if 'name' parameter is not set,
    // if the 'name' parameter is set then return the related property in the scratch instead of the whole scratchpad
    function getScratch (eleOrCy, name) {

        if (eleOrCy.scratch("_autopanOnDrag") === undefined) {
            eleOrCy.scratch("_autopanOnDrag", {});
        }

        var scratchPad = eleOrCy.scratch("_autopanOnDrag");

        return ( name === undefined ) ? scratchPad : scratchPad[name];
    }

    // Set the a field (described by 'name' parameter) of scratchPad (that is reserved for this extension
    // on an element or the core) to the given value (by 'val' parameter)
    function setScratch (eleOrCy, name, val) {

        var scratchPad = getScratch(eleOrCy);
        scratchPad[name] = val;
        eleOrCy.scratch("_autopanOnDrag", scratchPad);
    }

    function bindCyEvents (cy, options) {

      // check if the extension is enabled if it is return directly
      var enabled = getScratch(cy, 'enabled');

      if (enabled) {
        return;
      }

      // get eventFcns from the scratch pad, this object is empty
      // or each property of it will be overridden inside this function
      var eventFcns = getScratch(cy, 'eventFcns');

      // get user options from the scratch pad
      var options = getScratch(cy, 'options');

      cy.on('tapstart', options.selector, eventFcns.tapstartFcn = function() {
        var node = this;
        
        var renderedPosition = node.renderedPosition();
        var renderedWidth = node.renderedWidth();
        var renderedHeight = node.renderedHeight();
        
        var maxRenderedX = cy.width();
        var maxRenderedY = cy.height();
        
        var topLeftRenderedPosition = {
          x: renderedPosition.x - renderedWidth / 2,
          y: renderedPosition.y - renderedHeight / 2
        };

        var bottomRightRenderedPosition = {
          x: renderedPosition.x + renderedWidth / 2,
          y: renderedPosition.y + renderedHeight / 2
        };
        
        var exceed = false;
        
        if( ( bottomRightRenderedPosition.x >= maxRenderedX ) || ( topLeftRenderedPosition.x <= 0 )
                || ( bottomRightRenderedPosition.y >= maxRenderedY ) || ( topLeftRenderedPosition.y <= 0 ) ){
          exceed = true;
        }
        
        if( !exceed ) {
          // save the node who is currently being dragged to the scratch pad
          setScratch(cy, 'currentNode', node);
        }
        
      });

      cy.on('tapdrag', eventFcns.tapdragFcn = function() {

        // get the node who is currently being dragged from scratch pad
        var currentNode = getScratch(cy, 'currentNode');

        if(currentNode === undefined) {
          return;
        }
        
        var newRenderedPosition = currentNode.renderedPosition();
        var renderedWidth = currentNode.renderedWidth();
        var renderedHeight = currentNode.renderedHeight();
        
        var maxRenderedX = cy.width();
        var maxRenderedY = cy.height();

        var topLeftRenderedPosition = {
          x: newRenderedPosition.x - renderedWidth / 2,
          y: newRenderedPosition.y - renderedHeight / 2
        };

        var bottomRightRenderedPosition = {
          x: newRenderedPosition.x + renderedWidth / 2,
          y: newRenderedPosition.y + renderedHeight / 2
        };
       
        var exceedX;
        var exceedY;
        
        if(bottomRightRenderedPosition.x >= maxRenderedX) {
          exceedX = -bottomRightRenderedPosition.x + maxRenderedX;
        }
        
        if(topLeftRenderedPosition.x <= 0) {
          exceedX = -topLeftRenderedPosition.x;
        }
        
        if(bottomRightRenderedPosition.y >= maxRenderedY ) {
          exceedY = -bottomRightRenderedPosition.y + maxRenderedY;
        }
        
        if(topLeftRenderedPosition.y <= 0) {
          exceedY = -topLeftRenderedPosition.y;
        }
        
        if(exceedX) {
          cy.panBy({x: exceedX * options.speed});
        }
        
        if(exceedY) {
          cy.panBy({y: exceedY * options.speed});
        }
      });

      cy.on('tapend', eventFcns.tapendFcn = function() {
        // unset the currently dragged node on scratch pad
        setScratch(cy, 'currentNode', undefined);
      });

      // save the eventFcns on scratch pad
      setScratch(cy, 'eventFcns', eventFcns);

      // mark that the extension is enabled now
      setScratch(cy, 'enabled', true);
    }

    function unbindCyEvents (cy) {

      // check if the extension is enabled if it is not return directly
      var enabled = getScratch(cy, 'enabled');

      if (!enabled) {
        return;
      }

      var eventFcns = getScratch(cy, 'eventFcns');
      var options = getScratch(cy, 'options');

      cy.off('tapstart', options.selector, eventFcns.tapstartFcn);
      cy.off('tapdrag', eventFcns.tapdragFcn);
      cy.off('tapend', eventFcns.tapendFcn);

      // mark that the extension is disabled now
      setScratch(cy, 'enabled', undefined);
    }
    
    cytoscape( 'core', 'autopanOnDrag', function(opts){

      var cy = this;

      // use the existing eventFcns if exists or create a new object for them
      var eventFcns = getScratch(cy, 'eventFcns') || {};

      // save eventFcns on scratch pad
      setScratch(cy, 'eventFcns', eventFcns);

      if(opts !== 'get') {
        // merge the options with existing ones
        var options = extend(defaults, opts);

        // save options to the scratch pad
        setScratch(cy, 'options', options);

        // if enabled option is set bind events for the cy instance
        if(options.enabled) {

          // bind the events
          bindCyEvents(cy);

          // mark that the extension is enabled
          setScratch(cy, 'enabled', true);
        }
      }

      // return the extension api
      return {
        enable: function() {
          bindCyEvents(cy);
        },
        disable: function() {
          unbindCyEvents(cy);
        }
      };

    });

  }
334507
function getPermissionX(dragTd, evt) {
        var ut = getUETable(dragTd);
        if (ut) {
            var preTd = ut.getSameEndPosCells(dragTd, "x")[0],
                nextTd = ut.getSameStartPosXCells(dragTd)[0],
                mouseX = mouseCoords(evt).x,
                left = (preTd ? domUtils.getXY(preTd).x : domUtils.getXY(ut.table).x) + 20 ,
                right = nextTd ? domUtils.getXY(nextTd).x + nextTd.offsetWidth - 20 : (me.body.offsetWidth + 5 || parseInt(domUtils.getComputedStyle(me.body, "width"), 10));

            left += cellMinWidth;
            right -= cellMinWidth;

            return mouseX < left ? left : mouseX > right ? right : mouseX;
        }
    }
197253
function getSupportedPropertyName(property) {
  const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
  const upperProp = property.charAt(0).toUpperCase() + property.slice(1);

  for (let i = 0; i < prefixes.length; i++) {
    const prefix = prefixes[i];
    const toCheck = prefix ? `${prefix}${upperProp}` : property;
    if (typeof document.body.style[toCheck] !== 'undefined') {
      return toCheck;
    }
  }
  return null;
}