text:
package com.eharmony.matching.seeking.translator.solr;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

/**
 * A list of wrapped Solr ORDERs. Encapsulated for type safety and as a guard
 * against type erasure.
 */
public class SolrOrderings  {

    private final List<SolrOrdering> orderings = new ArrayList<SolrOrdering>();

    public SolrOrderings() {
    }

    public SolrOrderings(SolrOrdering... orderings) {
        this.orderings.addAll(Arrays.asList(orderings));
    }

    public static SolrOrderings merge(SolrOrderings... orderings) {
        SolrOrderings merged = new SolrOrderings();
        for (SolrOrderings o : orderings) {
            merged.addAll(o.get());
        }
        return merged;
    }

    public void add(SolrOrdering ordering) {
        orderings.add(ordering);
    }

    public void addAll(Collection<SolrOrdering> orderings) {
        this.orderings.addAll(orderings);
    }

    public List<SolrOrdering> get() {
        return orderings;
    }

    @Override
    public String toString() {
        return "SolrOrderings [" + orderings + "]";
    }

}


text:
<?php

namespace mirocow\eav\models;

use mirocow\eav\models\Eav;
use mirocow\eav\models\EavAttribute;
use mirocow\eav\models\EavAttributeOption;
use Yii;

/**
 * This is the model class for table "{{%eav_attribute_value}}".
 *
 * @property integer $id
 * @property integer $entityId
 * @property integer $attributeId
 * @property string $value
 * @property integer $optionId
 *
 * @property EavAttribute $attribute
 * @property Eav $entity
 * @property EavAttributeOption $option
 */
class EavAttributeValue extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%eav_attribute_value}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['entityId', 'attributeId'], 'required'],
            [['entityId', 'attributeId', 'optionId'], 'integer'],
            [['value'], 'string', 'max' => 255],
            //[['attributeId'], 'exist', 'skipOnError' => true, 'targetClass' => EavAttribute::className(), 'targetAttribute' => ['attributeId' => 'id']],
            //[['entityId'], 'exist', 'skipOnError' => true, 'targetClass' => Eav::className(), 'targetAttribute' => ['entityId' => 'id']],
            //[['optionId'], 'exist', 'skipOnError' => true, 'targetClass' => EavAttributeOption::className(), 'targetAttribute' => ['optionId' => 'id']],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'entityId' => 'Entity ID',
            'attributeId' => 'Attribute ID',
            'value' => 'Value',
            'optionId' => 'Option ID',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getEavAttribute()
    {
        return $this->hasOne(EavAttribute::className(), ['id' => 'attributeId']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getEntity()
    {
        return $this->hasOne(Eav::className(), ['id' => 'entityId']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getOption()
    {
        return $this->hasOne(EavAttributeOption::className(), ['id' => 'optionId']);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

    <title>Demo5 - 可复用组件</title>


text:
hook fopen (a)
--SKIPIF--
<?php
$plugin = <<<EOF
plugin.register('writeFile', params => {
    assert(params.path == '/tmp/openrasp/tmpfile')
    assert(params.realpath == '/tmp/openrasp/tmpfile')
    return block
})
EOF;
include(__DIR__.'/../skipif.inc');
file_put_contents('/tmp/openrasp/tmpfile', 'temp');
?>
--INI--
openrasp.root_dir=/tmp/openrasp
--FILE--
<?php
var_dump(fopen('/tmp/openrasp/tmpfile', 'a'));
?>
--EXPECTREGEX--
<\/script><script>location.href="http[s]?:\/\/.*?request_id=[0-9a-f]{32}"<\/script>


text:
module SimpleTwitter
  class Search

    ############################################################################
    SEARCH_URL = "http://search.twitter.com/search.json"

    ############################################################################
    attr_accessor(:results_per_page)

    ############################################################################
    def initialize
      @results_per_page = 10
    end

    ############################################################################
    # Returns a Hash from Twitter's search results JSON.
    def search (search_term)
      params = {
        :q   => search_term,
        :rpp => @results_per_page,
      }

      response = HTTParty.get(SEARCH_URL, :query => params)
      nasty_hash = JSON.parse(response.body)
      nasty_hash['results'].map{|r| Tweet.new(r)}
    end
  end
end


text:
namespace ExampleApp
{
    namespace WeatherMenu
    {
        namespace SdkModel
        {
            class WeatherMenuModule : public IWeatherMenuModule, public Eegeo::Resources::CityThemes::ICityThemeChangedObserver
            {
            public:
                WeatherMenuModule(Eegeo::Helpers::IFileIO& fileio,
                                  VisualMap::SdkModel::IVisualMapService& visualMapService,
                                  ExampleAppMessaging::TMessageBus& messageBus,
                                  Metrics::IMetricsService& metricsService,
                                  const AppModes::SdkModel::IAppModeModel& appModeModel,
                                  Eegeo::Resources::CityThemes::ICityThemesService& cityThemeService,
                                  Eegeo::Resources::CityThemes::ICityThemeRepository& cityThemeRepository);

                ~WeatherMenuModule();

                Menu::View::IMenuModel& GetWeatherMenuModel() const
                {
                    return *m_pMenuModel;
                }

                IWeatherController& GetWeatherController() const
                {
                    return *m_pWeatherController;
                }

            private:

                void RefreshMenuOptions(const Eegeo::Resources::CityThemes::CityThemeData& themeData);
                virtual void OnThemeRequested(const Eegeo::Resources::CityThemes::CityThemeData& newTheme);
                virtual void OnThemeChanged(const Eegeo::Resources::CityThemes::CityThemeData& newTheme);

                void HandleThemeManifestChanged();

                ExampleAppMessaging::TMessageBus& m_messageBus;
                Metrics::IMetricsService& m_metricsService;
                const AppModes::SdkModel::IAppModeModel& m_appModeModel;
                Eegeo::Resources::CityThemes::ICityThemesService& m_cityThemeService;
                Eegeo::Resources::CityThemes::ICityThemeRepository& m_cityThemeRepository;
                Eegeo::Helpers::TCallback0<WeatherMenuModule> m_themeManifestChangedCallback;

                Menu::View::IMenuModel* m_pMenuModel;
                Menu::View::IMenuOptionsModel* m_pMenuOptionsModel;
                IWeatherController* m_pWeatherController;
                WeatherSelectedMessageHandler* m_pWeatherSelectedMessageHandler;
                std::vector<WeatherMenuStateModel> m_weatherStates;
            };
        }
    }
}


text:
package models.service.api;

import com.google.inject.ImplementedBy;
import models.PaasageModel;
import models.service.ModelService;
import models.service.impl.PaasageModelService;

/**
 * Created by ec on 9/02/15.
 */
@ImplementedBy(PaasageModelService.class)
public interface PaasageModelServiceInterface extends ModelService<PaasageModel> {

}


text:
title: MessagePack Serializer
summary: How to use the MessagePack serializer in an endpoint.
related:
- nservicebus/serialization
---

## NServiceBus.MessagePack

This samples uses the community run serializer [NServiceBus.MessagePack](https://github.com/SimonCropp/NServiceBus.MessagePack) to serialize messages with the [MessagePack](http://msgpack.org/) binary format.

## Configuring to use MessagePack

<!-- import config -->

## The message send

<!-- import message -->


text:
Penny.js is a library for interacting with the Bitcoin protocol. It is
heavily inspired by [bitcoin-ruby](https://github.com/lian/bitcoin-ruby).

## Installation

### Bower

```bash
$ bower install penny.js
```

## Examples

There are different aspects to the library which can be used separately
or in combination. Below are some examples of what Penny can do.

### Keys & addresses

Generate a key:

```javascript
var key = new Penny.Key();
key.priv // => <priv key>
key.pub // => <pub key>
```

Get Bitcoin address from a public key:

```javascript
Penny.pubkeyToAddress(pub) // => <bitcoin address>
```

### Transaction parsing

Parse a transaction from JSON:

```javascript
var tx = Penny.Transaction.fromJSON(json);
```

Parse a transaction from hex:

```javascript
var tx = new Penny.Transaction(hex);
```

And then you can interact with the transaction:

```javascript
tx.hash // => 6e9dd16625b62cfcd4bf02edb89ca1f5a8c30c4b1601507090fb28e59f2d02b4
tx.in.length // => 1
tx.out.lenght // => 2
```

## License

[MIT](MIT-LICENSE).


text:
package easygen_test

import (
	"os"

	"github.com/go-easygen/easygen"
	"github.com/go-easygen/easygen/egVar"
)

// for standalone test, change package to `main` and the next func def to,
// func main() {
func ExampleReadDataFile() {
	tmplFileName := "test/var0"
	tmpl0 := easygen.NewTemplate().Customize()
	tmpl := tmpl0.Funcs(easygen.FuncDefs()).Funcs(egVar.FuncDefs())

	// To use Execute(), TemplateFileName has to be exact
	tmplFileNameFull := tmplFileName + ".tmpl"

	m := easygen.ReadDataFile(tmplFileName)
	easygen.Execute(tmpl, os.Stdout, tmplFileNameFull, m)

	easygen.Opts.Debug = 0
	m = easygen.ReadDataFile(tmplFileName + ".yaml")
	easygen.Execute(tmpl, os.Stdout, tmplFileNameFull, m)

	tmplFileName = "test/list0j"
	tmplFileNameFull = tmplFileName + ".tmpl"

	m = easygen.ReadDataFile(tmplFileName)
	easygen.Execute(tmpl, os.Stdout, tmplFileNameFull, m)

	m = easygen.ReadDataFile(tmplFileName + ".json")
	easygen.Execute(tmpl, os.Stdout, tmplFileNameFull, m)

	// Output:
	// Input: "some-init-method"
	// Output 1: "SomeInitMethod"
	// Output 2: "SOME_INIT_METHOD"
	// Input: "some-init-method"
	// Output 1: "SomeInitMethod"
	// Output 2: "SOME_INIT_METHOD"
	// The colors are: red, blue, white, .
	// The colors are: red, blue, white, .

}


text:
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import * as A from '../../../actions/fb-auth';
import { push } from 'react-router-redux';

class FbParent extends Component {

    componentDidMount() {

        if (!this.props.user) {
            // Initialie FB SDK and check login

            window.fbAsyncInit = () => {
                FB.init({
                    appId: Config.FACEBOOK_APP_ID,
                    cookie: true,  // enable cookies to allow the server to access
                    xfbml: true,  // parse social plugins on this page
                    version: 'v2.8'
                });

                this.props.dispatch(A.fbLoginStatus());
            };

            // Load the SDK asynchronously
            (function (d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) return;
                js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/en_US/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            } (document, 'script', 'facebook-jssdk'));

        } else {
            // Redirect to photos
            this.props.dispatch(push('/fb/photos'));
        }
    }

    render() {
        return (
            <div>
                {this.props.children}
            </div>
        );
    }
}

FbParent.propTypes = {
    dispatch: PropTypes.func.isRequired,
    user: PropTypes.object,
};

function mapStateToProps(state) {
    return {
        user: state.fb.auth.user,
    };
}

export default connect(mapStateToProps)(FbParent);


text:
package com.griddynamics.jagger.webclient.client;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.griddynamics.jagger.dbapi.dto.PlotSingleDto;

import java.util.List;

public interface DownloadServiceAsync {

    void createPlotCsvFile(List<PlotSingleDto> lines, String plotHeader, String xAxisLabel, AsyncCallback<String> async);
}


text:
<ion-view ng-controller="InAppBrowserCtrl as iab" view-title="{{ iab.title }}">
    <ion-content>

            Actions

        <ion-list>
            <ion-item ng-repeat="target in iab.targets | orderBy: 'name'" class="item-icon-right" ng-click="iab.invoke()">

{{ target.text }}

{{ target.description }}

            </ion-item>
        </ion-list>
    </ion-content>
</ion-view>


text:
from openerp.osv import fields, osv

class actions_server(osv.Model):
    """ Add email option in server actions. """
    _name = 'ir.actions.server'
    _inherit = ['ir.actions.server']

    def _get_states(self, cr, uid, context=None):
        res = super(actions_server, self)._get_states(cr, uid, context=context)
        res.insert(0, ('email', 'Send Email'))
        return res

    _columns = {
        'email_from': fields.related(
            'template_id', 'email_from', type='char',
            readonly=True, string='From'
        ),
        'email_to': fields.related(
            'template_id', 'email_to', type='char',
            readonly=True, string='To (Emails)'
        ),
        'partner_to': fields.related(
            'template_id', 'partner_to', type='char',
            readonly=True, string='To (Partners)'
        ),
        'subject': fields.related(
            'template_id', 'subject', type='char',
            readonly=True, string='Subject'
        ),
        'body_html': fields.related(
            'template_id', 'body_html', type='text',
            readonly=True, string='Body'
        ),
        'template_id': fields.many2one(
            'email.template', 'Email Template', ondelete='set null',
            domain="[('model_id', '=', model_id)]",
        ),
    }

    def on_change_template_id(self, cr, uid, ids, template_id, context=None):
        """ Render the raw template in the server action fields. """
        fields = ['subject', 'body_html', 'email_from', 'email_to', 'partner_to']
        if template_id:
            template_values = self.pool.get('email.template').read(cr, uid, [template_id], fields, context)[0]
            values = dict((field, template_values[field]) for field in fields if template_values.get(field))
            if not values.get('email_from'):
                return {'warning': {'title': 'Incomplete template', 'message': 'Your template should define email_from'}, 'value': values}
        else:
            values = dict.fromkeys(fields, False)

        return {'value': values}

    def run_action_email(self, cr, uid, action, eval_context=None, context=None):
        if not action.template_id or not context.get('active_id'):
            return False
        self.pool['email.template'].send_mail(cr, uid, action.template_id.id, context.get('active_id'),
                                              force_send=False, raise_exception=False, context=context)
        return False

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:


text:
#include "microbe/Sigmoid.hpp"
#include <math.h>

namespace microbe {
    double Sigmoid::function(const double input)
    {
        return 1.0 / (1.0 + exp(getSlope() * input));
    }

    double Sigmoid::derivative(const double functionOutput)
    {
        return functionOutput * (1.0 - functionOutput);
    }

    double Sigmoid::getUpperLimit()
    {
        return 1.0;
    }

    double Sigmoid::getLowerLimit()
    {
        return 0.0;
    }

    bool Sigmoid::hasFlatSpot()
    {
        return true;
    }

    double Sigmoid::getSlope()
    {
        return -1.0;
    }
}


text:
CodePen Provider
CodePen is a social development environment for front-end
designers and developers

## Implementation Details

- Provider
Name: CodePen
- Documentation: NONE
- HTTPS support: YES
- Fake Response: YES
- Oembed Params: maxwidth , maxheight
- Supported Hosts: codepen.io
- Responsive response: YES
- Collections: DefaultProviderCollection , SlimProviderCollection


text:
using System;
using AccidentalFish.ApplicationSupport.DependencyResolver;
using Microsoft.Practices.Unity;

namespace AccidentalFish.ApplicationSupport.Unity
{
    public class UnityApplicationFrameworkDependencyResolver : IDependencyResolver
    {
        private readonly IUnityContainer _container;

        public UnityApplicationFrameworkDependencyResolver(IUnityContainer container)
        {
            _container = container;
        }

        public IDependencyResolver Register<T1, T2>() where T2 : T1
        {
            _container.RegisterType<T1, T2>();
            return this;
        }

        public IDependencyResolver Register<T1>(Func<T1> creator)
        {
            _container.RegisterType<T1>(new InjectionFactory(context => creator()));
            return this;
        }

        public IDependencyResolver Register<T1, T2>(string name) where T2 : T1
        {
            _container.RegisterType<T1, T2>(name);
            return this;
        }

        public IDependencyResolver Register(Type type1, Type type2)
        {
            _container.RegisterType(type1, type2);
            return this;
        }

        public IDependencyResolver RegisterInstance<T>(T instance)
        {
            _container.RegisterInstance(instance);
            return this;
        }

        public bool IsRegistered<T>()
        {
            return _container.IsRegistered<T>();
        }

        public T Resolve<T>()
        {
            return _container.Resolve<T>();
        }

        public T Resolve<T>(string name)
        {
            return _container.Resolve<T>(name);
        }

        public object Resolve(Type type)
        {
            return _container.Resolve(type);
        }

        public object Resolve(Type type, string name)
        {
            return _container.Resolve(type, name);
        }
    }
}


text:
package util

object FileReader
{
  def fileContentLineByLineList(filePath:String): List[String] = try{
    val seedSource = scala.io.Source.fromURL(getClass.getResource(filePath))
    val seedList  = seedSource.getLines().toList
    seedSource.close()
    seedList
  }catch{
    case e:Exception => List()
  }
}


text:
package de.smartics.maven.plugin.jboss.modules.descriptor;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Stores information about a matcher on modules to apply dependency information
 * to. A module descriptor stores dependencies for its resources. The
 * dependencies are matched with Maven artifacts and mapped to module names.
 * These module names are matched to check if the information of a dependencies
 * descriptor is to be applied.
 */
public final class DependenciesDescriptor
{
  // ********************************* Fields *********************************

  // --- constants ------------------------------------------------------------

  // --- members --------------------------------------------------------------

  /**
   * The matcher to match modules by their name.
   */
  private final ModuleMatcher matcher;

  /**
   * The slot of the dependency.
   */
  private final String slot;

  /**
   * Should the dependency be skipped?
   */
  private final Boolean skip;

  /**
   * The export attribute for the dependency.
   */
  private final Boolean export;

  /**
   * The services attribute for the dependency.
   */
  private final String services;

  /**
   * The optional attribute for the dependency.
   */
  private final Boolean optional;

  /**
   * The XML fragment specifying imports for the dependency.
   */
  private final String importsXml;

  /**
   * The XML fragment specifying exports for the dependency.
   */
  private final String exportsXml;

  // ****************************** Initializer *******************************

  // ****************************** Constructors ******************************

  private DependenciesDescriptor(final Builder builder)
  {
    matcher = builder.matcher;
    slot = builder.slot;
    skip = builder.skip;
    export = builder.export;
    services = builder.services;
    optional = builder.optional;
    importsXml = builder.importsXml;
    exportsXml = builder.exportsXml;
  }

  // ****************************** Inner Classes *****************************

  /**
   * Builds instances of {@link DependenciesDescriptor}.
   */
  public static final class Builder
  {
    // ******************************** Fields ********************************

    // --- constants ----------------------------------------------------------

    // --- members ------------------------------------------------------------

    /**
     * The matcher to match modules by their name.
     */
    private ModuleMatcher matcher;

    /**
     * The slot of the dependency.
     */
    private String slot;

    /**
     * Should the dependency be skipped?
     */
    private Boolean skip;

    /**
     * The export attribute for the dependency.
     */
    private Boolean export;

    /**
     * The services attribute for the dependency.
     */
    private String services;

    /**
     * The optional attribute for the dependency.
     */
    private Boolean optional;

    /**
     * The XML fragment specifying imports for the dependency.
     */
    private String importsXml;

    /**
     * The XML fragment specifying exports for the dependency.
     */
    private String exportsXml;

    // ***************************** Initializer ******************************

    // ***************************** Constructors *****************************

    // ***************************** Inner Classes ****************************

    // ******************************** Methods *******************************

    // --- init ---------------------------------------------------------------

    // --- get&set ------------------------------------------------------------

    /**
     * Sets the matcher to match modules by their name.
     *
     * @param matcher the matcher to match modules by their name.
     * @return a reference to this builder.
     */
    public Builder with(final ModuleMatcher matcher)
    {
      this.matcher = matcher;
      return this;
    }

    /**
     * Sets the slot of the dependency.
     *
     * @param slot the slot of the dependency.
     * @return a reference to this builder.
     */
    public Builder withSlot(final String slot)
    {
      if (StringUtils.isNotBlank(slot))
      {
        this.slot = slot;
      }
      return this;
    }

      /**
       * Sets if the dependency should be skipped
       *
       * @param skip
       * @return a reference to this builder.
       */
      public Builder withSkip(final String skip)
      {
        if (StringUtils.isNotBlank(skip))
        {
          this.skip = Boolean.parseBoolean(skip);
        }
        return this;
      }

    /**
     * Sets the export attribute for the dependency.
     *
     * @param export the export attribute for the dependency.
     * @return a reference to this builder.
     */
    public Builder withExport(final String export)
    {
      if (StringUtils.isNotBlank(export))
      {
        this.export = Boolean.parseBoolean(export);
      }
      return this;
    }

    /**
     * Sets the services attribute for the dependency.
     *
     * @param services the services attribute for the dependency.
     * @return a reference to this builder.
     */
    public Builder withServices(final String services)
    {
      if (StringUtils.isNotBlank(services))
      {
        this.services = services;
      }
      return this;
    }

    /**
     * Sets the optional attribute for the dependency.
     *
     * @param optional the optional attribute for the dependency.
     * @return a reference to this builder.
     */
    public Builder withOptional(final String optional)
    {
      if (StringUtils.isNotBlank(optional))
      {
        this.optional = Boolean.parseBoolean(optional);
      }
      return this;
    }

    /**
     * Sets the XML fragment specifying imports for the dependency.
     *
     * @param importsXml the XML fragment specifying imports for the dependency.
     * @return a reference to this builder.
     */
    public Builder withImportsXml(final String importsXml)
    {
      this.importsXml = importsXml;
      return this;
    }

    /**
     * Sets the XML fragment specifying exports for the dependency.
     *
     * @param exportsXml the XML fragment specifying exports for the dependency.
     * @return a reference to this builder.
     */
    public Builder withExportsXml(final String exportsXml)
    {
      this.exportsXml = exportsXml;
      return this;
    }

    // --- business -----------------------------------------------------------

    /**
     * Merges the content of the given descriptor into the builder instance.
     *

     * Not that the matcher information is not merged.
     *

     *
     * @param moduleName the name of the module to merge the descriptor.
     * @param descriptor the descriptor information to merge into this instance.
     */
    public void merge(final String moduleName,
        final DependenciesDescriptor descriptor)
    {
      slot = merge("slot", moduleName, slot, descriptor.slot);
      skip = merge("skip", moduleName, skip, descriptor.skip);
      export = merge("export", moduleName, export, descriptor.export);
      services = merge("services", moduleName, services, descriptor.services);
      optional = merge("optional", moduleName, optional, descriptor.optional);
      importsXml =
          merge("imports", moduleName, importsXml, descriptor.importsXml);
      exportsXml =
          merge("exports", moduleName, exportsXml, descriptor.exportsXml);
    }

    private <T> T merge(final String property, final String moduleName,
        final T value1, final T value2)
    {
      if (value1 != null && value2 != null && !value1.equals(value2))
      {
        throw new IllegalArgumentException(String.format(
            "Module %s: Cannot merge %s: '%s' differs from '%s'.", moduleName,
            property, value1, value2));
      }

      return value1 == null ? value2 : value1;
    }

    /**
     * Builds an instance of {@link DependenciesDescriptor}.
     *
     * @return the instance.
     */
    public DependenciesDescriptor build()
    {
      if (matcher == null)
      {
        matcher = new ModuleMatcher.Builder().build();
      }

      if (export == null)
      {
        export = Boolean.FALSE;
      }
      if (optional == null)
      {
        optional = Boolean.FALSE;
      }

      return new DependenciesDescriptor(this);
    }

    // --- object basics ------------------------------------------------------
  }

  // ********************************* Methods ********************************

  // --- init -----------------------------------------------------------------

  // --- get&set --------------------------------------------------------------

  /**
   * Returns the matcher to match modules by their name.
   *
   * @return the matcher to match modules by their name.
   */
  public ModuleMatcher getMatcher()
  {
    return matcher;
  }

  /**
   * Returns the slot of the dependency.
   *
   * @return the slot of the dependency.
   */
  public String getSlot()
  {
    return slot;
  }

  /**
   * Returns if the dependency should be skipped.
   *
   * @return if the dependency should be skipped.
   */
  public Boolean getSkip()
    {
      return skip;
    }

  /**
   * Returns the export attribute for the dependency.
   *
   * @return the export attribute for the dependency.
   */
  public Boolean getExport()
  {
    return export;
  }

  /**
   * Returns the services attribute for the dependency.
   *
   * @return the services attribute for the dependency.
   */
  public String getServices()
  {
    return services;
  }

  /**
   * Returns the optional attribute for the dependency.
   *
   * @return the optional attribute for the dependency.
   */
  public Boolean getOptional()
  {
    return optional;
  }

  /**
   * Returns the XML fragment specifying imports for the dependency.
   *
   * @return the XML fragment specifying imports for the dependency.
   */
  public String getImportsXml()
  {
    return importsXml;
  }

  /**
   * Returns the XML fragment specifying exports for the dependency.
   *
   * @return the XML fragment specifying exports for the dependency.
   */
  public String getExportsXml()
  {
    return exportsXml;
  }

  // --- business -------------------------------------------------------------

  /**
   * Checks if the matcher of this descriptor matches with the given module
   * name.
   *
   * @param name the module name to match.
   * @return true on a match, false otherwise.
   */
  public boolean matches(final String name)
  {
    return matcher.matches(name);
  }

  // --- object basics --------------------------------------------------------

  /**
   * {@inheritDoc}
   *

   * Provides the properties via reflection for displaying debug information.
   *

   */
  @Override
  public String toString()
  {
      return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE, false, null);
  }

  @Override
  public boolean equals(final Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    final DependenciesDescriptor that = (DependenciesDescriptor) o;

    if (slot != null ? !slot.equals(that.slot) : that.slot != null) return false;
    if (skip != null ? !skip.equals(that.skip) : that.skip != null) return false;
    if (export != null ? !export.equals(that.export) : that.export != null) return false;
    if (services != null ? !services.equals(that.services) : that.services != null) return false;
    if (optional != null ? !optional.equals(that.optional) : that.optional != null) return false;
    if (importsXml != null ? !importsXml.equals(that.importsXml) : that.importsXml != null) return false;
    return !(exportsXml != null ? !exportsXml.equals(that.exportsXml) : that.exportsXml != null);

  }

  @Override
  public int hashCode() {
    int result = slot != null ? slot.hashCode() : 0;
    result = 31 * result + (skip != null ? skip.hashCode() : 0);
    result = 31 * result + (export != null ? export.hashCode() : 0);
    result = 31 * result + (services != null ? services.hashCode() : 0);
    result = 31 * result + (optional != null ? optional.hashCode() : 0);
    result = 31 * result + (importsXml != null ? importsXml.hashCode() : 0);
    result = 31 * result + (exportsXml != null ? exportsXml.hashCode() : 0);
    return result;
  }
}


text:
.neuroglancer-rendered-data-panel {
  cursor: crosshair;
  position: relative;
  outline: 0;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-noselect {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.neuroglancer-select-text {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  -khtml-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#statusContainer {
  position: fixed;
  bottom: 0px;
  z-index: 100;
  background-color: grey;
  color: white;
  margin: 0px;
  padding: 0px;
}

#statusContainer li {
  width: 100vw;
  max-height: 25vh;
  overflow-y: auto;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.overlay {
  height: 100%;
  width: 100%;
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.8);
}

.overlay-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  z-index: 100;
  color: black;
  padding: 1em;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.range-slider {
  display: flex;
  flex-direction: row;
  white-space: nowrap;
  justify-content: space-between;
}

.range-slider input[type='range'] {
}

/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-shader-code-widget.invalid-input {
  border: 1px solid red;
}

.neuroglancer-shader-code-widget.valid-input {
  border: 1px solid green;
}
/* BASICS */

.CodeMirror {
  /* Set height, width, borders, and global font properties here */
  font-family: monospace;
  height: 300px;
  color: black;
  direction: ltr;
}

/* PADDING */

.CodeMirror-lines {
  padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
  padding: 0 4px; /* Horizontal padding of content */
}

.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  background-color: white; /* The little square between H and V scrollbars */
}

/* GUTTER */

.CodeMirror-gutters {
  border-right: 1px solid #ddd;
  background-color: #f7f7f7;
  white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
  padding: 0 3px 0 5px;
  min-width: 20px;
  text-align: right;
  color: #999;
  white-space: nowrap;
}

.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }

/* CURSOR */

.CodeMirror-cursor {
  border-left: 1px solid black;
  border-right: none;
  width: 0;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
  border-left: 1px solid silver;
}
.cm-fat-cursor .CodeMirror-cursor {
  width: auto;
  border: 0 !important;
  background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
  z-index: 1;
}
.cm-fat-cursor-mark {
  background-color: rgba(20, 255, 20, 0.5);
  -webkit-animation: blink 1.06s steps(1) infinite;
  -moz-animation: blink 1.06s steps(1) infinite;
  animation: blink 1.06s steps(1) infinite;
}
.cm-animate-fat-cursor {
  width: auto;
  border: 0;
  -webkit-animation: blink 1.06s steps(1) infinite;
  -moz-animation: blink 1.06s steps(1) infinite;
  animation: blink 1.06s steps(1) infinite;
  background-color: #7e7;
}
@-moz-keyframes blink {
  0% {}
  50% { background-color: transparent; }
  100% {}
}
@-webkit-keyframes blink {
  0% {}
  50% { background-color: transparent; }
  100% {}
}
@keyframes blink {
  0% {}
  50% { background-color: transparent; }
  100% {}
}

/* Can style cursor different in overwrite (non-insert) mode */
.CodeMirror-overwrite .CodeMirror-cursor {}

.cm-tab { display: inline-block; text-decoration: inherit; }

.CodeMirror-rulers {
  position: absolute;
  left: 0; right: 0; top: -50px; bottom: -20px;
  overflow: hidden;
}
.CodeMirror-ruler {
  border-left: 1px solid #ccc;
  top: 0; bottom: 0;
  position: absolute;
}

/* DEFAULT THEME */

.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}

.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}

.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}

.CodeMirror-composing { border-bottom: 2px solid; }

/* Default styles for common addons */

div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}

/* STOP */

/* The rest of this file contains styles related to the mechanics of
   the editor. You probably shouldn't touch them. */

.CodeMirror {
  position: relative;
  overflow: hidden;
  background: white;
}

.CodeMirror-scroll {
  overflow: scroll !important; /* Things will break if this is overridden */
  /* 30px is the magic margin used to hide the element's real scrollbars */
  /* See overflow: hidden in .CodeMirror */
  margin-bottom: -30px; margin-right: -30px;
  padding-bottom: 30px;
  height: 100%;
  outline: none; /* Prevent dragging from highlighting the element */
  position: relative;
}
.CodeMirror-sizer {
  position: relative;
  border-right: 30px solid transparent;
}

/* The fake, visible scrollbars. Used to force redraw during scrolling
   before actual scrolling happens, thus preventing shaking and
   flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  position: absolute;
  z-index: 6;
  display: none;
}
.CodeMirror-vscrollbar {
  right: 0; top: 0;
  overflow-x: hidden;
  overflow-y: scroll;
}
.CodeMirror-hscrollbar {
  bottom: 0; left: 0;
  overflow-y: hidden;
  overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
  right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
  left: 0; bottom: 0;
}

.CodeMirror-gutters {
  position: absolute; left: 0; top: 0;
  min-height: 100%;
  z-index: 3;
}
.CodeMirror-gutter {
  white-space: normal;
  height: 100%;
  display: inline-block;
  vertical-align: top;
  margin-bottom: -30px;
}
.CodeMirror-gutter-wrapper {
  position: absolute;
  z-index: 4;
  background: none !important;
  border: none !important;
}
.CodeMirror-gutter-background {
  position: absolute;
  top: 0; bottom: 0;
  z-index: 4;
}
.CodeMirror-gutter-elt {
  position: absolute;
  cursor: default;
  z-index: 4;
}
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }

.CodeMirror-lines {
  cursor: text;
  min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
  /* Reset some styles that the rest of the page might have set */
  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
  border-width: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  margin: 0;
  white-space: pre;
  word-wrap: normal;
  line-height: inherit;
  color: inherit;
  z-index: 2;
  position: relative;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-variant-ligatures: contextual;
  font-variant-ligatures: contextual;
}
.CodeMirror-wrap pre {
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: normal;
}

.CodeMirror-linebackground {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 0;
}

.CodeMirror-linewidget {
  position: relative;
  z-index: 2;
  overflow: auto;
}

.CodeMirror-widget {}

.CodeMirror-rtl pre { direction: rtl; }

.CodeMirror-code {
  outline: none;
}

/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}

.CodeMirror-measure {
  position: absolute;
  width: 100%;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

.CodeMirror-cursor {
  position: absolute;
  pointer-events: none;
}
.CodeMirror-measure pre { position: static; }

div.CodeMirror-cursors {
  visibility: hidden;
  position: relative;
  z-index: 3;
}
div.CodeMirror-dragcursors {
  visibility: visible;
}

.CodeMirror-focused div.CodeMirror-cursors {
  visibility: visible;
}

.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }

.cm-searching {
  background-color: #ffa;
  background-color: rgba(255, 255, 0, .4);
}

/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }

@media print {
  /* Hide the cursor when printing */
  .CodeMirror div.CodeMirror-cursors {
    visibility: hidden;
  }
}

/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }

/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
/* The lint marker gutter */
.CodeMirror-lint-markers {
  width: 16px;
}

.CodeMirror-lint-tooltip {
  background-color: #ffd;
  border: 1px solid black;
  border-radius: 4px 4px 4px 4px;
  color: black;
  font-family: monospace;
  font-size: 10pt;
  overflow: hidden;
  padding: 2px 5px;
  position: fixed;
  white-space: pre;
  white-space: pre-wrap;
  z-index: 100;
  max-width: 600px;
  opacity: 0;
  transition: opacity .4s;
  -moz-transition: opacity .4s;
  -webkit-transition: opacity .4s;
  -o-transition: opacity .4s;
  -ms-transition: opacity .4s;
}

.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
  background-position: left bottom;
  background-repeat: repeat-x;
}

.CodeMirror-lint-mark-error {
  background-image:
  url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
  ;
}

.CodeMirror-lint-mark-warning {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
}

.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
  background-position: center center;
  background-repeat: no-repeat;
  cursor: pointer;
  display: inline-block;
  height: 16px;
  width: 16px;
  vertical-align: middle;
  position: relative;
}

.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
  padding-left: 18px;
  background-position: top left;
  background-repeat: no-repeat;
}

.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
}

.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
}

.CodeMirror-lint-marker-multiple {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
  background-repeat: no-repeat;
  background-position: right bottom;
  width: 100%; height: 100%;
}
.offset-layer-container {
  /*display: flex;*/
  flex-direction: column;
}

/* .image-dropdown-top-row .range-slider {
  flex: 1;
} */
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.image-dropdown .neuroglancer-shader-code-widget {
  height: 6em;
  width: 60ch;
  border: 1px solid transparent;
}

.image-dropdown-top-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* .image-dropdown-top-row .range-slider {
  flex: 1;
} */

.image-layer-shader-overlay .neuroglancer-shader-code-widget {
  width: 80vw;
  height: 80vh;
}

.neuroglancer-segmentation-dropdown-skeleton-shader-header {
  display: flex;
  flex-direction: row;
  align-items: center;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-help-button.neuroglancer-button {
  font-weight: bold;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.maximize-button {
  font-weight: bold;
  margin-right: 2px;
  margin-left: 2px;
}
/**
 * @license
 * Copyright 2017 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.vec3-input-row {
  display: flex;
  flex-direction: row;
  white-space: nowrap;
  justify-content: space-between;
}

.vec3-input-label {
    padding-right: 50px;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.segment-set-widget button {
  margin: 3px;
}

.segment-set-widget {
  flex: 1;
  overflow-y: auto;
}

.segment-set-widget .item-container {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.uint64-entry input {
  width: 19ch;
}

.uint64-entry input.invalid-input {
  color: red;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.segmentation-dropdown .add-segment label::before {
  content: "+ ";
  font-weight: bold;
}

.segmentation-dropdown .add-segment {
  margin-bottom: 5px;
}

.segmentation-dropdown .neuroglancer-shader-code-widget {
  height: 6em;
  width: 60ch;
  border: 1px solid transparent;
}

.neuroglancer-segmentation-layer-skeleton-shader-overlay .neuroglancer-shader-code-widget {
  width: 80vw;
  height: 80vh;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-single-mesh-dropdown .neuroglancer-single-mesh-attribute-widget {
  max-height: 6em;
}

.neuroglancer-single-mesh-dropdown .neuroglancer-shader-code-widget {
  height: 6em;
  width: 60ch;
  border: 1px solid transparent;
}

.neuroglancer-single-mesh-dropdown-top-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.neuroglancer-single-mesh-shader-overlay .neuroglancer-shader-code-widget {
  width: 80vw;
  height: 80vh;
}

.neuroglancer-single-mesh-attribute-widget {
  word-wrap: break-word;
  overflow-y: auto;
  width: 60ch;
}

.neuroglancer-single-mesh-layer-shader-overlay .neuroglancer-single-mesh-attribute-widget {
  max-height: 20vh;
}

.neuroglancer-single-mesh-attribute {
  font-family: monospace;
  display: flex;
  flex-direction: row;
}

.neuroglancer-single-mesh-attribute-range {
  white-space: nowrap;
}

.neuroglancer-single-mesh-attribute input {
  font-family: monospace;
  margin-left: 1ch;
  flex: 1;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-point-list-widget {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.neuroglancer-point-list-widget .neuroglancer-clear-button {
  flex-shrink: 0;
}

.neuroglancer-point-list-widget .neuroglancer-item-container {
  flex: 1;
  display: block;
  overflow-y: auto;
  max-height: 16em;
  counter-reset: neuroglancer-point-list-counter -1;
}

.neuroglancer-point-list-item::before {
  counter-increment: neuroglancer-point-list-counter;
  content: counter(neuroglancer-point-list-counter);
  text-align: right;
  min-width: 3ch;
  margin-right: 1ch;
  display: inline-block;

  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: #333;
}

.neuroglancer-point-list-item:hover {
  text-decoration: underline;
  cursor: pointer;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-annotation-point-list-dropdown {
  display: flex;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

html, body {
  margin: 0px;
  padding: 0px;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  background-color: black;
  color: white;
  -webkit-font-smoothing: antialiased;
  font: 12px/1.5 "Gentona Book", "Arial", sans-serif;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
}

#neuroglancer-container {
  margin-top: 50px !important; /* for nav */
  width: 100vw;
  flex: 1;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

label.perspective-panel-show-slice-views {
  pointer-events: none;
}

input.perspective-panel-show-slice-views {
  pointer-events: all;
}
/**
 * @license
 * Copyright 2017 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* This pseudo-element is needed to make the content of the main button element centered.  See
 * https://stackoverflow.com/a/24685032.
 */
.neuroglancer-button:before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

.neuroglancer-button {
  display: inline-block;
  color: black;
  background-color: #ddd;
  border-style: outset;
  border-width: 1px;
  font-family: sans-serif;
  font-size: 10pt;
  padding-left: 5px;
  padding-right: 5px;
  vertical-align: middle;
  cursor: default;
}
.neuroglancer-button:active {
  border-style: inset;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.describe-key-bindings {
  overflow-x: hidden;
}

.describe-key-bindings-container {
  overflow-y: scroll;
  max-height: 80vh;
  overflow-x: hidden;
}

.describe-key-bindings .definition-outer-container {
  display: block;
}

.describe-key-bindings .definition-container {
  display: inline-block;
  white-space: nowrap;
}

.describe-key-bindings .dt {
  font-family: monospace;
  font-weight: bold;
  display: inline-block;
  width: 20ch;
}

.describe-key-bindings .dd {
  display: inline-block;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.autocomplete-hint, .autocomplete-input {
  outline: 0;
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
}

.autocomplete-prompt, .autocomplete-hint, .autocomplete-input, .autocomplete-completion {
  font-family: monospace;
  font-size: medium;
}

.autocomplete {
  display: flex;
  flex-direction: row;
}

.autocomplete-prompt {
  display: inline-block;
}

.autocomplete-prompt:not(:empty) {
  margin-right: 1em;
}

.autocomplete-hint {
  position: absolute;
  top: 0;
  left: 0;
  border-color: transparent;
  background-color: transparent;
  box-shadow: none;
  color: #aaa;
}

.autocomplete-dropdown-wrapper {
  display: inline-block;
  position: relative;
  border: 0;
  margin: 0;
  padding: 0;
  flex: 1;
}

.autocomplete-input {
  position: relative;
  top: 0;
  left: 0;
  /* vertical-align: top; */
  color: #333;
  background-color: transparent;
}

.autocomplete-input-wrapper {
  display: flex;
  position: relative;
  outline: 0px;
  border: 0;
  margin: 0px;
  padding: 0px;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
}

.autocomplete-dropdown {
  position: absolute;
  display: none;
  outline: 0;
  margin: 0;
  padding: 0;
  text-align: left;
  cursor: default;
  border-style: solid;
  border-width: 1px;
  border-color: #aaa;
  overflow-y: scroll;
  overflow-x: hidden;
  white-space: pre;
  background-color: white;
}

.autocomplete-completion {

}

.autocomplete-completion:hover {
  outline: 1px solid #ddd;
}

.autocomplete-completion-active {
  background-color: #ccc;
}

.autocomplete-completion-with-description {
  display: flex;
  flex-direction: row;
}

.autocomplete-completion-description {
  text-align: right;
  display: inline;
  flex: 1;
  font-style: italic;
  padding-left: 2em;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.add-layer-overlay {
  width: 80vw;
}

.add-layer-name {
  display: flex;
  flex-direction: row;
  font-family: monospace;
}

.add-layer-overlay .dialog-status {
  width: 100%;
  height: 4em;
  overflow: auto;
}

.add-layer-overlay form {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.add-layer-overlay form {
  margin-bottom: 5px;
}

.add-layer-overlay form button {
  margin-left: 1em;
}

.add-layer-overlay form > label {
  margin-right: 1em;
  min-width: 4em;
}

.add-layer-name, .add-layer-source {
  border: 1px solid black;
  padding: 2px;
  flex: 1;
}

.add-layer-name.invalid-input {
  border: 1px solid red;
}

.add-layer-overlay .add-layer-name {
  font-family: monospace;
  flex: 1;
  outline: 0;
  margin: 0;
}

.add-layer-overlay .dialog-status.dialog-status-error {
  color: red;
}
/**
 * @license
 * Copyright 2017 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-context-menu {
  position: absolute;
  z-index: 200;
  border: 1px solid white;
  background-color: black;
  box-shadow: 5px 5px 2px 1px rgba(0, 0, 0, 0.5);
  font-family: sans-serif;
  font-size: 11pt;
  padding: 5px;
  color: white;
  outline: 0px;
}
/**
 * @license
 * Copyright 2017 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-position-widget {
  display: inline-flex;
  align-items: center;
}

.neuroglancer-position-widget-input-container {
  position: relative;
  display: inline-block;
  outline: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.neuroglancer-position-widget input {
  font-family: monospace;
  font-size: medium;
  border: 0;
  margin: 0;
  top: 0;
  left: 0;
}

input.neuroglancer-position-widget-input {
  color: white;
  background-color: black;
  position: relative;
  vertical-align: top;
}
.neuroglancer-position-widget-input:focus {
  outline: 0px;
  }

.neuroglancer-position-widget-hint {
  position: absolute;
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #aaa;
  pointer-events: none;
}

.neuroglancer-copy-button {
  padding: 0px;
  margin-right: 2px;
  display: inline-block;
  user-select: none;
  color: black;
  background-color: #ccc;
}

.neuroglancer-copy-button:focus {
  outline: 0px;
}

.neuroglancer-voxel-size-widget {
  background-color: #333;
  vertical-align: center;
  margin-right: 2px;
}

.neuroglancer-voxel-size-units {
  font-family: monospace;
  font-size: medium;
  color: white;
  margin-left: 3px;
  outline: 0px;
}
.neuroglancer-voxel-size-units::after {
  content: "\B3";

}

.neuroglancer-voxel-size-dimension {
  font-family: monospace;
  font-size: medium;
  color: white;
}

.neuroglancer-voxel-size-dimension + .neuroglancer-voxel-size-dimension::before {
  content: "\D7";
  color: #aaa;
}

.neuroglancer-mouse-position-widget {
  vertical-align: center;
  font-family: monospace;
  font-size: medium;
  color: orange;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-layer-panel {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background-color: black;
  align-items: stretch;
}

.neuroglancer-layer-item + .neuroglancer-layer-item {
  margin-left: 5px;
}

.neuroglancer-layer-item + .neuroglancer-layer-add-button {
  margin-left: 5px;
}

.neuroglancer-layer-item {
  position: relative;
  display: flex;
  align-items: center;
  color: white;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  border-color: #ccc;
  font-family: sans-serif;
  font-size: 10pt;
  background-color: black;
}

.neuroglancer-layer-item, .neuroglancer-layer-add-button {
  margin: 2px;
}

.neuroglancer-layer-item:hover {
  border-color: #daa520;
}

.clear-button::after {
  content: "x";
}

.neuroglancer-layer-dropdown {
  flex-direction: column;
  background-color: black;
  padding: 5px;
  border: 1px solid white;
  box-sizing: border-box;
}

.neuroglancer-layer-item-label {
  display: inline-block;
  background-color: #222;
  padding-right: 3px;
}

.neuroglancer-layer-item-number {
  display: inline-block;
  background-color: /*#daa520*/ #9a7518;
  font-weight: bold;
  padding: 1px;
  margin: 3px;
}

.neuroglancer-layer-item-value {
  display: inline-block;
  min-width: 10ch;
  max-width: 30ch;
  margin-left: 1ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipses;
  text-align: center;
}

.neuroglancer-layer-item-close::before {
  content: "\274C"; /* CROSS MARK */
}

.neuroglancer-layer-item-close {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 50%;
  width: 1.7ex;
  height: 1.7ex;
  font-family: sans-serif;
  padding: 1px;
  color: white;
  position: relative;
}

.neuroglancer-layer-item-close:hover {
  background-color: #db4437;
}

.neuroglancer-layer-item[layer-visible=false] .neuroglancer-layer-item-label {
  text-decoration: line-through;
}

.neuroglancer-layer-item[layer-visible=false] .neuroglancer-layer-item-value {
  display: none;
}

.neuroglancer-layer-add-button.neuroglancer-button {
  font-weight: bold;
}

.neuroglancer-layer-item[layer-visible=false] {
  color: #bbb;
}

.neuroglancer-layer-panel-drop-zone {
  display: inline-block;
  flex: 1;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-panel {
  border-style: solid;
  border-color: black;
  border-width: 2px;
  flex: 1;
}

.neuroglancer-panel:focus {
  border-color: white;
}

.neuroglancer-layer-group-viewer {
  outline: 0px;
}

.neuroglancer-layer-group-viewer-context-menu {
  flex-direction: column;
  align-items: stretch;
}

.neuroglancer-layer-group-viewer-context-menu label {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.neuroglancer-layer-group-viewer-context-menu select::before {
  flex: 1;
  content: " ";
}

.neuroglancer-layer-group-viewer-context-menu select {
  margin-left: 5px;
}
/**
 * @license
 * Copyright 2017 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-layout-split-drop-zone {
  position: absolute;
  z-index: 1000;
}

.neuroglancer-drag-over {
  background-color: rgba(0, 0, 255, 0.5);
}

.neuroglancer-stack-layout-row > .neuroglancer-stack-layout-drop-placeholder {
  padding-left: 4px;
  padding-right: 4px;
  width: 1px;
}

.neuroglancer-stack-layout-column > .neuroglancer-stack-layout-drop-placeholder {
  padding-top: 4px;
  padding-bottom: 4px;
  height: 1px;
}

.neuroglancer-stack-layout-drop-placeholder {
  background-clip: content-box;
  background-color: #666;
}

.neuroglancer-stack-layout-drop-placeholder.neuroglancer-drag-over {
  background-clip: border-box;
  background-color: rgba(128, 128, 255, 0.5);
}

.neuroglancer-stack-layout-drop-placeholder:first-child, .neuroglancer-stack-layout-drop-placeholder:last-child {
  display: none;
}
/**
 * @license
 * Copyright 2016 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.neuroglancer-panel {
  border-style: solid;
  border-color: black;
  border-width: 2px;
  flex: 1;
}

.neuroglancer-panel:focus {
  border-color: white;
}

.neuroglancer-viewer {
  outline: 0px;
}

.neuroglancer-viewer-context-menu > label {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.neuroglancer-viewer-context-menu > label > input::before {
  flex: 1;
  content: " ";
}

.neuroglancer-viewer-context-menu > label > input {
  margin-left: 5px;
  width: 11ch;
}

.neuroglancer-viewer-context-menu-limit-widget > input {
  width: 11ch;
}

/*# sourceMappingURL=styles.css.map*/


text:
class RefereeCenterController < ApplicationController

  before_filter :bread_crumbs
  before_filter :referee, only: [:index, :archives]
  before_filter :assigned_referee, except: [:index, :archives]
  before_filter :no_response_recorded, only: [:edit_response, :update_response]
  before_filter :agreed_but_not_completed, only: [:edit_report, :update_report]

  def index
    @referee_assignments = current_user.active_referee_assignments
  end

  def edit_response
    @assignment = RefereeAssignment.find(params[:id])
    @submission = @assignment.submission
  end

  def update_response
    if params[:referee_assignment][:agreed] == "true"
      if @assignment.agree!
        flash[:success] = "Thanks for agreeing to perform this review! It's due #{ @assignment.date_due_pretty }"
        redirect_to edit_report_referee_center_path(@assignment)
      else
        flash.now[:error] = "Something went wrong recording your response. Try again?"
        render :edit_response
      end
    elsif params[:referee_assignment][:agreed] == "false"
      if @assignment.decline_with_comment(params[:referee_assignment][:decline_comment])
        flash[:success] = "Thanks for letting us know!"
        redirect_to referee_center_index_path
      else
        flash.now[:error] = "Something went wrong recording your response. Try again?"
        render :edit_response
      end
    else
      flash.now[:error] = "Please select either agree or decline."
      render :edit_response
    end
  end

  def edit_report
    @assignment = RefereeAssignment.find(params[:id])
    @submission = @assignment.submission
  end

  def update_report
    @assignment = RefereeAssignment.find(params[:id])
    @submission = @assignment.submission

    permitted_params = params[:referee_assignment].permit(:comments_for_author,
                                                          :attachment_for_author,
                                                          :comments_for_editor,
                                                          :attachment_for_editor,
                                                          :recommendation)
    @assignment.assign_attributes(permitted_params)
    @assignment.report_completed = true

    if @assignment.save
      if @assignment.submission.referee_reports_complete?
        NotificationMailer.notify_ae_all_reports_complete(@assignment.submission)
                          .save_and_deliver
      elsif @assignment.submission.has_enough_reports?
        NotificationMailer.notify_ae_enough_reports_complete(@assignment.submission)
                          .save_and_deliver
      end
      flash[:success] = "Your report has been received, thanks!"
      redirect_to referee_center_index_path
    else
      flash.now[:error] = "Something went wrong submitting your report."
      render :edit_report
    end
  end

  def archives
	  @referee_assignments = current_user.inactive_referee_assignments
  end

  def show
    @referee_assignment = RefereeAssignment.find(params[:id])
    @attachment_for_editor = @referee_assignment.attachment_for_editor if @referee_assignment.attachment_for_editor
    @attachment_for_author = @referee_assignment.attachment_for_author if @referee_assignment.attachment_for_author
    @submission = @referee_assignment.submission
  end

  private

    def referee
      redirect_to security_breach_path unless current_user.referee?
    end

    def assigned_referee
      @referee_assignment = RefereeAssignment.find(params[:id])
      redirect_to security_breach_path unless @referee_assignment && @referee_assignment.referee == current_user
    end

    def no_response_recorded
      @assignment = RefereeAssignment.find(params[:id])
      if @assignment.agreed == true
        flash[:error] = "This request has already been accepted."
        redirect_to edit_report_referee_center_path(@assignment)
      elsif @assignment.agreed == false
        flash[:error] = "That request has already been declined."
        redirect_to referee_center_index_path
      end
    end

    def agreed_but_not_completed
      @assignment = RefereeAssignment.find(params[:id])
      if @assignment.agreed.nil?
        flash[:alert] = "Please first indicate whether you accept this request."
        redirect_to edit_response_referee_center_path(@assignment)
      elsif @assignment.agreed == false
        flash[:error] = "That request was declined."
        redirect_to referee_center_index_path
      elsif @assignment.report_completed?
        flash[:error] = "This report has already been completed."
        redirect_to referee_center_path(@assignment)
      end
    end
end


text:
package se.jonas.budget.domain.json;

import java.util.ArrayList;
import java.util.List;

import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonMethod;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import se.jonas.budget.domain.Budget;
import se.jonas.budget.domain.Budget.Status;
import se.jonas.budget.service.IdService;
import se.jonas.budget.service.impl.IdServiceImpl;

//Jackson Json mapping
@JsonAutoDetect(value=JsonMethod.ALL)
@JsonSerialize(include=Inclusion.NON_NULL)
public class JsonBudget
{
    private Long id;
    private String name;
    private String period;
    private List<JsonBudgetSpecification> specifications;
    private Status status = Status.NEW;
    private Long companyId;
    private Long employeeId;
    private Long customerId;
    private Long lockedBy;
    private Long userId;

    public String getName()
    {
        return name;
    }

    public String getPeriod()
    {
        return period;
    }

    public void setPeriod(String period)
    {
        this.period = period;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public List<JsonBudgetSpecification> getSpecifications()
    {
        return specifications;
    }

    public void setSpecifications(List<JsonBudgetSpecification> specifications)
    {
        this.specifications = specifications;
    }

    public void generateId()
    {
        if (this.id == null)
        {
            this.id = IdServiceImpl.getService().getId(IdService.Id.BudgetId);
        }

        if (specifications != null
            &&
            !specifications.isEmpty())
        {
            for (JsonBudgetSpecification specification : specifications)
            {
                specification.generateId();
            }
        }
    }

    public Status getStatus()
    {
        return status;
    }

    public void setStatus(Status status)
    {
        this.status = status;
    }

    public static List<JsonBudget> mapList(List<Budget> budgets)
    {
        List<JsonBudget> jsonBudgets = new ArrayList<JsonBudget>();
        for (Budget budget : budgets)
        {
            jsonBudgets.add(map(budget));
        }
        return jsonBudgets;
    }

    public static JsonBudget map(Budget budget)
    {
        JsonBudget jsonBudget = new JsonBudget();
        jsonBudget.setId(budget.getId());
        jsonBudget.setName(budget.getName());
        jsonBudget.setPeriod(budget.getPeriod());
        jsonBudget.setStatus(budget.getStatus());
        jsonBudget.setCompanyId(budget.getCompanyId());
        jsonBudget.setSpecifications(JsonBudgetSpecification.mapList(budget.getSpecifications()));
        jsonBudget.setEmployeeId(budget.getEmployeeId());
        jsonBudget.setCustomerId(budget.getCustomerId());
        jsonBudget.setUserId(budget.getUserId());
        return jsonBudget;
    }

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getCompanyId()
    {
        return companyId;
    }

    public void setCompanyId(Long companyId)
    {
        this.companyId = companyId;
    }

    public Long getEmployeeId()
    {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId)
    {
        this.employeeId = employeeId;
    }

    public Long getCustomerId()
    {
        return customerId;
    }

    public void setCustomerId(Long customerId)
    {
        this.customerId = customerId;
    }

    public Long getLockedBy()
    {
        return lockedBy;
    }

    public void setLockedBy(Long lockedBy)
    {
        this.lockedBy = lockedBy;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }
}


text:
#include <stddef.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <dirent.h>
#include <ctype.h>
#include <string.h>

#include "config.h"
#include "snmp-agent/mib-tree.h"
#include "snmp-core/utils.h"
#include "snmp-core/snmp-types.h"
#include "snmp-core/snmp-date-time.h"
#include "snmp-mib/single-level-module.h"
#include "snmp-mib/power/ups-module.h"
#include "snmp-mib/power/power-cache.h"

enum UPSControlObjects {
    UPS_SHUTDOWN_TYPE = 1,
    UPS_SHUTDOWN_AFTER_DELAY = 2,
    UPS_STARTUP_AFTER_DELAY = 3,
    UPS_REBOOT_WITH_DURATION = 4,
    UPS_AUTO_RESTART = 5
};

DEF_METHOD(get_scalar, SnmpErrorStatus, SingleLevelMibModule,
        SingleLevelMibModule, int id, SnmpVariableBinding *binding)
{
    UPSEntry *ups = get_ups_info();

    switch (id) {
        case UPS_SHUTDOWN_TYPE: {
            SET_INTEGER_BIND(binding, 2); /* system */
            break;
        }

        case UPS_SHUTDOWN_AFTER_DELAY: {
            SET_INTEGER_BIND(binding, ups == NULL ? 0 : ups->shutdown_delay);
            break;
        }

        case UPS_STARTUP_AFTER_DELAY: {
            SET_INTEGER_BIND(binding, ups == NULL ? 0 : ups->startup_delay);
            break;
        }

        case UPS_REBOOT_WITH_DURATION: {
            SET_INTEGER_BIND(binding, ups == NULL ? 0 : ups->reboot_duration);
            break;
        }

        case UPS_AUTO_RESTART: {
            SET_INTEGER_BIND(binding, ups == NULL ? 0 : ups->auto_restart);
            break;
        }
    }

    return NO_ERROR;
}

DEF_METHOD(set_scalar, SnmpErrorStatus, SingleLevelMibModule,
        SingleLevelMibModule, int id, SnmpVariableBinding *binding, int dry_run)
{
    return NOT_WRITABLE;
}

DEF_METHOD(finish_module, void, MibModule, SingleLevelMibModule)
{
    finish_single_level_module(this);
}

MibModule *init_ups_control_module(void)
{
    SingleLevelMibModule *module = malloc(sizeof(SingleLevelMibModule));
    if (module == NULL) {
        return NULL;
    } else if (init_single_level_module(module, UPS_SHUTDOWN_TYPE,
        UPS_AUTO_RESTART - UPS_SHUTDOWN_TYPE + 1,
        LEAF_SCALAR, LEAF_SCALAR, LEAF_SCALAR, LEAF_SCALAR, LEAF_SCALAR)) {
        free(module);
        return NULL;
    }

    SET_PREFIX(module, SNMP_OID_UPS_CONTROL_OBJECTS);
    SET_OR_ENTRY(module, NULL);
    SET_METHOD(module, MibModule, finish_module);
    SET_METHOD(module, SingleLevelMibModule, get_scalar);
    SET_METHOD(module, SingleLevelMibModule, set_scalar);
    return &module->public;
}


text:
'use strict';

/* Module for Vouchergeneratorinfo */

var vouchergeneratorinfoModule = angular.module('vouchergeneratorinfo.module', ['myApp']);

/**
 * Module for vouchergeneratorinfo
 */
vouchergeneratorinfoModule.config(['$routeProvider', function($routeProvider) {
    // Pages routes
    $routeProvider.when('/vouchergeneratorinfo',    {templateUrl: 'partials/vouchergeneratorinfo/vouchergeneratorinfo_list.html', controller: 'VouchergeneratorinfoCtrl'});
    $routeProvider.when('/vouchergeneratorinfo/new', {templateUrl: 'partials/vouchergeneratorinfo/vouchergeneratorinfo_form.html', controller: 'VouchergeneratorinfoCtrl'});
    $routeProvider.when('/vouchergeneratorinfo/:uid', {templateUrl: 'partials/vouchergeneratorinfo/vouchergeneratorinfo_form.html', controller: 'VouchergeneratorinfoCtrl'});
}]);


text:
package org.jenerator.function;

public interface FloatToIntFunction {
    int applyAsInt(float t);
}


text:
package ee.tuleva.onboarding.mandate;

import static ee.tuleva.onboarding.mandate.MandateController.MANDATES_URI;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
import static org.springframework.web.bind.annotation.RequestMethod.PUT;

import com.fasterxml.jackson.annotation.JsonView;
import ee.tuleva.onboarding.auth.principal.AuthenticatedPerson;
import ee.tuleva.onboarding.auth.session.GenericSessionStore;
import ee.tuleva.onboarding.error.ValidationErrorsException;
import ee.tuleva.onboarding.mandate.command.CreateMandateCommand;
import ee.tuleva.onboarding.mandate.command.FinishIdCardSignCommand;
import ee.tuleva.onboarding.mandate.command.StartIdCardSignCommand;
import ee.tuleva.onboarding.mandate.exception.IdSessionException;
import ee.tuleva.onboarding.mandate.exception.NotFoundException;
import ee.tuleva.onboarding.mandate.response.IdCardSignatureResponse;
import ee.tuleva.onboarding.mandate.response.IdCardSignatureStatusResponse;
import ee.tuleva.onboarding.mandate.response.MobileSignatureResponse;
import ee.tuleva.onboarding.mandate.response.MobileSignatureStatusResponse;
import ee.tuleva.onboarding.mandate.signature.SignatureFile;
import ee.tuleva.onboarding.mandate.signature.idcard.IdCardSignatureSession;
import ee.tuleva.onboarding.mandate.signature.mobileid.MobileIdSignatureSession;
import ee.tuleva.onboarding.mandate.signature.smartid.SmartIdSignatureSession;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.LocaleResolver;

@Slf4j
@RestController
@RequestMapping("/v1" + MANDATES_URI)
@RequiredArgsConstructor
public class MandateController {

  public static final String MANDATES_URI = "/mandates";

  private final MandateRepository mandateRepository;
  private final MandateService mandateService;
  private final GenericSessionStore sessionStore;
  private final SignatureFileArchiver signatureFileArchiver;
  private final MandateFileService mandateFileService;
  private final LocaleResolver localeResolver;

  @Operation(summary = "Create a mandate")
  @RequestMapping(method = POST)
  @JsonView(MandateView.Default.class)
  public Mandate create(
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson,
      @Valid @RequestBody CreateMandateCommand createMandateCommand,
      @Parameter(hidden = true) Errors errors) {
    if (errors.hasErrors()) {
      log.info("Create mandate command is not valid: {}", errors);
      throw new ValidationErrorsException(errors);
    }

    log.info("Creating mandate");
    return mandateService.save(authenticatedPerson.getUserId(), createMandateCommand);
  }

  @Operation(summary = "Start signing mandate with mobile ID")
  @RequestMapping(method = PUT, value = "/{id}/signature/mobileId")
  public MobileSignatureResponse startMobileIdSignature(
      @PathVariable("id") Long mandateId,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson) {

    MobileIdSignatureSession signatureSession =
        mandateService.mobileIdSign(
            mandateId, authenticatedPerson.getUserId(), authenticatedPerson.getPhoneNumber());
    sessionStore.save(signatureSession);

    return new MobileSignatureResponse(signatureSession.getVerificationCode());
  }

  @Operation(summary = "Is mandate successfully signed with mobile ID")
  @RequestMapping(method = GET, value = "/{id}/signature/mobileId/status")
  public MobileSignatureStatusResponse getMobileIdSignatureStatus(
      @PathVariable("id") Long mandateId,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson,
      @Parameter(hidden = true) HttpServletRequest request) {

    Optional<MobileIdSignatureSession> signatureSession =
        sessionStore.get(MobileIdSignatureSession.class);
    MobileIdSignatureSession session =
        signatureSession.orElseThrow(IdSessionException::mobileSignatureSessionNotFound);

    Locale locale = localeResolver.resolveLocale(request);

    String statusCode =
        mandateService.finalizeMobileIdSignature(
            authenticatedPerson.getUserId(), mandateId, session, locale);

    return new MobileSignatureStatusResponse(statusCode, session.getVerificationCode());
  }

  @Operation(summary = "Start signing mandate with Smart ID")
  @RequestMapping(method = PUT, value = "/{id}/signature/smartId")
  public MobileSignatureResponse startSmartIdSignature(
      @PathVariable("id") Long mandateId,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson) {
    SmartIdSignatureSession signatureSession =
        mandateService.smartIdSign(mandateId, authenticatedPerson.getUserId());
    sessionStore.save(signatureSession);

    return new MobileSignatureResponse(signatureSession.getVerificationCode());
  }

  @Operation(summary = "Is mandate successfully signed with Smart ID")
  @RequestMapping(method = GET, value = "/{id}/signature/smartId/status")
  public MobileSignatureStatusResponse getSmartIdSignatureStatus(
      @PathVariable("id") Long mandateId,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson,
      HttpServletRequest request) {

    Optional<SmartIdSignatureSession> signatureSession =
        sessionStore.get(SmartIdSignatureSession.class);
    SmartIdSignatureSession session =
        signatureSession.orElseThrow(IdSessionException::smartIdSignatureSessionNotFound);

    Locale locale = localeResolver.resolveLocale(request);

    String statusCode =
        mandateService.finalizeSmartIdSignature(
            authenticatedPerson.getUserId(), mandateId, session, locale);

    return new MobileSignatureStatusResponse(statusCode, session.getVerificationCode());
  }

  @Operation(summary = "Start signing mandate with ID card")
  @RequestMapping(method = PUT, value = "/{id}/signature/idCard")
  public IdCardSignatureResponse startIdCardSign(
      @PathVariable("id") Long mandateId,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson,
      @Valid @RequestBody StartIdCardSignCommand signCommand) {

    IdCardSignatureSession signatureSession =
        mandateService.idCardSign(
            mandateId, authenticatedPerson.getUserId(), signCommand.getClientCertificate());

    sessionStore.save(signatureSession);

    return new IdCardSignatureResponse(signatureSession.getHashToSignInHex());
  }

  @Operation(summary = "Is mandate successfully signed with ID card")
  @RequestMapping(method = PUT, value = "/{id}/signature/idCard/status")
  public IdCardSignatureStatusResponse getIdCardSignatureStatus(
      @PathVariable("id") Long mandateId,
      @Valid @RequestBody FinishIdCardSignCommand signCommand,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson,
      HttpServletRequest request) {

    Optional<IdCardSignatureSession> signatureSession =
        sessionStore.get(IdCardSignatureSession.class);
    IdCardSignatureSession session =
        signatureSession.orElseThrow(IdSessionException::cardSignatureSessionNotFound);

    Locale locale = localeResolver.resolveLocale(request);

    String statusCode =
        mandateService.finalizeIdCardSignature(
            authenticatedPerson.getUserId(),
            mandateId,
            session,
            signCommand.getSignedHash(),
            locale);

    return new IdCardSignatureStatusResponse(statusCode);
  }

  @Operation(summary = "Get mandate file")
  @RequestMapping(method = GET, value = "/{id}/file")
  public void getMandateFile(
      @PathVariable("id") Long mandateId,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson,
      HttpServletResponse response)
      throws IOException {

    Mandate mandate = getMandateOrThrow(mandateId, authenticatedPerson.getUserId());
    response.addHeader("Content-Disposition", "attachment; filename=Tuleva_avaldus.bdoc");

    byte[] content =
        mandate.getMandate().orElseThrow(() -> new RuntimeException("Mandate is not signed"));

    IOUtils.copy(new ByteArrayInputStream(content), response.getOutputStream());
    response.flushBuffer();
  }

  @Operation(summary = "Get mandate file")
  @RequestMapping(method = GET, value = "/{id}/file/preview", produces = "application/zip")
  public void getMandateFilePreview(
      @PathVariable("id") Long mandateId,
      @AuthenticationPrincipal AuthenticatedPerson authenticatedPerson,
      HttpServletResponse response)
      throws IOException {

    List<SignatureFile> files =
        mandateFileService.getMandateFiles(mandateId, authenticatedPerson.getUserId());
    response.addHeader("Content-Disposition", "attachment; filename=Tuleva_avaldus.zip");

    signatureFileArchiver.writeSignatureFilesToZipOutputStream(files, response.getOutputStream());
    response.flushBuffer();
  }

  private Mandate getMandateOrThrow(Long mandateId, Long userId) {
    Mandate mandate = mandateRepository.findByIdAndUserId(mandateId, userId);

    if (mandate == null) {
      throw new NotFoundException("Mandate not found: id=" + mandateId);
    }

    return mandate;
  }
}