code
stringlengths
12
2.05k
label_name
stringclasses
5 values
label
int64
0
4
$controller = new $ctlname(); if (method_exists($controller,'isSearchable') && $controller->isSearchable()) { // $mods[$controller->name()] = $controller->addContentToSearch(); $mods[$controller->searchName()] = $controller->addContentToSearch(); } } uksort($mods,'strnatcasecmp'); assign_to_template(array( 'mods'=>$mods )); }
Base
1
public function withHeader($header, $value) { /** @var Request $newInstance */ $newInstance = $this->withParentHeader($header, $value); return $newInstance; }
Base
1
foreach ($evs as $key=>$event) { if ($condense) { $eventid = $event->id; $multiday_event = array_filter($events, create_function('$event', 'global $eventid; return $event->id === $eventid;')); if (!empty($multiday_event)) { unset($evs[$key]); continue; } } $evs[$key]->eventstart += $edate->date; $evs[$key]->eventend += $edate->date; $evs[$key]->date_id = $edate->id; if (!empty($event->expCat)) { $catcolor = empty($event->expCat[0]->color) ? null : trim($event->expCat[0]->color); // if (substr($catcolor,0,1)=='#') $catcolor = '" style="color:'.$catcolor.';'; $evs[$key]->color = $catcolor; } }
Base
1
function login($redirectCallback = null) { $aConf = $GLOBALS['_MAX']['CONF']; if (!is_callable($redirectCallback)) { // Set the default callback $redirectCallback = array('OA_Auth', 'checkRedirect'); } if (call_user_func($redirectCallback)) { header('location: http://'.$aConf['webpath']['admin']); exit(); } if (defined('OA_SKIP_LOGIN')) { return OA_Auth::getFakeSessionData(); } if (OA_Auth::suppliedCredentials()) { $doUser = OA_Auth::authenticateUser(); if (!$doUser) { sleep(3); OA_Auth::restart($GLOBALS['strUsernameOrPasswordWrong']); } return OA_Auth::getSessionData($doUser); } OA_Auth::restart(); }
Class
2
public function testOnKernelResponseWithoutSession() { $tokenStorage = new TokenStorage(); $tokenStorage->setToken(new UsernamePasswordToken('test1', 'pass1', 'phpunit')); $request = new Request(); $request->attributes->set('_security_firewall_run', true); $session = new Session(new MockArraySessionStorage()); $request->setSession($session); $event = new ResponseEvent( $this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_REQUEST, new Response() ); $listener = new ContextListener($tokenStorage, [], 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); $this->assertTrue($session->isStarted()); }
Class
2
private function checkAuthenticationTag() { if ($this->authentication_tag === $this->calculateAuthenticationTag()) { return true; } else { throw new JOSE_Exception_UnexpectedAlgorithm('Invalid authentication tag'); } }
Class
2
public function getQuerySelect() { // SubmittedOn is stored in the artifact return "a.submitted_by AS `" . $this->name . "`"; }
Base
1
public function confirm() { $project = $this->getProject(); $filter = $this->customFilterModel->getById($this->request->getIntegerParam('filter_id')); $this->response->html($this->helper->layout->project('custom_filter/remove', array( 'project' => $project, 'filter' => $filter, 'title' => t('Remove a custom filter') ))); }
Base
1
public function Recipient($to) { $this->error = null; // so no confusion is caused if(!$this->connected()) { $this->error = array( "error" => "Called Recipient() without being connected"); return false; } fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); $rply = $this->get_lines(); $code = substr($rply,0,3); if($this->do_debug >= 2) { $this->edebug("SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />'); } if($code != 250 && $code != 251) { $this->error = array("error" => "RCPT not accepted from server", "smtp_code" => $code, "smtp_msg" => substr($rply,4)); if($this->do_debug >= 1) { $this->edebug("SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />'); } return false; } return true; }
Base
1
public function store(CreateAppointmentCalendarRequest $request) { $client_id = null; $user = User::where('external_id', $request->user)->first(); if ($request->client_external_id) { $client_id = Client::where('external_id', $request->client_external_id)->first()->id; if (!$client_id) { return response(__("Client not found"), 422); } } $request_type = null; $request_id = null; if ($request->source_type && $request->source_external_id) { $request_type = $request->source_type; $entry = $request_type::whereExternalId($request->source_external_id); $request_id = $entry->id; } if (!$user) { return response(__("User not found"), 422); } $startTime = str_replace(["am", "pm", ' '], "", $request->start_time) . ':00'; $endTime = str_replace(["am", "pm", ' '], "", $request->end_time) . ':00'; $appointment = Appointment::create([ 'external_id' => Uuid::uuid4()->toString(), 'source_type' => $request_type, 'source_id' => $request_id, 'client_id' => $client_id, 'title' => $request->title, 'start_at' => Carbon::parse($request->start_date . " " . $startTime), 'end_at' => Carbon::parse($request->end_date . " " . $endTime), 'user_id' => $user->id, 'color' => $request->color ]); $appointment->user_external_id = $user->external_id; $appointment->start_at = $appointment->start_at; return response($appointment); }
Class
2
public function execute(&$params) { $options = $this->config['options']; $action = new Actions; $action->subject = $this->parseOption('subject',$params); $action->dueDate = $this->parseOption('dueDate',$params); $action->actionDescription = $this->parseOption('description',$params); $action->priority = $this->parseOption('priority',$params); $action->visibility = $this->parseOption('visibility',$params); if(isset($params['model'])) $action->assignedTo = $this->parseOption('assignedTo',$params); // if(isset($this->config['attributes'])) // $this->setModelAttributes($action,$this->config['attributes'],$params); if ($action->save()) { return array ( true, Yii::t('studio', "View created action: ").$action->getLink ()); } else { return array(false, array_shift($action->getErrors())); } // if($this->parseOption('reminder',$params)) { // $notif=new Notification; // $notif->modelType='Actions'; // $notif->createdBy=Yii::app()->user->getName(); // $notif->modelId=$model->id; // if($_POST['notificationUsers']=='me'){ // $notif->user=Yii::app()->user->getName(); // }else{ // $notif->user=$model->assignedTo; // } // $notif->createDate=$model->dueDate-($_POST['notificationTime']*60); // $notif->type='action_reminder'; // $notif->save(); // if($_POST['notificationUsers']=='both' && Yii::app()->user->getName()!=$model->assignedTo){ // $notif2=new Notification; // $notif2->modelType='Actions'; // $notif2->createdBy=Yii::app()->user->getName(); // $notif2->modelId=$model->id; // $notif2->user=Yii::app()->user->getName(); // $notif2->createDate=$model->dueDate-($_POST['notificationTime']*60); // $notif2->type='action_reminder'; // $notif2->save(); // } // } }
Base
1
public function delete() { global $user; $count = $this->address->find('count', 'user_id=' . $user->id); if($count > 1) { $address = new address($this->params['id']); if ($user->isAdmin() || ($user->id == $address->user_id)) { if ($address->is_billing) { $billAddress = $this->address->find('first', 'user_id=' . $user->id . " AND id != " . $address->id); $billAddress->is_billing = true; $billAddress->save(); } if ($address->is_shipping) { $shipAddress = $this->address->find('first', 'user_id=' . $user->id . " AND id != " . $address->id); $shipAddress->is_shipping = true; $shipAddress->save(); } parent::delete(); } } else { flash("error", gt("You must have at least one address.")); } expHistory::back(); }
Class
2
function test_username_avoids_anon_flow() { add_filter( 'xmlrpc_allow_anonymous_comments', '__return_true' ); $comment_args = array( 1, 'administrator', 'administrator', self::$post->ID, array( 'author' => 'WordPress', 'author_email' => 'noreply at wordpress.org', 'content' => 'Test Anon Comments', ), ); $result = $this->myxmlrpcserver->wp_newComment( $comment_args ); $comment = get_comment( $result ); $user_id = get_user_by( 'login', 'administrator' )->ID; $this->assertSame( $user_id, (int) $comment->user_id ); }
Class
2
protected function getNewShopUrl(Request $request, Shop $newShop) { // Remove baseUrl from request url $url = $request->getRequestUri(); $repository = $this->get(ModelManager::class)->getRepository(Shop::class); $requestShop = $repository->getActiveShopByRequestAsArray($request); if ($requestShop && strpos($url, $requestShop['base_url']) === 0) { $url = substr($url, \strlen($requestShop['base_url'])); } $baseUrl = $request->getBaseUrl(); if (strpos($url, $baseUrl . '/') === 0) { $url = substr($url, \strlen($baseUrl)); } $basePath = (string) $newShop->getBasePath(); if (strpos($url, $basePath) === 0) { $url = substr($url, \strlen($basePath)); } $host = $newShop->getHost(); $baseUrl = $newShop->getBaseUrl() ?: $request->getBasePath(); if ($request->isSecure()) { if ($newShop->getBaseUrl()) { $baseUrl = $newShop->getBaseUrl(); } else { $baseUrl = $request->getBaseUrl(); } } $host = trim($host, '/'); $baseUrl = trim($baseUrl, '/'); if (!empty($baseUrl)) { $baseUrl = '/' . $baseUrl; } $url = ltrim($url, '/'); if (!empty($url)) { $url = '/' . $url; } //build full redirect url to allow host switches return sprintf( '%s://%s%s%s', $request->getScheme(), $host, $baseUrl, $url ); }
Base
1
public function save() { $project = $this->getProject(); $values = $this->request->getValues(); list($valid, $errors) = $this->categoryValidator->validateCreation($values); if ($valid) { if ($this->categoryModel->create($values) !== false) { $this->flash->success(t('Your category have been created successfully.')); $this->response->redirect($this->helper->url->to('CategoryController', 'index', array('project_id' => $project['id'])), true); return; } else { $errors = array('name' => array(t('Another category with the same name exists in this project'))); } } $this->create($values, $errors); }
Base
1
private function catchWarning ($errno, $errstr, $errfile, $errline) { $this->error[] = array( 'error' => "Connecting to the POP3 server raised a PHP warning: ", 'errno' => $errno, 'errstr' => $errstr ); }
Class
2
protected function execute(InputInterface $input, OutputInterface $output) { /** @psalm-suppress PossiblyNullReference */ $command = $this->getApplication()->find('db:check'); $arguments = array( 'command' => 'db:check', ); $cmdInput = new ArrayInput($arguments); $returnCode = $command->run($cmdInput, $output); if ($returnCode === 1) { $output->writeln(array( 'Database update starting', '========================', )); $Config = Config::getConfig(); $Update = new Update($Config, new Sql()); $Update->runUpdateScript(); $output->writeln('All done.'); } return 0; }
Base
1
function _makeChooseCheckbox($value, $title) { // return '<INPUT type=checkbox name=st_arr[] value=' . $value . ' checked>'; global $THIS_RET; return "<input name=unused[$THIS_RET[STUDENT_ID]] value=" . $THIS_RET[STUDENT_ID] . " type='checkbox' id=$THIS_RET[STUDENT_ID] onClick='setHiddenCheckboxStudents(\"st_arr[]\",this,$THIS_RET[STUDENT_ID]);' />"; }
Base
1
static function description() { return gt("Places navigation links/menus on the page."); }
Base
1
protected function _draft_or_post_title( $post = 0 ) { $title = get_the_title( $post ); if ( empty( $title ) ) $title = __( '(no title)', 'aryo-activity-log' ); return $title; }
Base
1
public function handle($stanza, $parent = false) { $message = $stanza->forwarded->message; $jid = explode('/',(string)$message->attributes()->from); $to = current(explode('/',(string)$message->attributes()->to)); if($message->composing) $this->event('composing', array($jid[0], $to)); if($message->paused) $this->event('paused', array($jid[0], $to)); if($message->gone) $this->event('gone', array($jid[0], $to)); if($message->body || $message->subject) { $m = new \Modl\Message; $m->set($message, $stanza->forwarded); if(!preg_match('#^\?OTR#', $m->body)) { $md = new \Modl\MessageDAO; $md->set($m); $this->pack($m); $this->deliver(); } } }
Class
2
public function get_view_config() { global $template; // set paths we will search in for the view $paths = array( BASE.'themes/'.DISPLAY_THEME.'/modules/common/views/file/configure', BASE.'framework/modules/common/views/file/configure', ); foreach ($paths as $path) { $view = $path.'/'.$this->params['view'].'.tpl'; if (is_readable($view)) { if (bs(true)) { $bstrapview = $path.'/'.$this->params['view'].'.bootstrap.tpl'; if (file_exists($bstrapview)) { $view = $bstrapview; } } if (bs3(true)) { $bstrapview = $path.'/'.$this->params['view'].'.bootstrap3.tpl'; if (file_exists($bstrapview)) { $view = $bstrapview; } } $template = new controllertemplate($this, $view); $ar = new expAjaxReply(200, 'ok'); $ar->send(); } } }
Class
2
protected function getParentNotExistsService() { return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists(); }
Base
1
public function uploadAvatar(Request $request) { $user = auth()->user(); if ($user && $request->hasFile('admin_avatar')) { $user->clearMediaCollection('admin_avatar'); $user->addMediaFromRequest('admin_avatar') ->toMediaCollection('admin_avatar'); } if ($user && $request->has('avatar')) { $data = json_decode($request->avatar); $user->clearMediaCollection('admin_avatar'); $user->addMediaFromBase64($data->data) ->usingFileName($data->name) ->toMediaCollection('admin_avatar'); } return new UserResource($user); }
Base
1
public function manage() { expHistory::set('manageable',$this->params); $gc = new geoCountry(); $countries = $gc->find('all'); $gr = new geoRegion(); $regions = $gr->find('all',null,'rank asc,name asc'); assign_to_template(array( 'countries'=>$countries, 'regions'=>$regions )); }
Base
1
function singleQuoteReplace($param1 = false, $param2 = false, $param3) { return str_replace("'", "''", str_replace("\'", "'", $param3)); }
Base
1
static function searchUser(AuthLDAP $authldap) { if (self::connectToServer($authldap->getField('host'), $authldap->getField('port'), $authldap->getField('rootdn'), Toolbox::decrypt($authldap->getField('rootdn_passwd'), GLPIKEY), $authldap->getField('use_tls'), $authldap->getField('deref_option'))) { self::showLdapUsers(); } else { echo "<div class='center b firstbloc'>".__('Unable to connect to the LDAP directory'); } }
Base
1
function edit() { global $template; parent::edit(); $allforms = array(); $allforms[""] = gt('Disallow Feedback'); // calculate which event date is the one being edited $event_key = 0; foreach ($template->tpl->tpl_vars['record']->value->eventdate as $key=>$d) { if ($d->id == $this->params['date_id']) $event_key = $key; } assign_to_template(array( 'allforms' => array_merge($allforms, expTemplate::buildNameList("forms", "event/email", "tpl", "[!_]*")), 'checked_date' => !empty($this->params['date_id']) ? $this->params['date_id'] : null, 'event_key' => $event_key, )); }
Base
1
public function validate() { global $db; // check for an sef url field. If it exists make sure it's valid and not a duplicate //this needs to check for SEF URLS being turned on also: TODO if (property_exists($this, 'sef_url') && !(in_array('sef_url', $this->do_not_validate))) { if (empty($this->sef_url)) $this->makeSefUrl(); if (!isset($this->validates['is_valid_sef_name']['sef_url'])) $this->validates['is_valid_sef_name']['sef_url'] = array(); if (!isset($this->validates['uniqueness_of']['sef_url'])) $this->validates['uniqueness_of']['sef_url'] = array(); } // safeguard again loc data not being pass via forms...sometimes this happens when you're in a router // mapped view and src hasn't been passed in via link to the form if (isset($this->id) && empty($this->location_data)) { $loc = $db->selectValue($this->tablename, 'location_data', 'id=' . $this->id); if (!empty($loc)) $this->location_data = $loc; } // run the validation as defined in the models if (!isset($this->validates)) return true; $messages = array(); $post = empty($_POST) ? array() : expString::sanitize($_POST); foreach ($this->validates as $validation=> $field) { foreach ($field as $key=> $value) { $fieldname = is_numeric($key) ? $value : $key; $opts = is_numeric($key) ? array() : $value; $ret = expValidator::$validation($fieldname, $this, $opts); if (!is_bool($ret)) { $messages[] = $ret; expValidator::setErrorField($fieldname); unset($post[$fieldname]); } } } if (count($messages) >= 1) expValidator::failAndReturnToForm($messages, $post); }
Base
1
public function testPutRoutes($uri, $expectedVersion, $expectedController, $expectedAction, $expectedId, $expectedCode) { $request = new Enlight_Controller_Request_RequestTestCase(); $request->setMethod('PUT'); $response = new Enlight_Controller_Response_ResponseTestCase(); $request->setPathInfo($uri); $this->router->assembleRoute($request, $response); static::assertEquals($expectedController, $request->getControllerName()); static::assertEquals($expectedAction, $request->getActionName()); static::assertEquals($expectedVersion, $request->getParam('version')); static::assertEquals($expectedId, $request->getParam('id')); static::assertEquals($expectedCode, $response->getHttpResponseCode()); }
Base
1
public static function go($input, $path, $allowed='', $uniq=false, $size='', $width = '', $height = ''){ $filename = Typo::cleanX($_FILES[$input]['name']); $filename = str_replace(' ', '_', $filename); if(isset($_FILES[$input]) && $_FILES[$input]['error'] == 0){ if($uniq == true){ $uniqfile = sha1(microtime().$filename); }else{ $uniqfile = ''; } $extension = pathinfo($_FILES[$input]['name'], PATHINFO_EXTENSION); $filetmp = $_FILES[$input]['tmp_name']; $filepath = GX_PATH.$path.$uniqfile.$filename; if(!in_array(strtolower($extension), $allowed)){ $result['error'] = 'File not allowed'; }else{ if(move_uploaded_file( $filetmp, $filepath) ){ $result['filesize'] = filesize($filepath); $result['filename'] = $uniqfile.$filename; $result['path'] = $path.$uniqfile.$filename; $result['filepath'] = $filepath; $result['fileurl'] = Options::get('siteurl').$path.$uniqfile.$filename; }else{ $result['error'] = 'Cannot upload to directory, please check if directory is exist or You had permission to write it.'; } } }else{ //$result['error'] = $_FILES[$input]['error']; $result['error'] = ''; } return $result; }
Base
1
protected function getSubtask() { $subtask = $this->subtaskModel->getById($this->request->getIntegerParam('subtask_id')); if (empty($subtask)) { throw new PageNotFoundException(); } return $subtask; }
Base
1
$this->subtaskTimeTrackingModel->logEndTime($subtaskId, $this->userSession->getId()); $this->subtaskTimeTrackingModel->updateTaskTimeTracking($task['id']); }
Base
1
public function confirm() { $project = $this->getProject(); $swimlane = $this->getSwimlane(); $this->response->html($this->helper->layout->project('swimlane/remove', array( 'project' => $project, 'swimlane' => $swimlane, ))); }
Base
1
public function manage_sitemap() { global $db, $user, $sectionObj, $sections; expHistory::set('viewable', $this->params); $id = $sectionObj->id; $current = null; // all we need to do is determine the current section $navsections = $sections; if ($sectionObj->parent == -1) { $current = $sectionObj; } else { foreach ($navsections as $section) { if ($section->id == $id) { $current = $section; break; } } } assign_to_template(array( 'sasections' => $db->selectObjects('section', 'parent=-1'), 'sections' => $navsections, 'current' => $current, 'canManage' => ((isset($user->is_acting_admin) && $user->is_acting_admin == 1) ? 1 : 0), )); }
Class
2
static function convertUTF($string) { return $string = str_replace('?', '', htmlspecialchars($string, ENT_IGNORE, 'UTF-8')); }
Base
1
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
Class
2
(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,E,J,T,N,Q,R,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Ha=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Ha=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
Class
2
l.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[f[K]])}}finally{l.getModel().endUpdate()}});N.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(K){13==K.keyCode&&N.click()});u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(d),u.appendChild(N)):(u.appendChild(N),u.appendChild(d));t.appendChild(u);this.container=t},LibraryDialog=function(b,f,l,d,t,u){function E(B){for(B=document.elementFromPoint(B.clientX, B.clientY);null!=B&&B.parentNode!=v;)B=B.parentNode;var G=null;if(null!=B){var M=v.firstChild;for(G=0;null!=M&&M!=B;)M=M.nextSibling,G++}return G}function c(B,G,M,H,F,J,R,W,O){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==B&&null!=R||null==z[B]){var V=function(){P.innerHTML="";P.style.cursor="pointer";P.style.whiteSpace="nowrap";P.style.textOverflow="ellipsis";mxUtils.write(P,null!=T.title&&0<T.title.length?T.title:mxResources.get("untitled"));P.style.color=null==T.title||0==
Base
1
Mocha.prototype.useColors = function(colors){ this.options.useColors = arguments.length && colors != undefined ? colors : true; return this; };
Base
1
function createConnection(options, cb) { var srcIP = (options && options.localAddress) || this._defaultSrcIP; var srcPort = (options && options.localPort) || 0; var dstIP = options.host; var dstPort = options.port; if (Client === undefined) Client = require('./client').Client; var client = new Client(); var triedForward = false; client.on('ready', () => { client.forwardOut(srcIP, srcPort, dstIP, dstPort, (err, stream) => { triedForward = true; if (err) { client.end(); return cb(err); } stream.once('close', () => { client.end(); }); cb(null, decorateStream(stream)); }); }).on('error', cb).on('close', () => { if (!triedForward) cb(new Error('Unexpected connection loss')); }).connect(this._connectCfg); }
Base
1
function Id(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function Jd(a,b,c){var d={mm:b?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===c?b?"минута":"минуту":a+" "+Id(d[c],+a)}function Kd(a){return a>1&&5>a}function Ld(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"pár sekúnd":"pár sekundami";case"m":return b?"minúta":d?"minútu":"minútou";case"mm":return b||d?e+(Kd(a)?"minúty":"minút"):e+"minútami";break;case"h":return b?"hodina":d?"hodinu":"hodinou";case"hh":return b||d?e+(Kd(a)?"hodiny":"hodín"):e+"hodinami";break;case"d":return b||d?"deň":"dňom";case"dd":return b||d?e+(Kd(a)?"dni":"dní"):e+"dňami";break;case"M":return b||d?"mesiac":"mesiacom";case"MM":return b||d?e+(Kd(a)?"mesiace":"mesiacov"):e+"mesiacmi";break;case"y":return b||d?"rok":"rokom";case"yy":return b||d?e+(Kd(a)?"roky":"rokov"):e+"rokmi"}}
Base
1
!this.editor.editable&&(A.getHash=function(){return"G"+x},window.location.hash="#"+A.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=k,z=k.lastIndexOf("."),L=A.lastIndexOf("/");z>L&&0<L&&(A=A.substring(L+1,z),z=k.substring(z),
Class
2
module.exports.commit = function (files, message, newVer, tagName, callback) { message = message.replace('%s', newVer).replace('"', '').replace("'", ''); files = files.map(function (file) { return '"' + escapeQuotes(file) + '"'; }).join(' '); var functionSeries = [ function (done) { cp.exec(gitApp + ' add ' + files, gitExtra, done); }, function (done) { cp.exec([gitApp, 'commit', '-m', '"' + message + '"'].join(' '), gitExtra, done); }, function (done) { cp.exec( [ gitApp, 'tag', '-a', tagName, '-m', '"' + message + '"' ].join(' '), gitExtra, done ); } ]; contra.series(functionSeries, callback); };
Class
2
internals.parseOutput = function (output) { const lines = output.split('\n'); const hops = []; lines.shift(); lines.pop(); if (internals.isWin) { for (let i = 0; i < lines.length; ++i) { if (/^\s+1/.test(lines[i])) { break; } } lines.splice(0,i); lines.pop(); lines.pop(); } for (let i = 0; i < lines.length; ++i) { hops.push(internals.parseHop(lines[i])); } return hops; };
Class
2
null!=sa[ra]&&(ra=sa[ra]);ra={url:pa.getAttribute("url"),libs:pa.getAttribute("libs"),title:pa.getAttribute("title"),tooltip:pa.getAttribute("name")||pa.getAttribute("url"),preview:pa.getAttribute("preview"),clibs:ra,tags:pa.getAttribute("tags")};wa.push(ra);null!=ya&&(wa=Ba[va],null==wa&&(wa={},Ba[va]=wa),va=wa[ya],null==va&&(va=[],wa[ya]=va),va.push(ra))}pa=pa.nextSibling}S.stop();B()}})};G.appendChild(ea);G.appendChild(Aa);G.appendChild(Z);var ta=!1,ka=k;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&
Class
2
'" y="'+p.y.toFixed(2)+'"/>'):V+('<line x="'+p.x.toFixed(2)+'" y="'+p.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){E=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;X=b.view.translate;E=new mxCell("",new mxGeometry(H/V-X.x,U/V-X.y,J/V,S/V),E);E.vertex=1;b.model.beginUpdate();try{E=b.addCell(E),b.fireEvent(new mxEventObject("cellsInserted","cells",[E])),b.fireEvent(new mxEventObject("freehandInserted","cell",E))}finally{b.model.endUpdate()}z&& b.setSelectionCells([E])}}for(E=0;E<u.length;E++)u[E].parentNode.removeChild(u[E]);d=null;u=[];D=[]}n(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,E){J=E.getProperty("eventName");E=E.getProperty("event");J==mxEvent.MOUSE_MOVE&&x&&(null!=E.sourceState&&E.sourceState.setCursor("crosshair"),E.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,E){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(J=E.getEvent(),x&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var H=
Class
2
document.createElement("tr");ja.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";var Ha=document.createElement("img");Ha.src=Sidebar.prototype.expandedImage;Ha.style.verticalAlign="middle";Ba.appendChild(Ha);mxUtils.write(Ba,mxResources.get("property"));ja.style.cursor="pointer";var ra=function(){var Aa=va.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ha.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=u.childNodes.length- 1;0<=ka;ka--)try{var oa=u.childNodes[ka],sa=oa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||u.removeChild(oa)}catch(ya){}}else Ha.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<Aa.length;ka++)Aa[ka].style.display=ta};mxEvent.addListener(ja,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;ra()});ja.appendChild(Ba);Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.innerHTML=mxResources.get("value");ja.appendChild(Ba);va.appendChild(ja);var Ca=
Base
1
!0),q),x=g;else if(v||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(v?q.getDefaultStylesheet():q.getStylesheet());var A=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var z=this.pages[0];this.currentPage==z?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=z.viewState&&null!=z.viewState&&q.setBackgroundImage(z.viewState.backgroundImage);q.getGlobalVariable=function(L){return"page"==L?z.getName():"pagenumber"==L?1:A.apply(this, arguments)};document.body.appendChild(q.container);q.model.setRoot(z.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(L){try{null==x&&(x=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=L.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(x));c(M.substring(M.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(n){null!=e&&e(n)}}),null,null,null,mxUtils.bind(this,function(L){null!=e&&
Class
2
Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,E){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,E,J,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
Class
2
function resetKA() { if (kainterval > 0) { kacount = 0; clearInterval(katimer); if (sock.writable) katimer = setInterval(sendKA, kainterval); } }
Base
1
"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=v?"&scale="+v:"")+(null!=x?"&border="+x:"")+(M&&isFinite(M)?"&w="+M:"")+(n&&isFinite(n)?"&h="+n:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var k=window.location.hash,m=mxUtils.bind(this,function(q){var v=null!=c.data?c.data:"";null!=q&&0<q.length&&(0<v.length&&(v+="\n"),v+=q);q=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
Class
2
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
Base
1
mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(u.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),m.className="geBtn",d.appendChild(m));m=mxUtils.button(mxResources.get("export"),function(){var F=b.createLibraryDataFromImages(k),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(F,G,"text/xml",null,null,!0,null,"xml"):
Class
2
Ya.height,Ua.y-Ya.y-Ya.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Ya){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Ua=T.getCellAt(Ya.getGraphX(),Ya.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Ua,Ya)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Ta){var za=T.view.getState(Ma[Ta]),wa=T.getCellGeometry(Ma[Ta]),
Class
2
function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,T,ca,ia,ma,pa,ua,ya,Fa,Ma,Oa,Qa){var Ta=null;if(null!=Qa)for(Ta=new mxDictionary,Fa=0;Fa<Qa.length;Fa++)Ta.put(Qa[Fa],!0);if(Qa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;ma=
Class
2
$scope.reset = function() { bootbox.confirm('Are you sure you want to reset the foreign source definition to the default ?', function(ok) { if (ok) { RequisitionsService.startTiming(); RequisitionsService.deleteForeignSourceDefinition($scope.foreignSource).then( function() { // success growl.success('The foreign source definition for ' + $scope.foreignSource + 'has been reseted.'); $scope.initialize(); }, $scope.errorHandler ); } }); };
Base
1
b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(v){t.style.marginBottom="24px";var x=document.createElement("a");x.style.display="inline-block";x.style.color="gray";x.style.cursor="pointer";x.style.marginTop="6px";mxUtils.write(x,mxResources.get("signOut"));t.style.marginBottom="16px";u.style.paddingBottom="18px";mxEvent.addListener(x,"click",function(){b.confirm(mxResources.get("areYouSure"), function(){v()})});u.appendChild(x)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var m=b.drive.getUsersList();if(0<m.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");t.style.marginBottom="16px";u.style.paddingBottom="18px";u.appendChild(d);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(l=0;l<m.length;l++)D=document.createElement("option"),mxUtils.write(D,m[l].displayName),D.value=l,q.appendChild(D),
Base
1
function imagePreviewLoad(s) { /* no preview */ if (typeof s != 'string' || !s) { imgPreview.getElement().setHtml(''); return; } /* Create image */ var i = new Image(); /* Display loading text in preview element */ imgPreview.getElement().setHtml('Loading...'); /* When image is loaded */ i.onload = function () { /* Remove preview */ imgPreview.getElement().setHtml(''); /* Set attributes */ if (orgWidth == null || orgHeight == null) { t.setValueOf('tab-properties', 'width', this.width); t.setValueOf('tab-properties', 'height', this.height); imgScal = 1; if (this.height > 0 && this.width > 0) imgScal = this.width / this.height; if (imgScal <= 0) imgScal = 1; } else { orgWidth = null; orgHeight = null; } this.id = editor.id + 'previewimage'; this.setAttribute('style', 'max-width:400px;max-height:100px;'); this.setAttribute('alt', ''); /* Insert preview image */ try { var p = imgPreview.getElement().$; if (p) p.appendChild(this); } catch (e) {} }; /* Error Function */ i.onerror = function () { imgPreview.getElement().setHtml(''); }; i.onabort = function () { imgPreview.getElement().setHtml(''); }; /* Load image */ i.src = s; }
Base
1
elFinder.prototype.commands.places = function() { var self = this, fm = this.fm, filter = function(hashes) { return $.map(self.files(hashes), function(f) { return f.mime == 'directory' ? f : null; }); }, places = null; this.getstate = function(sel) { var sel = this.hashes(sel), cnt = sel.length; return places && cnt && cnt == filter(sel).length ? 0 : -1; }; this.exec = function(hashes) { var files = this.files(hashes); places.trigger('regist', [ files ]); }; fm.one('load', function(){ places = fm.ui.places; }); };
Base
1
function onSearchKeyUp () { var searchTerm = $searchBox.val().toLowerCase() $('.all-user-list li').each(function () { if ($(this).filter('[data-search-term *= ' + searchTerm + ']').length > 0 || searchTerm.length < 1) { $(this).show() } else { $(this).hide() } }) }
Class
2
mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow|| "width"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+mxUtils.htmlEntities(b)+";");null!=c&&(d+="border:1px solid "+mxUtils.htmlEntities(c)+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+'">'+a+"</div>"}this.node.innerHTML= a;a=this.node.getElementsByTagName("div");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute("dir",b):a[a.length-1].removeAttribute("dir"))}};
Base
1
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.1.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
Base
1
$scope.provision = function() { $scope.isSaving = true; growl.info($sanitize('The node ' + $scope.node.nodeLabel + ' is being added to requisition ' + $scope.node.foreignSource + '. Please wait...')); var successMessage = $sanitize('The node ' + $scope.node.nodeLabel + ' has been added to requisition ' + $scope.node.foreignSource); RequisitionsService.quickAddNode($scope.node).then( function() { // success $scope.reset(); bootbox.dialog({ message: successMessage, title: 'Success', buttons: { main: { label: 'Ok', className: 'btn-secondary' } } }); }, $scope.errorHandler ); };
Compound
4
Mocha.prototype.timeout = function(timeout){ this.suite.timeout(timeout); return this; };
Base
1
var authorize = function (cb) { // Do not require auth for static paths and the API...this could be a bit brittle if (req.path.match(/^\/(static|javascripts|pluginfw|api)/)) return cb(true); if (req.path.indexOf('/admin') != 0) { if (!settings.requireAuthentication) return cb(true); if (!settings.requireAuthorization && req.session && req.session.user) return cb(true); } if (req.session && req.session.user && req.session.user.is_admin) return cb(true); hooks.aCallFirst("authorize", {req: req, res:res, next:next, resource: req.path}, hookResultMangle(cb)); }
Base
1
z.y,t.width/L,t.height/L,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";t=new TextareaDialog(c,"Paste Data:",t,function(z){if(0<z.length)try{var L=function(K){function F(J){if(null==E[J]){if(E[J]=!0,null!=V[J]){for(;0<V[J].length;){var T=V[J].pop();F(T)}delete V[J]}}else mxLog.debug(H+": Visited: "+J)}var H=K.parentNode.id,S=K.childNodes;K={}; for(var V={},M=null,W={},U=0;U<S.length;U++){var X=S[U];if(null!=X.id&&0<X.id.length)if(null==K[X.id]){K[X.id]=X.id;var u=X.getAttribute("parent");null==u?null!=M?mxLog.debug(H+": Multiple roots: "+X.id):M=X.id:(null==V[u]&&(V[u]=[]),V[u].push(X.id))}else W[X.id]=X.id}S=Object.keys(W);0<S.length?(S=H+": "+S.length+" Duplicates: "+S.join(", "),mxLog.debug(S+" (see console)")):mxLog.debug(H+": Checked");var E={};null==M?mxLog.debug(H+": No root"):(F(M),Object.keys(E).length!=Object.keys(K).length&& (mxLog.debug(H+": Invalid tree: (see console)"),console.log(H+": Invalid tree",V)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var C=mxUtils.parseXml(z),D=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=D&&0<D.length)try{var G=c.getHashValueForPages(D);mxLog.debug("Checksum: ",G)}catch(K){mxLog.debug("Error: ",K.message)}else mxLog.debug("No pages found for checksum");var P=C.getElementsByTagName("root");for(z=0;z<P.length;z++)L(P[z]);
Class
2
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
Class
2
ca,la,ia){function ma(Ma,Ta){null==Ka?(Ia=Ma,Ia=/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)?PROXY_URL+"?url="+encodeURIComponent(Ia):TEMPLATE_PATH+"/"+Ia,mxUtils.get(Ia,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ka=Ua.getText());Ta(Ka,Ia)}))):Ta(Ka,Ia)}function qa(Ma,Ta,Ua){if(null!=Ma&&mxUtils.isAncestorNode(document.body,na)){Ma=mxUtils.parseXml(Ma);Ma=Editor.parseDiagramNode(Ma.documentElement);var Za=new mxCodec(Ma.ownerDocument),Wa=new mxGraphModel; Za.decode(Ma,Wa);Ma=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,Ma,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;z(na,null,null,oa,ha,ia)},!0,!1)}}function pa(Ma,Ta){null==oa||Ra||
Class
2
return u};Graph.getFontUrl=function(u,E){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(E=u.url);return E};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var E=0;E<u.length;E++){var J=u[E].getAttribute("data-font-src");if(null!=J){var T="FONT"==u[E].nodeName?u[E].getAttribute("face"):u[E].style.fontFamily;null!=T&&Graph.addFont(T,J)}}};Graph.processFontStyle=function(u){if(null!=u){var E=mxUtils.getValue(u,"fontSource",null);if(null!=E){var J=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
Class
2
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this, arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position=
Base
1
Math.min(Y,Math.max(parseInt(aa.value),parseInt(fa.value))));fa.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),parseInt(fa.value))))}function T(ya){function wa(Ja,Oa,Pa){var Qa=Ja.useCssTransforms,Ya=Ja.currentTranslate,Ma=Ja.currentScale,Ta=Ja.view.translate,Ua=Ja.view.scale;Ja.useCssTransforms&&(Ja.useCssTransforms=!1,Ja.currentTranslate=new mxPoint(0,0),Ja.currentScale=1,Ja.view.translate=new mxPoint(0,0),Ja.view.scale=1);var Za=Ja.getGraphBounds(),Wa=0,bb=0,Va=oa.get(),ab=1/Ja.pageScale, $a=ra.checked;if($a){ab=parseInt(ta.value);var hb=parseInt(ka.value);ab=Math.min(Va.height*hb/(Za.height/Ja.view.scale),Va.width*ab/(Za.width/Ja.view.scale))}else ab=parseInt(Ha.value)/(100*Ja.pageScale),isNaN(ab)&&(ua=1/Ja.pageScale,Ha.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*ua);Va.height=Math.ceil(Va.height*ua);ab*=ua;!$a&&Ja.pageVisible?(Za=Ja.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Oa){Oa=PrintDialog.createPrintPreview(Ja,ab,Va,
Base
1
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
Class
2
let print = (level, entry, message, ...args) => { let prefix = ''; if (entry) { if (entry.tnx === 'server') { prefix = 'S: '; } else if (entry.tnx === 'client') { prefix = 'C: '; } if (entry.sid) { prefix = '[' + entry.sid + '] ' + prefix; } if (entry.cid) { prefix = '[#' + entry.cid + '] ' + prefix; } } message = util.format(message, ...args); message.split(/\r?\n/).forEach(line => { console.log( '[%s] %s %s', new Date() .toISOString() .substr(0, 19) .replace(/T/, ' '), levelNames.get(level), prefix + line ); }); };
Base
1
var toggle = function(){ if (handle.data('closed')) { handle.data('closed', false).css({backgroundColor: 'transparent'}); nav.css({width: handle.data('width')}).trigger('resize'); } else { handle.data('closed', true).css({backgroundColor: 'inherit'}); nav.css({width: 8}); } handle.data({startX: null, endX: null}); }; handle.data({closed: false, width: nav.width()}) .on('touchstart', function(e){ handle.data('startX', e.originalEvent.touches[0].pageX); }) .on('touchmove', function(e){ var x = e.originalEvent.touches[0].pageX; var sx = handle.data('startX'); var open = ltr? (sx && sx < x) : (sx > x); var close = ltr? (sx > x) : (sx && sx < x); (open || close) && toggle(); }) .on('touchend', function(e){ handle.data('startX') && toggle(); }); if (fm.UA.Mobile) { handle.data('defWidth', nav.width()); $(window).on('resize', function(e){ var hw = nav.parent().width() / 2; if (handle.data('defWidth') > hw) { nav.width(hw); } else { nav.width(handle.data('defWidth')); } handle.data('width', nav.width()); }); } } fm.one('open', function() { setTimeout(function() { nav.trigger('resize'); }, 150); }); } });
Base
1
expect: function(e1, e2, e3, e4) { var token = this.peek(e1, e2, e3, e4); if (token) { this.tokens.shift(); return token; } return false; },
Class
2
size : function(f) { return fm.formatSize(f.size); },
Base
1
S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});Za.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Pa);this.graph.mathEnabled&&this.addMathCss(Pa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Pa,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Pa))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Pa,L),this.loadFonts(z)}catch(M){null!=
Base
1
function toString(stringify) { if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify; var query , url = this , protocol = url.protocol; if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':'; var result = protocol + ((url.protocol && url.slashes) || isSpecial(url.protocol) ? '//' : ''); if (url.username) { result += url.username; if (url.password) result += ':'+ url.password; result += '@'; } else if (url.password) { result += ':'+ url.password; result += '@'; } else if ( url.protocol !== 'file:' && isSpecial(url.protocol) && !url.host && url.pathname !== '/' ) { // // Add back the empty userinfo, otherwise the original invalid URL // might be transformed into a valid one with `url.pathname` as host. // result += '@'; } result += url.host + url.pathname; query = 'object' === typeof url.query ? stringify(url.query) : url.query; if (query) result += '?' !== query.charAt(0) ? '?'+ query : query; if (url.hash) result += url.hash; return result; }
Base
1
function create_group() { var num_nodes = 0; var node_names = ""; $("#resource_list :checked").parent().parent().each(function (index,element) { if (element.getAttribute("nodeID")) { num_nodes++; node_names += element.getAttribute("nodeID") + " " } }); if (num_nodes == 0) { alert("You must select at least one resource to add to a group"); return; } $("#resources_to_add_to_group").val(node_names); $("#add_group").dialog({ title: 'Create Group', modal: true, resizable: false, buttons: { Cancel: function() { $(this).dialog("close"); }, "Create Group": function() { var data = $('#add_group > form').serialize(); var url = get_cluster_remote_url() + "add_group"; $.ajax({ type: "POST", url: url, data: data, success: function() { Pcs.update(); $("#add_group").dialog("close"); }, error: function (xhr, status, error) { alert( "Error creating group " + ajax_simple_error(xhr, status, error) ); $("#add_group").dialog("close"); } }); } } }); }
Compound
4
emailIconClassName: this.getMetadata().get(['clientDefs', 'Email', 'iconClass']) || '' }, Dep.prototype.data.call(this)); }, setup: function () { var data = this.model.get('data') || {}; this.emailId = data.emailId; this.emailName = data.emailName; if ( this.parentModel && (this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id) ) { if (this.model.get('post')) { this.createField('post', null, null, 'views/stream/fields/post'); this.hasPost = true; } if ((this.model.get('attachmentsIds') || []).length) { this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple'); this.hasAttachments = true; } } this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>'; this.messageName = 'emailSent'; this.messageData['by'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>'; if (this.isThis) { this.messageName += 'This'; } this.createMessage(); }, }); });
Base
1
c===i)j=l[i],o=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,o),u(j.mData.sort,a),u(j.mData.type,a),u(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,o)):d[i]=o;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)S(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)S(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}function Ja(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,h,l,q;if(null=== e.nTr){j=c||H.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Na(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){h=a.aoColumns[l];i=c?d[l]:H.createElement(h.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if(!c||h.mRender||h.mData!==l)i.innerHTML=B(a,b,l,"display");h.sClass&&(i.className+=" "+h.sClass);h.bVisible&&!c?j.appendChild(i):!h.bVisible&&c&&i.parentNode.removeChild(i);h.fnCreatedCell&&h.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}v(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role", "row")}function Na(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?pa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function kb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,o=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),
Base
1
y.y,n.width/K,n.height/K,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,"Paste Data:",n,function(y){if(0<y.length)try{var K=function(J){function E(I){if(null==C[I]){if(C[I]=!0,null!=U[I]){for(;0<U[I].length;){var T=U[I].pop();E(T)}delete U[I]}}else mxLog.debug(H+": Visited: "+I)}var H=J.parentNode.id,S=J.childNodes;J={}; for(var U={},Q=null,W={},V=0;V<S.length;V++){var X=S[V];if(null!=X.id&&0<X.id.length)if(null==J[X.id]){J[X.id]=X.id;var p=X.getAttribute("parent");null==p?null!=Q?mxLog.debug(H+": Multiple roots: "+X.id):Q=X.id:(null==U[p]&&(U[p]=[]),U[p].push(X.id))}else W[X.id]=X.id}S=Object.keys(W);0<S.length?(S=H+": "+S.length+" Duplicates: "+S.join(", "),mxLog.debug(S+" (see console)")):mxLog.debug(H+": Checked");var C={};null==Q?mxLog.debug(H+": No root"):(E(Q),Object.keys(C).length!=Object.keys(J).length&& (mxLog.debug(H+": Invalid tree: (see console)"),console.log(H+": Invalid tree",U)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var B=mxUtils.parseXml(y),F=d.getPagesForNode(B.documentElement,"mxGraphModel");if(null!=F&&0<F.length)try{var G=d.getHashValueForPages(F);mxLog.debug("Checksum: ",G)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var N=B.getElementsByTagName("root");for(y=0;y<N.length;y++)K(N[y]);
Class
2
mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";q.appendChild(v);if(m){mxUtils.write(q,mxResources.get("zoom")+":");var x=document.createElement("input"); x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";q.appendChild(x);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var z=this.addCheckbox(q,mxResources.get("selectionOnly"),!1, this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var M=k?null:this.addCheckbox(q,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=M&&(M.style.marginBottom="16px");c=new CustomDialog(this,q,mxUtils.bind(this,function(){var n=parseInt(x.value)/100||1,y=parseInt(A.value)||0;g(!z.checked,null!=L?L.checked:!1,null!=M?M.checked:!1,n,y)}),null,c,e); this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,q,v,x,A){v=null!=v?v:Editor.defaultIncludeDiagram;var z=document.createElement("div");z.style.whiteSpace="nowrap";var L=this.editor.graph,M="jpeg"==x?220:300,n=document.createElement("h3");mxUtils.write(n,c);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";z.appendChild(n);mxUtils.write(z,mxResources.get("zoom")+":");var y=document.createElement("input");
Class
2
function minErr(module, ErrorConstructor) { ErrorConstructor = ErrorConstructor || Error; return function() { var SKIP_INDEXES = 2; var templateArgs = arguments, code = templateArgs[0], message = '[' + (module ? module + ':' : '') + code + '] ', template = templateArgs[1], paramPrefix, i; message += template.replace(/\{\d+\}/g, function(match) { var index = +match.slice(1, -1), shiftedIndex = index + SKIP_INDEXES; if (shiftedIndex < templateArgs.length) { return toDebugString(templateArgs[shiftedIndex]); } return match; }); message += '\nhttp://errors.angularjs.org/"NG_VERSION_FULL"/' + (module ? module + '/' : '') + code; for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' + encodeURIComponent(toDebugString(templateArgs[i])); } return new ErrorConstructor(message); }; }
Class
2
text: this.text.slice(start, this.index), identifier: true }); },
Class
2
sanitizeHtmlLight: function (value) { value = value || ''; value = value.replace(/<[\/]{0,1}(base)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(object)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(embed)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(applet)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(iframe)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(script)[^><]*>/gi, ''); value = value.replace(/<[^><]*([^a-z]{1}on[a-z]+)=[^><]*>/gi, function (match) { return match.replace(/[^a-z]{1}on[a-z]+=/gi, ' data-handler-stripped='); }); value = value.replace(/href=" *javascript\:(.*?)"/gi, function(m, $1) { return 'removed=""'; }); value = value.replace(/href=' *javascript\:(.*?)'/gi, function(m, $1) { return 'removed=""'; }); value = value.replace(/src=" *javascript\:(.*?)"/gi, function(m, $1) { return 'removed=""'; }); value = value.replace(/src=' *javascript\:(.*?)'/gi, function(m, $1) { return 'removed=""'; }); return value; },
Base
1
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
Base
1
0;N<T;N++)u=Editor.crcTable[(u^E.charCodeAt(J+N))&255]^u>>>8;return u};Editor.crc32=function(u){for(var E=-1,J=0;J<u.length;J++)E=E>>>8^Editor.crcTable[(E^u.charCodeAt(J))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(u,E,J,T,N){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}u=u.substring(u.indexOf(",")+
Class
2
encodeURIComponent(K):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(0<v?"&dpi="+v:"")+"&bg="+(null!=k?k:"none")+"&w="+M+"&h="+n+"&border="+q+"&xml="+encodeURIComponent(z))})}else"png"==g?c.exportImage(m,null==k||"none"==k,!0,!1,!1,q,!0,!1,null,x,v):c.exportImage(m,!1,!0,!1,!1,q,!0,!1,"jpeg",x);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g= 0;g<this.pages.length;g++){var k=c;this.currentPage!=this.pages[g]&&(k=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),k.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+k.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxUtils.htmlEntities(c));
Base
1
deriveVersion: function (req, ctx) { return req.headers['accept-version'] }
Base
1
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
Class
2
F=B.createElement("output");B.appendChild(F);B=new mxXmlCanvas2D(F);B.translate(Math.floor((1-y.x)/K),Math.floor((1-y.y)/K));B.scale(1/K);var G=0,N=B.save;B.save=function(){G++;N.apply(this,arguments)};var J=B.restore;B.restore=function(){G--;J.apply(this,arguments)};var E=n.drawShape;n.drawShape=function(H){mxLog.debug("entering shape",H,G);E.apply(this,arguments);mxLog.debug("leaving shape",H,G)};n.drawState(u.getView().getState(u.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",
Base
1
function permissions_load_cluster(cluster_name, callback) { var element_id = "permissions_cluster_" + cluster_name; $.ajax({ type: "GET", url: "/permissions_cluster_form/" + cluster_name, timeout: pcs_timeout, success: function(data) { $("#" + element_id).html(data); $("#" + element_id + " :checkbox").each(function(key, checkbox) { permissions_fix_dependent_checkboxes(checkbox); }); permissions_cluster_dirty_flag(cluster_name, false); if (callback) { callback(); } }, error: function(xhr, status, error) { $("#" + element_id).html( "Error loading permissions " + ajax_simple_error(xhr, status, error) ); if (callback) { callback(); } } }); }
Compound
4
Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,D.clientY);null!=D&&D.parentNode!= x;)D=D.parentNode;var G=null;if(null!=D){var P=x.firstChild;for(G=0;null!=P&&P!=D;)P=P.nextSibling,G++}return G}function d(D,G,P,K,F,H,S,V,M){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==D&&null!=S||null==A[D]){var W=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));Q.style.color=null==R.title||0==R.title.length?"#d0d0d0":""};x.style.backgroundImage=
Base
1
"top center";ea.style.backgroundRepeat="no-repeat";ea.setAttribute("title","Minimize");var ha=!1,ma=mxUtils.bind(this,function(){T.innerHTML="";if(!ha){var aa=function(la,qa,ta){la=C("",la.funct,null,qa,la,ta);la.style.width="40px";la.style.opacity="0.7";return ca(la,null,"pointer")},ca=function(la,qa,ta){null!=qa&&la.setAttribute("title",qa);la.style.cursor=null!=ta?ta:"default";la.style.margin="2px 0px";T.appendChild(la);mxUtils.br(T);return la};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
Base
1
function onPaste(event) { var editor = event.listenerData && event.listenerData.editor; var $event = event.data.$; var clipboardData = $event.clipboardData; var found = false; var imageType = /^image/; if (!clipboardData) { return; } return Array.prototype.forEach.call(clipboardData.types, function (type, i) { if (found) { return; } if (type.match(imageType) || clipboardData.items[i].type.match(imageType)) { readImageAsBase64(clipboardData.items[i], editor); return (found = true); } }); }
Base
1
cp.exec = function (cmd, extra, cb) { if (cmd.indexOf('-a') === -1) return cb(null); assert.equal('git tag -a v1.0.0 -m "Message"', cmd); done(); };
Class
2
window.addEventListener("message",v)}})));c(q);q.onversionchange=function(){q.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,k,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c],e=[e]);var v=q.transaction(m,"readwrite");v.oncomplete=g;v.onerror=k;for(q=0;q<m.length;q++)v.objectStore(m[q]).put(null!=c&&null!=c[q]?{key:c[q],data:e[q]}:e[q])}catch(x){null!=
Base
1
const makeRegex = (string) => { // default: case_senstivie = true if (ctx.query.filter_case_sensitive === 'false') { return new RegExp(string, 'i'); } else { return new RegExp(string); } };
Class
2