Handler for linkclick messages
@returns {void}
@private
776319
function handleLinkClick(data) {
        var event = api.fire('linkclick', data);
        if (!event.isDefaultPrevented()) {
            if (data.uri) {
                window.open(data.uri);
            } else if (data.destination) {
                api.scrollTo(data.destination.pagenum);
            }
        }
    }
903760
function delegate (event) {
      if (!linkInPage(event.target)) {
        return;
      } else {
        event.preventDefault();
        event.stopPropagation();

        // Get element id:
        link = event.target.attributes.href.value.toString();
        elementId = link.substr(link.lastIndexOf('#') + 1);

        // Get values for the next scroll:
        if (element = document.getElementById(elementId)) {
          start = pageOffset();
          stop = top(element, start);
          distance = stop - start - settings.offset;

          if (settings.type === 'speed') {
            duration = Math.abs(distance / settings.speed) * 1000;
          } else if (settings.type === 'time') {
            duration = settings.time;
          }
        }

        // Start render:
        window.requestAnimationFrame(function (currentTime) {
          startTime = currentTime;
          render(currentTime);
        });
      }
    }
751054
function linkAreaSwitch(status)
			{
				// remove all pre-link attribute (mark as "link will be added")
				clearSetElement("["+setdatalink+"]:not([href])");
				jQTE.find("["+setdatalink+"][href]").removeAttr(setdatalink);
				
				if(status)
				{
					toolbar.data("linkOpened",true);
					linkform.show();
				}
				else
				{ 
					toolbar.data("linkOpened",false);
					linkform.hide();
				}
				
				linktypeSwitch();
			}
800655
function log(...messages) {
  console.log(...messages);
  const p = document.createElement('p');
  p.innerText = messages.join(' ');
  logElement.appendChild(p);
}
153700
function handleReSort(link) {
    var classes = link.attr('class').split(/\s+/);
    for (var i=0; i<classes.length; i++) {
      if (classes[i] != 'sort-option') {
	by = classes[i].substring(2);
      }
    }
    setComparator();
    // Save/update the sortBy cookie.
    var expiration = new Date();
    expiration.setDate(expiration.getDate() + 365);
    document.cookie= 'sortBy=' + escape(by) +
                     ';expires=' + expiration.toUTCString();
    $('ul.comment-ul').each(function(index, ul) {
      var comments = getChildren($(ul), true);
      comments = sortComments(comments);
      appendComments(comments, $(ul).empty());
    });
  }
199612
function onDocumentClick(event) {
        var element = event.target;
        if (element && element.hasAttribute('data-brackets-id')) {
            MessageBroker.send({"tagId": element.getAttribute('data-brackets-id')});
        }
    }
556258
function onAnchorClick(e) {
    var event = e || global.event;
    var target = anchorTarget(event.target || event.srcElement);
    var defaultPrevented = "defaultPrevented" in event ? event['defaultPrevented'] : event.returnValue === false;
    if (target && target.nodeName === "A" && !defaultPrevented) {
      var current = parseURL();
      var expect = parseURL(target.getAttribute("href", 2));
      var isEqualBaseURL = current._href.split('#').shift() === expect._href.split('#').shift();
      if (isEqualBaseURL && expect._hash) {
        if (current._hash !== expect._hash) {
          locationObject.hash = expect._hash;
        }
        scrollToAnchorId(expect._hash);
        if (event.preventDefault) {
          event.preventDefault();
        } else {
          event.returnValue = false;
        }
      }
    }
  }
823524
function handleIncomingMessage(data) {
		var message;
		reader.parse(data, initPending);
		initPending = false;
		while (!reader.isEmpty()) {
			message = reader.pop();
			// console.log("IN MESSAGE: " + inspect(message));
			// Check if there are listeners attached to the event
			// otherwise falls back to the default handler
			if (that.listeners(message.verb).length) {
				handlers[message.verb](message);
			} else {
				defHandlers[message.verb].call(that, message);
			}
		}
	}
1154635
function _messageWorker(message, callback) {
    const worker = _getWorker();

    function _listen(e) {
        if (e.data.id === message.id) {
            callback(e.data);
            worker.removeEventListener('message', _listen);
        }
    }

    worker.addEventListener('message', _listen);
    worker.postMessage(message);
}
1267496
function clckHlpr(i) {
    addEvent(i, 'click', function (e) {
      stopPropagation(e);
      preventDefault(e);
      currGroup = getAttr(i, _const_dataattr + '-group') || false;
      currThumbnail = i;
      openBox(i, false, false, false);
    }, false);
  }
1019358
function btnOnClick(e, opts, callback, target, k) {
        var that = void 0;
        if (e.srcElement) e.target = e.srcElement;

        target = U.findParentNode(e.target, function (target) {
          if (target.getAttribute("data-modal-header-btn")) {
            return true;
          }
        });

        if (target) {
          k = target.getAttribute("data-modal-header-btn");

          that = {
            self: this,
            key: k,
            value: opts.header.btns[k],
            dialogId: opts.id,
            btnTarget: target
          };

          if (opts.header.btns[k].onClick) {
            opts.header.btns[k].onClick.call(that, k);
          }
        }

        that = null;
        opts = null;
        callback = null;
        target = null;
        k = null;
      }
1014907
@UiHandler("m_opener")
    protected void handleClick(ClickEvent e) {

        if (m_animation != null) {
            m_animation.cancel();
        }
        if (!m_opened) {

            // show content
            setOpen(true);

            m_animation = CmsSlideAnimation.slideIn(m_content.getElement(), new Command() {

                /**
                 * @see com.google.gwt.user.client.Command#execute()
                 */
                public void execute() {

                    OpenEvent.fire(CmsFieldSet.this, CmsFieldSet.this);
                    CmsDomUtil.resizeAncestor(getParent());
                }
            }, m_animationDuration);
        } else {

            // hide content
            m_animation = CmsSlideAnimation.slideOut(m_content.getElement(), new Command() {

                /**
                 * @see com.google.gwt.user.client.Command#execute()
                 */
                public void execute() {

                    setOpen(false);
                    CloseEvent.fire(CmsFieldSet.this, CmsFieldSet.this);
                    CmsDomUtil.resizeAncestor(getParent());
                }
            }, m_animationDuration);
        }
    }
773706
function () {
                this.$assert(859, this._listenersStopped === true);
                this._listenersStopped = false;
                var bindings = this._bindings;
                if (bindings) {
                    for (var index = 0, bind; bind = bindings[index]; index++) {
                        this.__json.addListener(bind.inside, bind.to, bind.callback, true, bind.recursive);
                    }
                }
            }
158687
function checkboxHandler (event) {
    const target = event.target;

    if (target.checked) {
      link.style.display = 'none';
      if (upload.value) {
        upload.value = '';
        link = clear(link);
      }
    }
    else {
      link.style.display = '';
    }
  }
1267402
function() {
			var Klass = this;
			if(Klass.autoBind){
				var $autobound = $(Klass.autoBind);
				/* Bind existing elements */
				$autobound.each(function(){
					Klass.attach($(this));
				});
				/* If a click propagates to the document level, then we have an item that was added later on */
				$(document).on('click', Klass.autoBind, function(evt) {
					if (evt.isDefaultPrevented()) {
						return;
					}
					var $cur = $(evt.currentTarget);
					var len = $autobound.length;
					$autobound = $autobound.add($cur);
					if(len === $autobound.length) {
						return; /* already bound */
					}
					/* Bind featherlight */
					var data = Klass.attach($cur);
					/* Dispatch event directly */
					if (!data.filter || $(evt.target).parentsUntil($cur, data.filter).length > 0) {
						data.handler(evt);
					}
				});
			}
		}
1263721
function(e) {
		//Only handle left click.
		if(e.which !== 1 && e.button !== 0) {
			return;
		}

		var link = findParentLink(e.target);

		//The click did not happen inside a link.
		if(!link) {
			return;
		}

		if(handleLink(link)) {
			e.preventDefault();
		}
	}
321235
function(l) {
    debug('Attaching link ' + l.name + ':' + l.handle + ' after begin received');
    if (l.state() !== 'attached' && l.state() !== 'attaching') l.attach();
  }